Hi all, a user contacted me about a segfault when installing WGCNA package dowloaded from CRAN. I also see a segfault like that on certain installs of R.
The package passes all CRAN checks, so presumably this has something to do with the R installation or environment. The R versions here are not the newest but I would guess that this is not an R version issue. I'm attaching two sessionInfo() outputs on systems where the installation throws a segfault. Any pointers/ideas as to what could be going wrong? Thanks, Peter ################################################################## System 1: trying URL 'https://mirrors.sorengard.com/cran/src/contrib/WGCNA_1.63.tar.gz' Content type 'application/x-gzip' length 1153113 bytes (1.1 MB) ================================================== downloaded 1.1 MB * installing *source* package ‘WGCNA’ ... ** package ‘WGCNA’ successfully unpacked and MD5 sums checked ** libs gcc -I/mnt/mfs/cluster/bin/R-3.4/include -DNDEBUG -DWITH_THREADS -I"/mnt/mfs/cluster/bin/R-3.4/library/Rcpp/include" -I/usr/local/include -fpic -g -O2 -c corFunctions-utils.c -o corFunctions-utils.o gcc -I/mnt/mfs/cluster/bin/R-3.4/include -DNDEBUG -DWITH_THREADS -I"/mnt/mfs/cluster/bin/R-3.4/library/Rcpp/include" -I/usr/local/include -fpic -g -O2 -c corFunctions.c -o corFunctions.o gcc -I/mnt/mfs/cluster/bin/R-3.4/include -DNDEBUG -DWITH_THREADS -I"/mnt/mfs/cluster/bin/R-3.4/library/Rcpp/include" -I/usr/local/include -fpic -g -O2 -c myMatrixMultiplication.c -o myMatrixMultiplication.o gcc -I/mnt/mfs/cluster/bin/R-3.4/include -DNDEBUG -DWITH_THREADS -I"/mnt/mfs/cluster/bin/R-3.4/library/Rcpp/include" -I/usr/local/include -fpic -g -O2 -c networkFunctions.c -o networkFunctions.o g++ -I/mnt/mfs/cluster/bin/R-3.4/include -DNDEBUG -DWITH_THREADS -I"/mnt/mfs/cluster/bin/R-3.4/library/Rcpp/include" -I/usr/local/include -fpic -g -O2 -c parallelQuantile.cc -o parallelQuantile.o gcc -I/mnt/mfs/cluster/bin/R-3.4/include -DNDEBUG -DWITH_THREADS -I"/mnt/mfs/cluster/bin/R-3.4/library/Rcpp/include" -I/usr/local/include -fpic -g -O2 -c pivot.c -o pivot.o g++ -shared -L/usr/local/lib -o WGCNA.so corFunctions-utils.o corFunctions.o myMatrixMultiplication.o networkFunctions.o parallelQuantile.o pivot.o -lpthread installing to /mnt/mfs/cluster/bin/R-3.4/library/WGCNA/libs ** R ** data ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded ========================================================================== * * Package WGCNA 1.63 loaded. * * Important note: It appears that your system supports multi-threading, * but it is not enabled within WGCNA in R. * To allow multi-threading within WGCNA with all available cores, use * * allowWGCNAThreads() * * within R. Use disableWGCNAThreads() to disable threading if necessary. * Alternatively, set the following environment variable on your system: * * ALLOW_WGCNA_THREADS=<number_of_processors> * * for example * * ALLOW_WGCNA_THREADS=32 * * To set the environment variable in linux bash shell, type * * export ALLOW_WGCNA_THREADS=32 * * before running R. Other operating systems or shells will * have a similar command to achieve the same aim. * ========================================================================== *** caught segfault *** address (nil), cause 'memory not mapped' An irrecoverable exception occurred. R is aborting now ... Segmentation fault ERROR: loading failed * removing ‘/mnt/mfs/cluster/bin/R-3.4/library/WGCNA’ *** caught segfault *** address (nil), cause 'memory not mapped' Traceback: 1: q("no", status = status, runLast = FALSE) 2: do_exit(status = status) 3: do_exit_on_error() 4: errmsg("loading failed") 5: do_install_source(pkg_name, instdir, pkg, desc) 6: do_install(pkg) 7: tools:::.install_packages() An irrecoverable exception occurred. R is aborting now ... Segmentation fault The downloaded source packages are in ‘/tmp/RtmpQ3mLx7/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning message: In install.packages("WGCNA") : installation of package ‘WGCNA’ had non-zero exit status > sessionInfo() R version 3.4.2 (2017-09-28) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 9 (stretch) Matrix products: default BLAS: /mnt/mfs/cluster/bin/R-3.4/lib/libRblas.so LAPACK: /mnt/mfs/cluster/bin/R-3.4/lib/libRlapack.so locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.4.2 ################################################################## System 2: * installing *source* package ‘WGCNA’ ... ** package ‘WGCNA’ successfully unpacked and MD5 sums checked ** libs /u/local/compilers/gcc/4.9.3/bin/gcc -std=gnu99 -I/u/local/apps/R/3.3.3/gcc-4.9.3_MKL-2017.0/lib64/R/include -DNDEBUG -DWITH_THREADS -I/u/local/compilers/gcc/4.9.3/include -I/u/local/apps/zlib/1.2.8/gcc-4.4.7/include -I/u/local/apps/bzip2/1.0.6/include -I/u/local/apps/xz/5.2.2/include -I/u/local/apps/pcre/8.39/include -I/u/local/apps/curl/7.49.1/include -I/include -I"/u/home/p/plangfel/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -fpic -O3 -m64 -fopenmp -fPIC -c corFunctions-utils.c -o corFunctions-utils.o /u/local/compilers/gcc/4.9.3/bin/gcc -std=gnu99 -I/u/local/apps/R/3.3.3/gcc-4.9.3_MKL-2017.0/lib64/R/include -DNDEBUG -DWITH_THREADS -I/u/local/compilers/gcc/4.9.3/include -I/u/local/apps/zlib/1.2.8/gcc-4.4.7/include -I/u/local/apps/bzip2/1.0.6/include -I/u/local/apps/xz/5.2.2/include -I/u/local/apps/pcre/8.39/include -I/u/local/apps/curl/7.49.1/include -I/include -I"/u/home/p/plangfel/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -fpic -O3 -m64 -fopenmp -fPIC -c corFunctions.c -o corFunctions.o /u/local/compilers/gcc/4.9.3/bin/gcc -std=gnu99 -I/u/local/apps/R/3.3.3/gcc-4.9.3_MKL-2017.0/lib64/R/include -DNDEBUG -DWITH_THREADS -I/u/local/compilers/gcc/4.9.3/include -I/u/local/apps/zlib/1.2.8/gcc-4.4.7/include -I/u/local/apps/bzip2/1.0.6/include -I/u/local/apps/xz/5.2.2/include -I/u/local/apps/pcre/8.39/include -I/u/local/apps/curl/7.49.1/include -I/include -I"/u/home/p/plangfel/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -fpic -O3 -m64 -fopenmp -fPIC -c myMatrixMultiplication.c -o myMatrixMultiplication.o /u/local/compilers/gcc/4.9.3/bin/gcc -std=gnu99 -I/u/local/apps/R/3.3.3/gcc-4.9.3_MKL-2017.0/lib64/R/include -DNDEBUG -DWITH_THREADS -I/u/local/compilers/gcc/4.9.3/include -I/u/local/apps/zlib/1.2.8/gcc-4.4.7/include -I/u/local/apps/bzip2/1.0.6/include -I/u/local/apps/xz/5.2.2/include -I/u/local/apps/pcre/8.39/include -I/u/local/apps/curl/7.49.1/include -I/include -I"/u/home/p/plangfel/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -fpic -O3 -m64 -fopenmp -fPIC -c networkFunctions.c -o networkFunctions.o /u/local/compilers/gcc/4.9.3/bin/g++ -I/u/local/apps/R/3.3.3/gcc-4.9.3_MKL-2017.0/lib64/R/include -DNDEBUG -DWITH_THREADS -I/u/local/compilers/gcc/4.9.3/include -I/u/local/apps/zlib/1.2.8/gcc-4.4.7/include -I/u/local/apps/bzip2/1.0.6/include -I/u/local/apps/xz/5.2.2/include -I/u/local/apps/pcre/8.39/include -I/u/local/apps/curl/7.49.1/include -I/include -I"/u/home/p/plangfel/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -fpic -m64 -fopenmp -O3 -fPIC -c parallelQuantile.cc -o parallelQuantile.o /u/local/compilers/gcc/4.9.3/bin/gcc -std=gnu99 -I/u/local/apps/R/3.3.3/gcc-4.9.3_MKL-2017.0/lib64/R/include -DNDEBUG -DWITH_THREADS -I/u/local/compilers/gcc/4.9.3/include -I/u/local/apps/zlib/1.2.8/gcc-4.4.7/include -I/u/local/apps/bzip2/1.0.6/include -I/u/local/apps/xz/5.2.2/include -I/u/local/apps/pcre/8.39/include -I/u/local/apps/curl/7.49.1/include -I/include -I"/u/home/p/plangfel/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -fpic -O3 -m64 -fopenmp -fPIC -c pivot.c -o pivot.o /u/local/compilers/gcc/4.9.3/bin/g++ -shared -L/u/local/apps/R/3.3.3/gcc-4.9.3_MKL-2017.0/lib64/R/lib -L/u/local/compilers/gcc/4.9.3/lib -L/u/local/apps/zlib/1.2.8/gcc-4.4.7/lib -L/u/local/apps/bzip2/1.0.6/lib -L/u/local/apps/xz/5.2.2/lib -L/u/local/apps/pcre/8.39/lib -L/u/local/apps/curl/7.49.1/lib -o WGCNA.so corFunctions-utils.o corFunctions.o myMatrixMultiplication.o networkFunctions.o parallelQuantile.o pivot.o -lpthread -L/u/local/apps/R/3.3.3/gcc-4.9.3_MKL-2017.0/lib64/R/lib -lR /usr/bin/ld: skipping incompatible /u/local/compilers/gcc/4.9.3/lib/libstdc++.so when searching for -lstdc++ /usr/bin/ld: skipping incompatible /u/local/compilers/gcc/4.9.3/lib/libstdc++.a when searching for -lstdc++ /usr/bin/ld: skipping incompatible /u/local/compilers/gcc/4.9.3/lib/libgcc_s.so when searching for -lgcc_s /usr/bin/ld: skipping incompatible /u/local/compilers/gcc/4.9.3/lib/libgcc_s.so when searching for -lgcc_s installing to /u/home/p/plangfel/R/x86_64-pc-linux-gnu-library/3.3/WGCNA/libs ** R ** data ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded sh: line 1: 9127 Segmentation fault '/u/local/apps/R/3.3.3/gcc-4.9.3_MKL-2017.0/lib64/R/bin/R' --no-save --slave 2>&1 < '/tmp/Rtmp3EzbzU/file12085f7bbb35' *** caught segfault *** address (nil), cause 'unknown' An irrecoverable exception occurred. R is aborting now ... ERROR: loading failed * removing ‘/u/home/p/plangfel/R/x86_64-pc-linux-gnu-library/3.3/WGCNA’ * restoring previous ‘/u/home/p/plangfel/R/x86_64-pc-linux-gnu-library/3.3/WGCNA’ The downloaded source packages are in ‘/work/tmp/RtmpiAyLef/downloaded_packages’ Warning message: In install.packages("WGCNA") : installation of package ‘WGCNA’ had non-zero exit status > sessionInfo() R version 3.3.3 (2017-03-06) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS release 6.9 (Final) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_3.3.3 ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.