Segfault error when loading xcms and mzR packages
0
0
Entering edit mode
pmartin • 0
@pmartin-9886
Last seen 8.1 years ago

Hi,

 

I'm trying to install the bioconductor package, but am unable to load the libraries xcms, mzR, and CAMERA. I am also unable to install the latest versions of the packages Rmpi and RODBC when I try to ugrade to the latest version of Bioconductor using biocLite("BiocUpgrade"), and these are required for CAMERA.

I am running R 3.2.3 on a Mac with El Capitan, and updated to the latest version of R before installing bioconductor. I need to run the packages xcms and CAMERA for some of my analyses.

When I try to load xcms, mzR, or CAMERA, I get a *** caught segfault *** error because "memory not mapped" (details of output are below). Suspecting that it might be because some packages aren't up to date, I tried to upgrade to the latest bioconductor version using

library(BiocInstaller); biocLite("BiocUpgrade")

whereupon I am offered to upgrade to version 2.14 (I'm currently running 2.13). I'm then asked to install the packages Rmpi and RODBC from source, but then I get configuration errors because it can't find the mpi.h header file, and can't find the ODBC headers sql.h and sqlext.h, so I can't upgrade these two packages.

I'll paste the full output I'm getting below, but first is the sessionInfo() output:

 

 


R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.3 (El Capitan)

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] BiocInstaller_1.12.1

loaded via a namespace (and not attached):
[1] tools_3.2.3

 

When trying to load xcms I get the following:

library(xcms)
Loading required package: mzR
Loading required package: Rcpp

 *** caught segfault ***
address 0x18, cause 'memory not mapped'

Traceback:
 1: .Call(symbol)
 2: Module(m, pkg, mustStart = TRUE)
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: tryCatch({    mod <- Module(m, pkg, mustStart = TRUE)    if (isTRUE(direct)) {        populate(mod, ns)    }    else {        forceAssignInNamespace(m, mod, ns)    }    assign(.moduleMetaName(m), mod, envir = ns)}, error = function(e) {    stop(sprintf("failed to load module %s from package %s\n%s",         m, pkg, conditionMessage(e)))})
 7: loadRcppModules()
 8: fun(libname, pkgname)
 9: doTryCatch(return(expr), name, parentenv, handler)
10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
11: tryCatchList(expr, classes, parentenv, handlers)
12: tryCatch(fun(libname, pkgname), error = identity)
13: runHook(".onLoad", env, package.lib, package)
14: loadNamespace(package, c(which.lib.loc, lib.loc))
15: doTryCatch(return(expr), name, parentenv, handler)
16: tryCatchOne(expr, names, parentenv, handlers[[1L]])
17: tryCatchList(expr, classes, parentenv, handlers)
18: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        msg <- conditionMessage(e)        sm <- strsplit(msg, "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && identical(getOption("show.error.messages"),         TRUE)) {        cat(msg, file = stderr())        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
19: try({    ns <- loadNamespace(package, c(which.lib.loc, lib.loc))    env <- attachNamespace(ns, pos = pos, deps)})
20: library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc,     quietly = quietly)
21: .getRequiredPackages2(pkgInfo, quietly = quietly)
22: library(xcms)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
 

 

With mzR I get the following:

 

library(mzR)
Loading required package: Rcpp

 *** caught segfault ***
address 0x18, cause 'memory not mapped'

Traceback:
 1: .Call(symbol)
 2: Module(m, pkg, mustStart = TRUE)
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: tryCatch({    mod <- Module(m, pkg, mustStart = TRUE)    if (isTRUE(direct)) {        populate(mod, ns)    }    else {        forceAssignInNamespace(m, mod, ns)    }    assign(.moduleMetaName(m), mod, envir = ns)}, error = function(e) {    stop(sprintf("failed to load module %s from package %s\n%s",         m, pkg, conditionMessage(e)))})
 7: loadRcppModules()
 8: fun(libname, pkgname)
 9: doTryCatch(return(expr), name, parentenv, handler)
