caught segfault - 'memory not mapped' error in R

后端 未结 3 1676
自闭症患者
自闭症患者 2021-02-12 13:26

I have a problem running some R scripts on our cluster. The problems appeared suddenly (all the scripts were working just fine but one day they started giving a caught seg

3条回答
  •  长情又很酷
    2021-02-12 14:08

    The problem is a mismatch between currently installed shared libraries and the libraries that were built to install R or packages.

    I got this error for the first time today. See below. I've solved it, can explain situation.

    This is an Ubuntu system that was recently upgraded from 17.10 to 18.04, running R-3.4.4. A lot of C and C++ libraries were replaced. But not all programs were replaced. Immediately I noticed that lots of programs were getting segmentation faults. Anything that touched the tidyverse was a fail. The stringi package could not find the shared libraries with which it was compiled.

    The example here is a bit interesting because it happens when running the "R CMD check" for a package, which, at least in theory, should be safe. I found the fix was to remove the packages "RCurl" and "url" and rebuild them.

    Here's the symptom, anyway

    * checking for file ‘kutils.gitex/DESCRIPTION’ ... OK
    * preparing ‘kutils’:
    * checking DESCRIPTION meta-information ... OK
    * installing the package to build vignettes
    * creating vignettes ... OK
    * checking for LF line-endings in source and make files and shell scripts
    * checking for empty or unneeded directories
    * looking to see if a ‘data/datalist’ file should be added
    * re-saving image files
    * building ‘kutils_1.40.tar.gz’
    Warning: invalid uid value replaced by that for user 'nobody'
    Warning: invalid gid value replaced by that for user 'nobody'
    
    Run check: OK? (y or n)y
    * using log directory ‘/home/pauljohn/GIT/CRMDA/software/kutils/package/kutils.Rcheck’
    * using R version 3.4.4 (2018-03-15)
    * using platform: x86_64-pc-linux-gnu (64-bit)
    * using session charset: UTF-8
    * using option ‘--as-cran’
    * checking for file ‘kutils/DESCRIPTION’ ... OK
    * checking extension type ... Package
    * this is package ‘kutils’ version ‘1.40’
    * checking CRAN incoming feasibility ...
     *** caught segfault ***
    address 0x68456, cause 'memory not mapped'
    
    Traceback:
     1: curlGetHeaders(u)
     2: doTryCatch(return(expr), name, parentenv, handler)
     3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     4: tryCatchList(expr, classes, parentenv, handlers)
     5: tryCatch(curlGetHeaders(u), error = identity)
     6: .fetch(u)
     7: .check_http_A(u)
     8: FUN(X[[i]], ...)
     9: lapply(urls[pos], .check_http)
    10: do.call(rbind, lapply(urls[pos], .check_http))
    11: check_url_db(url_db_from_package_sources(dir), remote = !localOnly)
    12: doTryCatch(return(expr), name, parentenv, handler)
    13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    14: tryCatchList(expr, classes, parentenv, handlers)
    15: tryCatch(check_url_db(url_db_from_package_sources(dir), remote = !localOnly),     error = identity)
    16: .check_package_CRAN_incoming(pkgdir, localOnly)
    17: check_CRAN_incoming(!check_incoming_remote)
    18: tools:::.check_packages()
    An irrecoverable exception occurred. R is aborting now ...
    Segmentation fault
    

提交回复
热议问题