[Rd] Mystifying SEGFAULT on 3.2.3 but not 3.2.2

Gert van Valkenhoef g.h.m.van.valkenhoef at rug.nl
Thu Dec 17 12:10:40 CET 2015


Dear Dirk,

Thank you for the analysis and the hints. I hadn't heard of install.r but
it sounds like it might be helpful for us in automated deploy situations so
thanks! For now my immediate problem has been solved by switching from rcdd
to Rglpk. I was afraid it would be problematic because of the system
dependency on libglpk, but it seems that it gets shipped (static linked)
with the binary on Windows. Is that also true on OS X?

How do I know what toolchain was used to build the R I got from CRAN so
that I can check this hypothesis?

Best,

Gert

On Wed, Dec 16, 2015 at 4:28 PM, Dirk Eddelbuettel <edd at debian.org> wrote:

>
> Gert,
>
> On 16 December 2015 at 12:06, Gert van Valkenhoef wrote:
> | I recently upgraded to 3.2.3 and am getting mystifying errors with my
> | in-development code (available at
> | https://github.com/gertvv/gemtc/tree/feature/regression). Every few
> hundred
> | LPs that I solve using the rcdd package will result in a SEGFAULT in the
> | garbage collector (address 0x10, cause 'memory not mapped') or an error
> | about a list not existing. Downgrading to 3.2.2 works, but *only* after
> | completely removing my local R packages and re-installing them. A
>
> I wish I could tell you something more encouraging -- but this _sometimes_
> happens with prebuilt R, or prebuilt packages.  We try try chase this, and
> when we do batch runs of R CMD check over all reverse depends we end up
> rebuilding.
>
> I was just bitten by this when upgrading to Ubuntu 15.10 as it brings in
> g++-5.2 which has a _known_ ABI transition for C++11/14.  About 15% of
> packages got 'random' (but repeatable) seg.faults when there were none
> before.  And that went away with a proper R version also built with a
> gcc-5.2
> toolchain.
>
> So in short: check your toolchain. Things may then go away. If they don't
> then there may be a real bug.
>
> | subsequent upgrade to 3.2.3 will again be broken, and even more
> | mysteriously it will also break a re-downgrade to 3.2.2 until I again
> purge
> | my local packages and re-install them.
> |
> | To downgrade I am using (with the CRAN ubuntu mirror enabled):
> | sudo apt-get purge r-base-core
> | sudo rm -rf ~/R
>
> [ I am mildly opposed to ~/R. I unset R_LIBS_USER in /etc/R/Renviron and
> just
> make sure I am part of the group owning /usr/local/lib/R/site-library. Then
> an ordinary users can install there. ]
>
> | sudo apt-get install r-base-core=3.2.2-1trusty0 r-base-dev=3.2.2-1trusty0
> | r-recommended=3.2.2-1trusty0
> | sudo apt-get install r-cran-rjags
> | R -e "install.packages(c('devtools','igraph','meta','truncnorm','rcdd'))"
>
> [ I am very partial to using 'install.r devtools igraph meta truncnorm
> rcdd'
> on the command-line where install.r is a part of r-cran-littler, or littler
> now on CRAN, which I link into /usr/local/bin. ]
>
> | The code that produces a SEGFAULT (usually after 5-15 iterations) under
> | 3.2.3, but not 3.2.2:
> | library(devtools)
> | load_all('gemtc')
> | for (i in 1:100) { print(i); mtc.model(thrombolytic) }
> | (note that the SEGFAULT also happens without devtools)
> |
> | The sessionInfo() in 3.2.2:
> |
> | R version 3.2.2 (2015-08-14)
> | Platform: x86_64-pc-linux-gnu (64-bit)
> | Running under: Ubuntu 14.04.3 LTS
>
> We have a dedicated list for running R on Debian/Ubuntu/... systems:
> r-sig-debian.  Consider lurking/posting there.
>
> Cheers,  Dirk
>
>
> | locale:
> |  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
> |  [3] LC_TIME=nl_NL.UTF-8        LC_COLLATE=en_US.UTF-8
> |  [5] LC_MONETARY=nl_NL.UTF-8    LC_MESSAGES=en_US.UTF-8
> |  [7] LC_PAPER=nl_NL.UTF-8       LC_NAME=C
> |  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> | [11] LC_MEASUREMENT=nl_NL.UTF-8 LC_IDENTIFICATION=C
> |
> | attached base packages:
> | [1] stats     graphics  grDevices utils     datasets  methods   base
> |
> | other attached packages:
> | [1] gemtc_0.8       coda_0.16-1     lattice_0.20-33 devtools_1.9.1
> |
> | loaded via a namespace (and not attached):
> |  [1] Rcpp_0.12.2     roxygen2_5.0.1  rcdd_1.1-9      digest_0.6.8
> |  [5] truncnorm_1.0-7 grid_3.2.2      plyr_1.8.3      meta_4.3-2
> |  [9] magrittr_1.5    stringi_1.0-1   rjags_4-4       tools_3.2.2
> | [13] stringr_1.0.0   igraph_1.0.1    memoise_0.2.1
> |
> | A core dump is here:
> |
> https://drive.google.com/a/rug.nl/file/d/0BxhVLNPmwLrycTYtOHNxNXZTMEk/view?usp=drive_web
> |
> | I have tried debugging this but am stumped. Any help would be greatly
> | appreciated!
> |
> | Kind regards,
> |
> | Gert van Valkenhoef
> |
> |       [[alternative HTML version deleted]]
> |
> | ______________________________________________
> | R-devel at r-project.org mailing list
> | https://stat.ethz.ch/mailman/listinfo/r-devel
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list