10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
11: tryCatchList(expr, classes, parentenv, handlers)
12: tryCatch(fun(libname, pkgname), error = identity)
13: runHook(".onLoad", env, package.lib, package)
14: loadNamespace(package, c(which.lib.loc, lib.loc))
15: doTryCatch(return(expr), name, parentenv, handler)
16: tryCatchOne(expr, names, parentenv, handlers[[1L]])
17: tryCatchList(expr, classes, parentenv, handlers)
18: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        msg <- conditionMessage(e)        sm <- strsplit(msg, "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && identical(getOption("show.error.messages"),         TRUE)) {        cat(msg, file = stderr())        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
19: try({    ns <- loadNamespace(package, c(which.lib.loc, lib.loc))    env <- attachNamespace(ns, pos = pos, deps)})
20: library(mzR)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
 

 

With CAMERA I get the following:

library(CAMERA)

Loading required package: Biobase
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 object is masked from ‘package:stats’:

    xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, as.vector, cbind, colnames, duplicated, eval, evalq, Filter, Find, get, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce, rep.int, rownames, sapply, setdiff, sort, table, tapply, union, unique, unlist

Welcome to Bioconductor

    Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see 'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: xcms
Loading required package: mzR
Loading required package: Rcpp

 *** caught segfault ***
address 0x18, cause 'memory not mapped'

Traceback:
 1: .Call(symbol)
 2: Module(m, pkg, mustStart = TRUE)
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: tryCatch({    mod <- Module(m, pkg, mustStart = TRUE)    if (isTRUE(direct)) {        populate(mod, ns)    }    else {        forceAssignInNamespace(m, mod, ns)    }    assign(.moduleMetaName(m), mod, envir = ns)}, error = function(e) {    stop(sprintf("failed to load module %s from package %s\n%s",         m, pkg, conditionMessage(e)))})
 7: loadRcppModules()
 8: fun(libname, pkgname)
 9: doTryCatch(return(expr), name, parentenv, handler)
10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
11: tryCatchList(expr, classes, parentenv, handlers)
12: tryCatch(fun(libname, pkgname), error = identity)
13: runHook(".onLoad", env, package.lib, package)
14: loadNamespace(package, c(which.lib.loc, lib.loc))
15: doTryCatch(return(expr), name, parentenv, handler)
16: tryCatchOne(expr, names, parentenv, handlers[[1L]])
17: tryCatchList(expr, classes, parentenv, handlers)
18: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        msg <- conditionMessage(e)        sm <- strsplit(msg, "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && identical(getOption("show.error.messages"),         TRUE)) {        cat(msg, file = stderr())        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
19: try({    ns <- loadNamespace(package, c(which.lib.loc, lib.loc))    env <- attachNamespace(ns, pos = pos, deps)})
20: library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc,     quietly = quietly)
21: .getRequiredPackages2(pkgInfo, quietly = quietly)
22: library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc,     quietly = quietly)
23: .getRequiredPackages2(pkgInfo, quietly = quietly)
24: library(CAMERA)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
 

 

I'd be very grateful for advice on how I can get these packages to work.

Thanks in advance,

Patrick

 

software error mzr xcms • 2.3k views
ADD COMMENT
0
Entering edit mode

I'm not sure what makes you think you have Bioconductor version 2.14. Your version of R and BiocInstaller indicate you are running Bioconductor 3.2. Try starting R like this:

R --vanilla

To make sure no packages are loaded when you start R (it won't run .Rprofile, etc.).

Then run 

biocLite()

without arguments.

If you are asked to install any packages from source, say no. You may not get the latest versions but you won't get any compilation errors either,

 

ADD REPLY
0
Entering edit mode

Hi Dan,

Thanks for the reply. When I enter the source command for the bioconductor site I'm told that I am running version 2.13 and that there is a new version, 2.14, available. That did confuse me, because I thought that the latest version is 3.2.

Anyway, I did what you suggested, and opened R from the terminal, but I get exactly the same errors, including the segfault error when I try to open the xcms package. Output copied below.

 

$ R --vanilla

 

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"

Copyright (C) 2015 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin13.4.0 (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.

 

> .Rprofile()

Error: could not find function ".Rprofile"

> source("https://bioconductor.org/biocLite.R")

Bioconductor version 2.13 (BiocInstaller 1.12.1), ?biocLite for help

A newer version of Bioconductor is available for this version of R,

  ?BiocUpgrade for help

> biocLite()

BioC_mirror: http://bioconductor.org

Using Bioconductor version 2.13 (BiocInstaller 1.12.1), R version 3.2.3.

Temporarily using Bioconductor version 2.13

Old packages: 'Rmpi', 'RODBC'

Update all/some/none? [a/s/n]: a

Warning: unable to access index for repository http://bioconductor.org/packages/2.13/bioc/bin/macosx/mavericks/contrib/3.2:

  cannot open URL 'http://bioconductor.org/packages/2.13/bioc/bin/macosx/mavericks/contrib/3.2/PACKAGES'

Warning: unable to access index for repository http://bioconductor.org/packages/2.13/data/annotation/bin/macosx/mavericks/contrib/3.2:

  cannot open URL 'http://bioconductor.org/packages/2.13/data/annotation/bin/macosx/mavericks/contrib/3.2/PACKAGES'

Warning: unable to access index for repository http://bioconductor.org/packages/2.13/data/experiment/bin/macosx/mavericks/contrib/3.2:

  cannot open URL 'http://bioconductor.org/packages/2.13/data/experiment/bin/macosx/mavericks/contrib/3.2/PACKAGES'

Warning: unable to access index for repository http://bioconductor.org/packages/2.13/extra/bin/macosx/mavericks/contrib/3.2:

  cannot open URL 'http://bioconductor.org/packages/2.13/extra/bin/macosx/mavericks/contrib/3.2/PACKAGES'

Packages which are only available in source form, and may need

  compilation of C/C++/Fortran: ‘Rmpi’ ‘RODBC’

Do you want to attempt to install these from sources?

y/n: n

> library(xcms)

Loading required package: mzR

Loading required package: Rcpp

 

 *** caught segfault ***

address 0x18, cause 'memory not mapped'

 

Traceback:

 1: .Call(symbol)

 2: Module(m, pkg, mustStart = TRUE)

 3: doTryCatch(return(expr), name, parentenv, handler)

 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])

 5: tryCatchList(expr, classes, parentenv, handlers)

 6: tryCatch({    mod <- Module(m, pkg, mustStart = TRUE)    if (isTRUE(direct)) {        populate(mod, ns)    }    else {        forceAssignInNamespace(m, mod, ns)    }    assign(.moduleMetaName(m), mod, envir = ns)}, error = function(e) {    stop(sprintf("failed to load module %s from package %s\n%s",         m, pkg, conditionMessage(e)))})

 7: loadRcppModules()

 8: fun(libname, pkgname)

 9: doTryCatch(return(expr), name, parentenv, handler)

10: tryCatchOne(expr, names, parentenv, handlers[[1L]])

11: tryCatchList(expr, classes, parentenv, handlers)

12: tryCatch(fun(libname, pkgname), error = identity)

13: runHook(".onLoad", env, package.lib, package)

14: loadNamespace(package, c(which.lib.loc, lib.loc))

15: doTryCatch(return(expr), name, parentenv, handler)

16: tryCatchOne(expr, names, parentenv, handlers[[1L]])

17: tryCatchList(expr, classes, parentenv, handlers)

18: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        msg <- conditionMessage(e)        sm <- strsplit(msg, "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && identical(getOption("show.error.messages"),         TRUE)) {        cat(msg, file = stderr())        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})

19: try({    ns <- loadNamespace(package, c(which.lib.loc, lib.loc))    env <- attachNamespace(ns, pos = pos, deps)})

20: library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc,     quietly = quietly)

21: .getRequiredPackages2(pkgInfo, quietly = quietly)

22: library(xcms)

 

Possible actions:

1: abort (with core dump, if enabled)

2: normal R exit

3: exit R without saving workspace

4: exit R saving workspace

Selection: 

ADD REPLY
0
Entering edit mode

Hmm, the message BiocInstaller is giving you is not consistent with the version shown in your sessionInfo() . I should have told you to do an additional command after starting 

R --vanilla

and before 

source("https://bioconductor.org/bioLite.R")

The additional command is 

remove.packages("BiocInstaller")

Repeat that command until it says there is no such package. Then try 

biocLite()

 

 

ADD REPLY
0
Entering edit mode

Wow, this seems to have fixed it! Removing the package and re-installing Bioconductor has now got me Bioconductor 3.2, and the packages xcms and CAMERA load properly. I declined to install any packages from source, instead using the older versions of those.

I don't understand what the problem was to start with, but I must have clearly ended up with an outdated version of Bioconductor first time round.

Many thanks indeed for your help, Dan!

Patrick

ADD REPLY

Login before adding your answer.

Traffic: 598 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