Segfault error when loading WGCNA
1
0
Entering edit mode
@antoinefelden-16088
Last seen 6.3 years ago

Hi,

I keep running in the following error when trying to load WGCNA with library("WGCNA"), and I couldn't extract any good lead from the logs. I already tried to reinstall the package, but got the same error. Any lead? Cheers.

 *** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
 1: dyn.load(file, DLLpath = DLLpath, ...)
 2: library.dynam(lib, package, package.lib)
 3: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
 4: asNamespace(ns)
 5: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc,     .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package)
 6: loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
 7: namespaceImport(ns, loadNamespace(i, c(lib.loc, .libPaths()),     versionCheck = vI[[i]]), from = package)
 8: loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
 9: namespaceImport(ns, loadNamespace(i, c(lib.loc, .libPaths()),     versionCheck = vI[[i]]), from = package)
10: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
11: asNamespace(ns)
12: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc,     .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package)
13: loadNamespace(package, lib.loc)
14: doTryCatch(return(expr), name, parentenv, handler)
15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
16: tryCatchList(expr, classes, parentenv, handlers)
17: tryCatch({    attr(package, "LibPath") <- which.lib.loc    ns <- loadNamespace(package, lib.loc)    env <- attachNamespace(ns, pos = pos, deps)}, error = function(e) {    P <- if (!is.null(cc <- conditionCall(e)))         paste(" in", deparse(cc)[1L])    else ""    msg <- gettextf("package or namespace load failed for %s%s:\n %s",         sQuote(package), P, conditionMessage(e))    if (logical.return)         message(paste("Error:", msg), domain = NA)    else stop(msg, call. = FALSE, domain = NA)})
18: library("WGCNA", lib.loc = "/srv/global/scratch/feldenan/ZZ_misc_tests/install_test_WGCNA")
An irrecoverable exception occurred. R is aborting now ...
/var/opt/sge/default/spool/scifachpc-c04n04/job_scripts/753709: line 695: 64854 Segmentation fault      (core dumped) Rscript ./WGCNA_test.R

And here are my session infos:

R version 3.4.3 (2017-11-30)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS release 6.9 (Final)

Matrix products: default
BLAS: /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/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] stats4    parallel  methods   stats     graphics  grDevices utils    
[8] datasets  base     

other attached packages:
 [1] edgeR_3.10.2          limma_3.24.5          preprocessCore_1.40.0
 [4] GO.db_3.5.0           pkgconfig_2.0.1       impute_1.52.0        
 [7] AnnotationDbi_1.40.0  IRanges_2.12.0        S4Vectors_0.16.0     
[10] Biobase_2.38.0        BiocGenerics_0.24.0   Rcpp_0.12.18         
[13] BiocInstaller_1.28.0 

loaded via a namespace (and not attached):
[1] digest_0.6.9   DBI_0.8        RSQLite_2.1.0  blob_1.1.1     bit64_0.9-7   
[6] bit_1.1-12     compiler_3.4.3 memoise_1.1.0 
R version 3.4.3 (2017-11-30)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS release 6.9 (Final)

Matrix products: default
BLAS: /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/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] stats4    parallel  methods   stats     graphics  grDevices utils    
[8] datasets  base     

other attached packages:
 [1] edgeR_3.10.2          limma_3.24.5          preprocessCore_1.40.0
 [4] GO.db_3.5.0           pkgconfig_2.0.1       impute_1.52.0        
 [7] AnnotationDbi_1.40.0  IRanges_2.12.0        S4Vectors_0.16.0     
[10] Biobase_2.38.0        BiocGenerics_0.24.0   Rcpp_0.12.18         
[13] BiocInstaller_1.28.0 

loaded via a namespace (and not attached):
[1] digest_0.6.9   DBI_0.8        RSQLite_2.1.0  blob_1.1.1     bit64_0.9-7   
[6] bit_1.1-12     compiler_3.4.3 memoise_1.1.0
wgcna wgcna package • 1.8k views
ADD COMMENT
1
Entering edit mode

One possibility is that it is not WGCNA at all, but a stale dependency. You could try

trace(loadNamespace,
    tracer=quote(print(package)), 
    exit=quote(print(paste("leaving", package))),
    print=FALSE
)
​library(WGCNA)

it'll print the package names as each is loaded; the output is a bit confusing as one descends through package dependencies repeatedly; mine ends with

[1] "stats"
[1] "leaving stats"
[1] "grDevices"
[1] "leaving grDevices"
[1] "graphics"
[1] "leaving graphics"
[1] "stats"
[1] "leaving stats"
[1] "utils"
[1] "leaving utils"

If yours were to end, immediately before the segfault, with some package other than "utils", then you'd look for the last package that had been entered and not yet left.

 

ADD REPLY
0
Entering edit mode

I would recommend to use the latest R version (and the latest WGCNA version). This seems to be from a problem in the C++ code of WGCNA

ADD REPLY
0
Entering edit mode

I suggest posting this issue on the R-users list (https://www.r-project.org/mail.html). As Luis suggested, try installing the latest version of R since the maintainers of R may not be willing to look into an older version. I personally don't see this bug, but I also don't use CentOS.

Personally, I would try to investigate whether R was compiled using the same compiler version as WGCNA - one possible cause of such segfaults could be incompatible compiler or library versions used for compilation of R and WGCNA. Presumably this would resolve by compiling and installing fresh R.

Peter

ADD REPLY
1
Entering edit mode
@antoinefelden-16088
Last seen 6.3 years ago

Thanks everyone, I did not manage to solve the error with the versions I had already installed, but install and loading went fine using up-to-date R and packages versions. Cheers!

ADD COMMENT

Login before adding your answer.

Traffic: 630 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6