-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C stack usage is too close to the limit when loading a Module #458
Comments
@bgoodri It is difficult to say anything here. The bug may be due to a race condition that's always been there. R-devel made a change last summer that affected modules, and we accommodated. Here maybe the 'memory-profiling' default in the Debian package is the difference, otherwise
is pretty impossible. You could try compiling r-devel the same way as my Debian package. |
Thanks @eddelbuettel . I tried to build r-devel like r-base but got the same error. Is there more to it than taking just the configure.stamp stanza from debian/rules and pasting it into the shell where r-devel is? Like
Regardless, I was able to get it to work again with r-base if I hacked the Module.R file in three places
I'm not sure what |
I was able to replicate this in a Debian unstable Docker container with the current R package. Could you prepare a proper pull request detailing your changes (and maybe adding a ChangeLog entry) so that it gets at least passed through Travis one time? |
This fixes a mysterious race on Debian unstable with R 3.3.0 beta that was triggered when loading the rstanarm package Closes RcppCore#458
With 3.3.0 beta (2016-04-05 r70427) from Debian unstable I am having an issue with loading the Modules in the rstanarm package that does not occur on r-devel compiled from svn and was not occurring with 3.2.x. So, this might be a Debian bug, but it occurs whether I use r-cran-rcpp or install Rcpp 0.12.4 from CRAN (with various combinations of CXXFLAGS in ~/.R/Makevars).
In .onLoad(), I call loadRcppModules() to load the six modules listed in the RcppModules line of the DESCRIPTION file. This has worked for months and I'm pretty sure it was working with the Rcpp 0.12.4 for a few days before the 3.3.0 betas starting being uploaded to Debian unstable. Now, when it tries to the load the rstanarm package, it errors with "C stack usage is too close to the limit". If you have the 3.3.0 beta from Debian unstable, you should be able to reproduce this just by calling
If I first call
ulimit -s 16384
in a shell to increase the stack limit, the error message becomesTo investigate, I commented out loadRcppModules() in .onLoad() and tried to load one of rstanarm's Modules manually. The error comes from the Module() function when it calls
clname <- as.character(CLASS)
. The full session is below:Thanks!
The text was updated successfully, but these errors were encountered: