[Rcpp-devel] I'm having trouble installing packages that seem to be related to segfault with Rcpp
The stack trace looks like it's an Rcpp problem (topic of this mailing list) maybe with a finalizer running at an unexpected time for what it wants to accomplish. R-3.5 is in release candidate so highly relevant to the user community even if not R-devel. If this list can help rule out Rcpp or help point to the offending user of Rcpp or otherwise identify the problem that would be great... Martin
On 04/17/2018 10:55 AM, Jeff Newmiller wrote:
R v3.5 is still off-topic on this mailing list. Try R-devel. On April 17, 2018 6:38:40 AM PDT, "Shepherd, Lori" <Lori.Shepherd at RoswellPark.org> wrote:
I starting running into an issue trying to install certain packages where I encounter a segfault. I can also install packages but then upon quitting R I get a segfault. lori at lori-HP-ZBook-15-G2:~$ R CMD config CC gcc lori at lori-HP-ZBook-15-G2:~$ R CMD config CXX g++ lori at lori-HP-ZBook-15-G2:~$ g++ --version g++ (Ubuntu 5.4.1-2ubuntu1~14.04) 5.4.1 20160904 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. lori at lori-HP-ZBook-15-G2:~$ gcc --version gcc (Ubuntu 5.4.1-2ubuntu1~14.04) 5.4.1 20160904 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. As an example. I was trying to install the package erma. http://bioconductor.org/packages/release/bioc/html/erma.html According to the description it seems like shiny and ggplot2 are likely the only dependencies that would load Rcpp ?? lori at lori-HP-ZBook-15-G2:~/b/Rpacks$ R CMD INSTALL --no-test-load erma Bioconductor version 3.7 (BiocInstaller 1.29.6), ?biocLite for help * installing to library '/home/lori/R/x86_64-pc-linux-gnu-library/3.5-BioC-3.7' * installing *source* package 'erma' ... ** R ** data ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes * DONE (erma) *** caught segfault *** address (nil), cause 'memory not mapped' An irrecoverable exception occurred. R is aborting now ... Segmentation fault The package installed but then when I do a library("erma") and quit R the segfault message also appears. When I tried debugging with valgrind, it provided the following output: lori at lori-HP-ZBook-15-G2:/tmp/Rcpp$ cat erma.valgrind ==22933== Memcheck, a memory error detector ==22933== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==22933== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==22933== Command: /home/lori/bin/R-3-5-branch/bin/exec/R -e library(erma) ==22933== R version 3.5.0 beta (2018-04-09 r74559) -- "Joy in Playing" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. Bioconductor version 3.7 (BiocInstaller 1.29.6), ?biocLite for help
library(erma)
Loading required package: Homo.sapiens
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
anyDuplicated, append, as.data.frame, basename, cbind, colMeans,
colnames, colSums, dirname, do.call, duplicated, eval, evalq,
Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply,
lengths, Map, mapply, match, mget, order, paste, pmax, pmax.int,
pmin, pmin.int, Position, rank, rbind, Reduce, rowMeans, rownames,
rowSums, sapply, setdiff, sort, table, tapply, union, unique,
unsplit, which, which.max, which.min
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following object is masked from 'package:base':
expand.grid
Loading required package: OrganismDbi
Loading required package: GenomicFeatures
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: GO.db
Loading required package: org.Hs.eg.db
Loading required package: TxDb.Hsapiens.UCSC.hg19.knownGene
Loading required package: GenomicFiles
Loading required package: SummarizedExperiment
Loading required package: DelayedArray
Loading required package: matrixStats
Attaching package: 'matrixStats'
The following objects are masked from 'package:Biobase':
anyMissing, rowMedians
Loading required package: BiocParallel
Attaching package: 'DelayedArray'
The following objects are masked from 'package:matrixStats':
colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges
The following objects are masked from 'package:base':
aperm, apply
Loading required package: Rsamtools
Loading required package: Biostrings
Loading required package: XVector
Attaching package: 'Biostrings'
The following object is masked from 'package:DelayedArray':
type
The following object is masked from 'package:base':
strsplit
Loading required package: rtracklayer
==22933== Invalid read of size 4 ==22933== at 0x8CC0443: std::locale::~locale() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19) ==22933== by 0x1DDE0572: ~basic_streambuf (streambuf:198) ==22933== by 0x1DDE0572: ~Rstreambuf (Rstreambuf.h:31) ==22933== by 0x1DDE0572: Rcpp::Rostream<false>::~Rostream() (Rstreambuf.h:44) ==22933== by 0x6E2E1A8: __run_exit_handlers (exit.c:82) ==22933== by 0x6E2E1F4: exit (exit.c:104) ==22933== by 0x5EA95F: Rstd_CleanUp (sys-std.c:1213) ==22933== by 0x511082: end_Rmainloop (main.c:1072) ==22933== by 0x511082: run_Rmainloop (main.c:1083) ==22933== by 0x41B607: main (Rmain.c:29) ==22933== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==22933== *** caught segfault *** address (nil), cause 'memory not mapped' An irrecoverable exception occurred. R is aborting now ... ==22933== ==22933== HEAP SUMMARY: ==22933== in use at exit: 577,597,056 bytes in 135,393 blocks ==22933== total heap usage: 661,662 allocs, 526,269 frees, 1,380,607,407 bytes allocated ==22933== ==22933== LEAK SUMMARY: ==22933== definitely lost: 0 bytes in 0 blocks ==22933== indirectly lost: 0 bytes in 0 blocks ==22933== possibly lost: 1,591,450 bytes in 2,158 blocks ==22933== still reachable: 576,005,606 bytes in 133,235 blocks ==22933== suppressed: 0 bytes in 0 blocks ==22933== Rerun with --leak-check=full to see details of leaked memory ==22933== ==22933== For counts of detected and suppressed errors, rerun with: -v ==22933== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Any advice on how to remedy this situation is greatly appreciated. Lori Shepherd Bioconductor Core Team Roswell Park Cancer Institute Department of Biostatistics & Bioinformatics Elm & Carlton Streets Buffalo, New York 14263 This email message may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited. If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.
This email message may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited. If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.