Crash rstan or brms

Hi,

I was wondering if anyone might know about this. I was running a simple multilevel model and it would crash my R. My R version is 3.6.3. It’s a simple example of brms and it would pop the error message “R abort session”. I thought it’s something to do with my R version so I went to RStudio.cloud and run it with version 3.6. I only installed brms and nothing else on the RStudio.cloud. However, it’s still crashed and gave me the following feedback. This is the first time over 2 years I run into such incident when using rstan and brms.

Best wishes

Lawrence

library(brms)
fit1 ← brm(count ~ zAge + zBase * Trt + (1|patient), data = epilepsy, family = poisson())

Compiling the C++ model
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! filec79223dc100.cpp:6:36: warning: ISO C++11 requires whitespace after the macro name
#define STAN__SERVICES__COMMAND_HPP#include <boost/integer/integer_log2.hpp>
^
In file included from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/smart_ptr/shared_ptr.hpp:28:0,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/shared_ptr.hpp:17,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/date_time/time_clock.hpp:17,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/date_time/posix_time/posix_time_types.hpp:10,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/rstan/include/rstan/stan_fit.hpp:13,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/rstan/include/rstan/rstaninc.hpp:3,
f
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command ‘/opt/R/3.6.0/lib/R/bin/R CMD SHLIB filec79223dc100.cpp 2> filec79223dc100.cpp.err.txt’ had status 1
Error in sink(type = “output”) : invalid connection

devtools::session_info("rstan")?

It happens to me too when the model is heavy :(

This is the feedback I got from RStudio.Cloud

devtools::session_info(“rstan”)
Failed to create bus connection: No such file or directory
─ Session info ────────────────────────────────────────────────────────────────────────────────
setting value
version R version 3.6.0 (2019-04-26)
os Ubuntu 16.04.6 LTS
system x86_64, linux-gnu
ui RStudio
language (EN)
collate C.UTF-8
ctype C.UTF-8
tz Etc/UTC
date 2020-03-19

─ Packages ────────────────────────────────────────────────────────────────────────────────────
package * version date lib source
assertthat 0.2.1 2019-03-21 [1] RSPM (R 3.6.0)
backports 1.1.5 2019-10-02 [1] RSPM (R 3.6.0)
BH 1.72.0-3 2020-01-08 [1] RSPM (R 3.6.0)
callr 3.4.2 2020-02-12 [1] RSPM (R 3.6.0)
checkmate 2.0.0 2020-02-06 [1] RSPM (R 3.6.0)
cli 2.0.2 2020-02-28 [1] RSPM (R 3.6.0)
colorspace 1.4-1 2019-03-18 [1] RSPM (R 3.6.0)
crayon 1.3.4 2017-09-16 [1] RSPM (R 3.6.0)
desc 1.2.0 2018-05-01 [1] RSPM (R 3.6.0)
digest 0.6.25 2020-02-23 [1] RSPM (R 3.6.0)
ellipsis 0.3.0 2019-09-20 [1] RSPM (R 3.6.0)
evaluate 0.14 2019-05-28 [1] RSPM (R 3.6.0)
fansi 0.4.1 2020-01-08 [1] RSPM (R 3.6.0)
farver 2.0.3 2020-01-16 [1] RSPM (R 3.6.0)
ggplot2 3.3.0 2020-03-05 [1] RSPM (R 3.6.0)
glue 1.3.2 2020-03-12 [1] RSPM (R 3.6.0)
gridExtra 2.3 2017-09-09 [1] RSPM (R 3.6.0)
gtable 0.3.0 2019-03-25 [1] RSPM (R 3.6.0)
inline 0.3.15 2018-05-18 [1] RSPM (R 3.6.0)
isoband 0.2.0 2019-04-06 [1] RSPM (R 3.6.0)
labeling 0.3 2014-08-23 [1] RSPM (R 3.6.0)
lattice 0.20-38 2018-11-04 [2] CRAN (R 3.6.0)
lifecycle 0.2.0 2020-03-06 [1] RSPM (R 3.6.0)
loo 2.2.0 2019-12-19 [1] RSPM (R 3.6.0)
magrittr 1.5 2014-11-22 [1] RSPM (R 3.6.0)
MASS 7.3-51.4 2019-03-31 [2] CRAN (R 3.6.0)
Matrix 1.2-17 2019-03-22 [2] CRAN (R 3.6.0)
matrixStats 0.56.0 2020-03-13 [1] RSPM (R 3.6.0)
mgcv 1.8-28 2019-03-21 [2] CRAN (R 3.6.0)
munsell 0.5.0 2018-06-12 [1] RSPM (R 3.6.0)
nlme 3.1-139 2019-04-09 [2] CRAN (R 3.6.0)
pillar 1.4.3 2019-12-20 [1] RSPM (R 3.6.0)
pkgbuild 1.0.6 2019-10-09 [1] RSPM (R 3.6.0)
pkgconfig 2.0.3 2019-09-22 [1] RSPM (R 3.6.0)
pkgload 1.0.2 2018-10-29 [1] RSPM (R 3.6.0)
praise 1.0.0 2015-08-11 [1] RSPM (R 3.6.0)
prettyunits 1.1.1 2020-01-24 [1] RSPM (R 3.6.0)
processx 3.4.2 2020-02-09 [1] RSPM (R 3.6.0)
ps 1.3.2 2020-02-13 [1] RSPM (R 3.6.0)
R6 2.4.1 2019-11-12 [1] RSPM (R 3.6.0)
RColorBrewer 1.1-2 2014-12-07 [1] RSPM (R 3.6.0)
Rcpp * 1.0.4 2020-03-17 [1] CRAN (R 3.6.0)
RcppEigen 0.3.3.7.0 2019-11-16 [1] RSPM (R 3.6.0)
rlang 0.4.5 2020-03-01 [1] RSPM (R 3.6.0)
rprojroot 1.3-2 2018-01-03 [1] RSPM (R 3.6.0)
rstan 2.19.3 2020-02-11 [1] RSPM (R 3.6.0)
rstudioapi 0.11 2020-02-07 [1] RSPM (R 3.6.0)
scales 1.1.0 2019-11-18 [1] RSPM (R 3.6.0)
StanHeaders 2.19.2 2020-02-11 [1] RSPM (R 3.6.0)
testthat 2.3.2 2020-03-02 [1] RSPM (R 3.6.0)
tibble 2.1.3 2019-06-06 [1] RSPM (R 3.6.0)
utf8 1.1.4 2018-05-24 [1] RSPM (R 3.6.0)
vctrs 0.2.4 2020-03-10 [1] RSPM (R 3.6.0)
viridisLite 0.3.0 2018-02-01 [1] RSPM (R 3.6.0)
withr 2.1.2 2018-03-15 [1] RSPM (R 3.6.0)

[1] /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6
[2] /opt/R/3.6.0/lib/R/library
Warning message:
In system(“timedatectl”, intern = TRUE) :
running command ‘timedatectl’ had status 1

If the model was too heavy, I’d take the error happily. But then it’s just a small one and it’s the example from the brms package, so I assume it should be fairly light. First time, really.

RStudio Cloud limits your RAM to 1GB