segfault in rstan develop branch

17 views
Skip to first unread message

Jiqiang Guo

unread,
Jun 20, 2015, 6:02:26 PM6/20/15
to stan...@googlegroups.com

I am running into a segfault error when using current rstan develop branch.  The following is one error output when running https://github.com/stan-dev/rstan/blob/develop/rstan/example/test.R



> ## test specifying pars
> fit3 <- stan(model_code = code2, data = list(J = 3))

 *** caught segfault ***
address 0x1c, cause 'memory not mapped'

Traceback:
 1: FUN("_rcpp_module_boot_stan_fit4modelf48279244a44_1c4d801fe5862beae92c16a521074a96_mod"[[1L]],     ...)
 2: lapply(name, function(id) {    v <- .Internal(getSymbolInfo(as.character(id), PACKAGE, as.logical(withRegistrationInfo)))    if (is.null(v)) {        msg <- paste("no such symbol", id)        if (length(pkgName) && nzchar(pkgName))             msg <- paste(msg, "in package", pkgName)        stop(msg, domain = NA)    }    names(v) <- c("name", "address", "package", "numParameters")[seq_along(v)]    v})
 3: getNativeSymbolInfo(name, PACKAGE)
 4: doTryCatch(return(expr), name, parentenv, handler)
 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 6: tryCatchList(expr, classes, parentenv, handlers)
 7: tryCatch(getNativeSymbolInfo(name, PACKAGE), error = function(e) e)
 8: Module(module, mustStart = TRUE)
 9: .getModulePointer(x)
10: <S4 object of class "Module">$stan_fit4modelf48279244a44_1c4d801fe5862beae92c16a521074a96
11: eval(expr, envir, enclos)
12: eval(call("$", mod, paste("stan_fit4", model_cppname, sep = "")))
13: .local(object, ...)
14: sampling(sm, data, pars, chains, iter, warmup, thin, seed, init,     check_data = TRUE, sample_file = sample_file, diagnostic_file = diagnostic_file,     verbose = verbose, algorithm = match.arg(algorithm), control = control,     check_unknown_args = FALSE, cores = cores, open_progress = open_progress,     ...)
15: sampling(sm, data, pars, chains, iter, warmup, thin, seed, init,     check_data = TRUE, sample_file = sample_file, diagnostic_file = diagnostic_file,     verbose = verbose, algorithm = match.arg(algorithm), control = control,     check_unknown_args = FALSE, cores = cores, open_progress = open_progress,     ...)
16: stan(model_code = code2, data = list(J = 3))
aborting …



Ben, can you try to see if it is reproducible?  This seems to be a problem with rstan.

It seems to be fine with rstan 2.6.0.  



Jiqiang 

Ben Goodrich

unread,
Jun 20, 2015, 8:21:17 PM6/20/15
to stan...@googlegroups.com, guo...@gmail.com
On Saturday, June 20, 2015 at 6:02:26 PM UTC-4, Jiqiang Guo wrote:
Ben, can you try to see if it is reproducible?  This seems to be a problem with rstan.

It seems to be fine with rstan 2.6.0.  

Yeah, it has something to do with the reloading of a serialized model.

Ben

Ben Goodrich

unread,
Jun 20, 2015, 10:13:08 PM6/20/15
to stan...@googlegroups.com, goodri...@gmail.com, guo...@gmail.com

I worked around it by recompiling the model when cores == 1, which Andrew will hate but we can't risk crashing an R session.

Ben

Reply all
Reply to author
Forward
0 new messages