New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install segfault on CentOS 7.4 #50

Closed
btupper opened this Issue Oct 18, 2018 · 16 comments

Comments

Projects
None yet
6 participants
@btupper

btupper commented Oct 18, 2018

We are unable to install ps on CentOS 7.4 without creating a segfault. This segfault occurs using

$ R CMD INSTALL ps_1.2.0.tar.gz

and

> install.packages("ps")

Note that we have a non-standard install location for R, but we are able to install other packages from CRAN. Full details follow...

[btupper@rshiny ~]$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core) 

[btupper@rshiny ~]$ R --vanilla

R version 3.4.1 (2017-06-30) -- "Single Candle"
Copyright (C) 2017 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.

> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /opt/conda/lib/R/lib/libRblas.so
LAPACK: /opt/conda/lib/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] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.1
> install.packages("ps")
Installing package into ‘/home/btupper/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)

trying URL 'https://mirrors.nics.utk.edu/cran/src/contrib/ps_1.2.0.tar.gz'
Content type 'application/x-gzip' length 259467 bytes (253 KB)
==================================================
downloaded 253 KB

* installing *source* package ‘ps’ ...
** package ‘ps’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/opt/conda/include  -Wall px.c -o px
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c init.c -o init.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c api-common.c -o api-common.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c common.c -o common.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c extra.c -o extra.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c dummy.c -o dummy.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c posix.c -o posix.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c api-posix.c -o api-posix.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c linux.c -o linux.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c api-linux.c -o api-linux.o
gcc -std=gnu99 -shared -L/opt/conda/lib/R/lib -Wl,-rpath,/opt/conda/lib -L/opt/conda/lib -L/opt/conda/lib -lgfortran -o ps.so init.o api-common.o common.o extra.o dummy.o posix.o api-posix.o linux.o api-linux.o -L/opt/conda/lib/R/lib -lR
installing via 'install.libs.R' to /home/btupper/R/x86_64-pc-linux-gnu-library/3.4/ps
** R
** inst
** preparing package for lazy loading
** help

 *** caught segfault ***
address (nil), cause 'unknown'

Traceback:
 1: .Call(ps__init, asNamespace("ps"), ps_env$constants)
 2: fun(libname, pkgname)
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: tryCatch(fun(libname, pkgname), error = identity)
 7: runHook(".onLoad", env, package.lib, package)
 8: loadNamespace(name)
 9: doTryCatch(return(expr), name, parentenv, handler)
10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
11: tryCatchList(expr, classes, parentenv, handlers)
12: tryCatch(loadNamespace(name), error = function(e) stop(e))
13: getNamespace(ns)
14: asNamespace(pkg)
15: get(name, envir = asNamespace(pkg), inherits = FALSE)
16: ps:::decorate_examples
17: eval(expr, env)
18: eval(expr, env)
19: withVisible(eval(expr, env))
20: doTryCatch(return(expr), name, parentenv, handler)
21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
22: tryCatchList(expr, classes, parentenv, handlers)
23: tryCatch(withVisible(eval(expr, env)), error = function(e) e)
24: evalWithOpt(ce, options, env)
25: processRdChunk(block, stage, options, env, macros = macros)
26: recurse(block[[i]])
27: recurse(block[[i]])
28: recurse(block[[i]])
29: recurse(block)
30: getDynamicFlags(block)
31: recurse(block)
32: expandDynamicFlags(recurse(block), options)
33: processRdSexprs(Rd, stage, options, macros = attr(Rd, "macros"))
34: prepare_Rd(f, encoding = encoding, defines = os, stages = stages,     warningCalls = FALSE, stage2 = step > 1L, stage3 = step >         2L, macros = macros)
35: FUN(X[[i]], ...)
36: lapply(files, .fetch_Rd_object)
37: .build_Rd_db(dir, manfiles, db_file = db_file, encoding = encoding,     built_file = built_file)
38: .install_package_Rd_objects(".", instdir, encoding)
39: doTryCatch(return(expr), name, parentenv, handler)
40: tryCatchOne(expr, names, parentenv, handlers[[1L]])
41: tryCatchList(expr, classes, parentenv, handlers)
42: 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 = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
43: try(.install_package_Rd_objects(".", instdir, encoding))
44: do_install_source(pkg_name, instdir, pkg, desc)
45: do_install(pkg)
46: tools:::.install_packages()
An irrecoverable exception occurred. R is aborting now ...
/opt/conda/lib/R/bin/INSTALL: line 34: 25806 Done                    echo 'tools:::.install_packages()'
     25807 Segmentation fault      | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --slave --args ${args}

The downloaded source packages are in
	‘/tmp/RtmpUkBOur/downloaded_packages’
Warning message:
In install.packages("ps") :
  installation of package ‘ps’ had non-zero exit status
@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Oct 18, 2018

Can you try to get a stack trace in C? Maybe by installing the package with R CMD INSTALL --no-test-load, and then loading it after starting R in R -d gdb.

@btupper

This comment has been minimized.

btupper commented Oct 18, 2018

Thanks for getting right back to me. It seems to trip at the same spot.

[btupper@rshiny ~]$ R CMD INSTALL --no-test-load ps_1.2.0.tar.gz 
* installing to library ‘/home/btupper/R/x86_64-pc-linux-gnu-library/3.4’
* installing *source* package ‘ps’ ...
** package ‘ps’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/opt/conda/include  -Wall px.c -o px
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c init.c -o init.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c api-common.c -o api-common.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c common.c -o common.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c extra.c -o extra.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c dummy.c -o dummy.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c posix.c -o posix.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c api-posix.c -o api-posix.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c linux.c -o linux.o
gcc -std=gnu99 -I/opt/conda/lib/R/include -DNDEBUG   -I/opt/conda/include   -fpic  -I/opt/conda/include  -c api-linux.c -o api-linux.o
gcc -std=gnu99 -shared -L/opt/conda/lib/R/lib -Wl,-rpath,/opt/conda/lib -L/opt/conda/lib -L/opt/conda/lib -lgfortran -o ps.so init.o api-common.o common.o extra.o dummy.o posix.o api-posix.o linux.o api-linux.o -L/opt/conda/lib/R/lib -lR
installing via 'install.libs.R' to /home/btupper/R/x86_64-pc-linux-gnu-library/3.4/ps
** R
** inst
** preparing package for lazy loading
** help

 *** caught segfault ***
address (nil), cause 'unknown'

Traceback:
 1: .Call(ps__init, asNamespace("ps"), ps_env$constants)
 2: fun(libname, pkgname)
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: tryCatch(fun(libname, pkgname), error = identity)
 7: runHook(".onLoad", env, package.lib, package)
 8: loadNamespace(name)
 9: doTryCatch(return(expr), name, parentenv, handler)
10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
11: tryCatchList(expr, classes, parentenv, handlers)
12: tryCatch(loadNamespace(name), error = function(e) stop(e))
13: getNamespace(ns)
14: asNamespace(pkg)
15: get(name, envir = asNamespace(pkg), inherits = FALSE)
16: ps:::decorate_examples
17: eval(expr, env)
18: eval(expr, env)
19: withVisible(eval(expr, env))
20: doTryCatch(return(expr), name, parentenv, handler)
21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
22: tryCatchList(expr, classes, parentenv, handlers)
23: tryCatch(withVisible(eval(expr, env)), error = function(e) e)
24: evalWithOpt(ce, options, env)
25: processRdChunk(block, stage, options, env, macros = macros)
26: recurse(block[[i]])
27: recurse(block[[i]])
28: recurse(block[[i]])
29: recurse(block)
30: getDynamicFlags(block)
31: recurse(block)
32: expandDynamicFlags(recurse(block), options)
33: processRdSexprs(Rd, stage, options, macros = attr(Rd, "macros"))
34: prepare_Rd(f, encoding = encoding, defines = os, stages = stages,     warningCalls = FALSE, stage2 = step > 1L, stage3 = step >         2L, macros = macros)
35: FUN(X[[i]], ...)
36: lapply(files, .fetch_Rd_object)
37: .build_Rd_db(dir, manfiles, db_file = db_file, encoding = encoding,     built_file = built_file)
38: .install_package_Rd_objects(".", instdir, encoding)
39: doTryCatch(return(expr), name, parentenv, handler)
40: tryCatchOne(expr, names, parentenv, handlers[[1L]])
41: tryCatchList(expr, classes, parentenv, handlers)
42: 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 = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
43: try(.install_package_Rd_objects(".", instdir, encoding))
44: do_install_source(pkg_name, instdir, pkg, desc)
45: do_install(pkg)
46: tools:::.install_packages()
An irrecoverable exception occurred. R is aborting now ...
/opt/conda/lib/R/bin/INSTALL: line 34: 25970 Done                    echo 'tools:::.install_packages()'
     25971 Segmentation fault      | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --slave --args ${args}
@florianduclot

This comment has been minimized.

florianduclot commented Oct 18, 2018

Hi @gaborcsardi, I too have the same issue on a similar system as @btupper. After following your instructions, here's the stack trace I could get:

R version 3.5.0 (2018-04-23) -- "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.

Missing separate debuginfo for /usr/lib64/gconv/ISO8859-1.so
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/39/1dde64e1d823f6884c58d19747345078054ad0.debug
  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.

> library(ps)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5840faf in __strlen_sse42 () from /gpfs/home/fduclot/lib64/libc.so.6
(gdb)
@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Oct 18, 2018

At the gdb prompt can you type bt + ENTER, and then send me the output? Thanks.

@florianduclot

This comment has been minimized.

florianduclot commented Oct 18, 2018

> library(ps)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5840faf in __strlen_sse42 () from /gpfs/home/fduclot/lib64/libc.so.6
(gdb) bt
#0  0x00007ffff5840faf in __strlen_sse42 () from /gpfs/home/fduclot/lib64/libc.so.6
#1  0x00000000004d179c in Rf_mkChar ()
#2  0x00007fffebb8ac61 in ps__build_string () from /gpfs/home/fduclot/R/lib64/R/library/ps/libs/ps.so
#3  0x00007fffebb8f022 in ps__define_tcp_statuses () from /gpfs/home/fduclot/R/lib64/R/library/ps/libs/ps.so
#4  0x00007fffebb8f17e in ps__init () from /gpfs/home/fduclot/R/lib64/R/library/ps/libs/ps.so
#5  0x00000000004906a3 in R_doDotCall ()
#6  0x00000000004f7f10 in bcEval ()
#7  0x00000000004d9801 in Rf_eval ()
#8  0x00000000004dbc5c in R_execClosure ()
#9  0x00000000004db9b4 in Rf_applyClosure ()
#10 0x00000000004ea9ce in bcEval ()
#11 0x00000000004d9801 in Rf_eval ()
#12 0x00000000004d958c in forcePromise ()
#13 0x00000000004e2af6 in FORCE_PROMISE ()
#14 0x00000000004e2cbe in getvar ()
#15 0x00000000004e8439 in bcEval ()
#16 0x00000000004d9801 in Rf_eval ()
#17 0x00000000004d958c in forcePromise ()
#18 0x00000000004e2af6 in FORCE_PROMISE ()
#19 0x00000000004e2cbe in getvar ()
#20 0x00000000004e8439 in bcEval ()
#21 0x00000000004d9801 in Rf_eval ()
#22 0x00000000004d958c in forcePromise ()
#23 0x00000000004e2af6 in FORCE_PROMISE ()
#24 0x00000000004e2cbe in getvar ()
#25 0x00000000004e8439 in bcEval ()
#26 0x00000000004d9801 in Rf_eval ()
#27 0x00000000004d958c in forcePromise ()
#28 0x00000000004e2af6 in FORCE_PROMISE ()
#29 0x00000000004e2cbe in getvar ()
#30 0x00000000004e8439 in bcEval ()
#31 0x00000000004d9801 in Rf_eval ()
#32 0x00000000004dbc5c in R_execClosure ()
#33 0x00000000004db9b4 in Rf_applyClosure ()
#34 0x00000000004ea9ce in bcEval ()
#35 0x00000000004d9801 in Rf_eval ()
#36 0x00000000004dbc5c in R_execClosure ()
#37 0x00000000004db9b4 in Rf_applyClosure ()
#38 0x00000000004ea9ce in bcEval ()
#39 0x00000000004d9801 in Rf_eval ()
#40 0x00000000004dbc5c in R_execClosure ()
#41 0x00000000004db9b4 in Rf_applyClosure ()
#42 0x00000000004ea9ce in bcEval ()
#43 0x00000000004d9801 in Rf_eval ()
#44 0x00000000004dbc5c in R_execClosure ()
#45 0x00000000004db9b4 in Rf_applyClosure ()
#46 0x00000000004ea9ce in bcEval ()
#47 0x00000000004d9801 in Rf_eval ()
#48 0x00000000004dbc5c in R_execClosure ()
#49 0x00000000004db9b4 in Rf_applyClosure ()
#50 0x00000000004ea9ce in bcEval ()
#51 0x00000000004d9801 in Rf_eval ()
#52 0x00000000004dbc5c in R_execClosure ()
#53 0x00000000004db9b4 in Rf_applyClosure ()
#54 0x00000000004ea9ce in bcEval ()
#55 0x00000000004d9801 in Rf_eval ()
#56 0x00000000004d958c in forcePromise ()
#57 0x00000000004e2af6 in FORCE_PROMISE ()
#58 0x00000000004e2cbe in getvar ()
#59 0x00000000004e8439 in bcEval ()
#60 0x00000000004d9801 in Rf_eval ()
#61 0x00000000004d958c in forcePromise ()
#62 0x00000000004e2af6 in FORCE_PROMISE ()
#63 0x00000000004e2cbe in getvar ()
#64 0x00000000004e8439 in bcEval ()
#65 0x00000000004d9801 in Rf_eval ()
#66 0x00000000004d958c in forcePromise ()
#67 0x00000000004e2af6 in FORCE_PROMISE ()
#68 0x00000000004e2cbe in getvar ()
#69 0x00000000004e8439 in bcEval ()
#70 0x00000000004d9801 in Rf_eval ()
#71 0x00000000004d958c in forcePromise ()
#72 0x00000000004e2af6 in FORCE_PROMISE ()
#73 0x00000000004e2cbe in getvar ()
#74 0x00000000004e8439 in bcEval ()
#75 0x00000000004d9801 in Rf_eval ()
#76 0x00000000004dbc5c in R_execClosure ()
#77 0x00000000004db9b4 in Rf_applyClosure ()
#78 0x00000000004ea9ce in bcEval ()
#79 0x00000000004d9801 in Rf_eval ()
#80 0x00000000004dbc5c in R_execClosure ()
#81 0x00000000004db9b4 in Rf_applyClosure ()
#82 0x00000000004ea9ce in bcEval ()
#83 0x00000000004d9801 in Rf_eval ()
#84 0x00000000004dbc5c in R_execClosure ()
#85 0x00000000004db9b4 in Rf_applyClosure ()
#86 0x00000000004ea9ce in bcEval ()
#87 0x00000000004d9801 in Rf_eval ()
#88 0x00000000004dbc5c in R_execClosure ()
#89 0x00000000004db9b4 in Rf_applyClosure ()
#90 0x00000000004ea9ce in bcEval ()
#91 0x00000000004d9801 in Rf_eval ()
#92 0x00000000004dbc5c in R_execClosure ()
#93 0x00000000004db9b4 in Rf_applyClosure ()
#94 0x00000000004d9ec7 in Rf_eval ()
#95 0x000000000051b69e in Rf_ReplIteration ()
#96 0x000000000051b83b in R_ReplConsole ()
#97 0x000000000051cfaa in run_Rmainloop ()
#98 0x000000000051cfbf in Rf_mainloop ()
#99 0x000000000041831c in main ()
@dewittpe

This comment has been minimized.

dewittpe commented Oct 22, 2018

I've got the same general issue on Debian 9.5. One difference, R CMD INSTALL --no-test-load ps_1.1.0.tar.gz results in a segfault. ps_1.0.0.tar.gz installs without any issue.

dewittp@debian-9-alienware [~] 
$ cat .R/Makevars
CC=ccache clang -Qunused-arguments
CXX=ccache clang++ -Qunused-arguments
CCACHE_CPP=yes

dewittp@debian-9-alienware [~] 
$ wget https://cran.r-project.org/src/contrib/ps_1.2.0.tar.gz
--2018-10-22 09:22:08--  https://cran.r-project.org/src/contrib/ps_1.2.0.tar.gz
Resolving cran.r-project.org (cran.r-project.org)... 137.208.57.37
Connecting to cran.r-project.org (cran.r-project.org)|137.208.57.37|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 259467 (253K) [application/x-gzip]
Saving to: ‘ps_1.2.0.tar.gz’

ps_1.2.0.tar.gz                     100%[=================================================================>] 253.39K   437KB/s    in 0.6s

2018-10-22 09:22:12 (437 KB/s) - ‘ps_1.2.0.tar.gz’ saved [259467/259467]


dewittp@debian-9-alienware [~] 
$ R CMD INSTALL --no-test-load ps_1.2.0.tar.gz
* installing to library ‘/home/dewittp/R-dev/R-3.5.1/library’
* installing *source* package ‘ps’ ...
** package ‘ps’ successfully unpacked and MD5 sums checked
** libs
ccache clang -Qunused-arguments -g -O2  -Wall px.c -o px
ccache clang -Qunused-arguments -I"/home/dewittp/R-dev/R-3.5.1/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c init.c -o init.o
ccache clang -Qunused-arguments -I"/home/dewittp/R-dev/R-3.5.1/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c api-common.c -o api-common.o
ccache clang -Qunused-arguments -I"/home/dewittp/R-dev/R-3.5.1/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c common.c -o common.o
ccache clang -Qunused-arguments -I"/home/dewittp/R-dev/R-3.5.1/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c extra.c -o extra.o
ccache clang -Qunused-arguments -I"/home/dewittp/R-dev/R-3.5.1/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c dummy.c -o dummy.o
ccache clang -Qunused-arguments -I"/home/dewittp/R-dev/R-3.5.1/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c posix.c -o posix.o
ccache clang -Qunused-arguments -I"/home/dewittp/R-dev/R-3.5.1/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c api-posix.c -o api-posix.o
ccache clang -Qunused-arguments -I"/home/dewittp/R-dev/R-3.5.1/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c linux.c -o linux.o
ccache clang -Qunused-arguments -I"/home/dewittp/R-dev/R-3.5.1/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c api-linux.c -o api-linux.o
ccache clang -Qunused-arguments -shared -L/home/dewittp/R-dev/R-3.5.1/lib -L/usr/local/lib -o ps.so init.o api-common.o common.o extra.o dummy.o posix.o api-posix.o linux.o api-linux.o -L/home/dewittp/R-dev/R-3.5.1/lib -lR
installing via 'install.libs.R' to /home/dewittp/R-dev/R-3.5.1/library/ps
** R
** inst
** byte-compile and prepare package for lazy loading
** help

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

Traceback:
 1: fun(libname, pkgname)
 2: doTryCatch(return(expr), name, parentenv, handler)
 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 4: tryCatchList(expr, classes, parentenv, handlers)
 5: tryCatch(fun(libname, pkgname), error = identity)
 6: runHook(".onLoad", env, package.lib, package)
 7: loadNamespace(name)
 8: doTryCatch(return(expr), name, parentenv, handler)
 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
10: tryCatchList(expr, classes, parentenv, handlers)
11: tryCatch(loadNamespace(name), error = function(e) stop(e))
12: getNamespace(ns)
13: asNamespace(pkg)
14: get(name, envir = asNamespace(pkg), inherits = FALSE)
15: ps:::decorate_examples
16: eval(expr, env)
17: eval(expr, env)
18: withVisible(eval(expr, env))
19: doTryCatch(return(expr), name, parentenv, handler)
20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
21: tryCatchList(expr, classes, parentenv, handlers)
22: tryCatch(withVisible(eval(expr, env)), error = function(e) e)
23: evalWithOpt(ce, options, env)
24: processRdChunk(block, stage, options, env, macros = macros)
25: recurse(block[[i]])
26: recurse(block[[i]])
27: recurse(block[[i]])
28: recurse(block)
29: getDynamicFlags(block)
30: recurse(block)
31: expandDynamicFlags(recurse(block), options)
32: processRdSexprs(Rd, stage, options, macros = attr(Rd, "macros"))
33: prepare_Rd(f, encoding = encoding, defines = os, stages = stages,     warningCalls = FALSE, stage2 = step > 1L, stage3 = step >         2L, macros = macros)
34: FUN(X[[i]], ...)
35: lapply(files, .fetch_Rd_object)
36: .build_Rd_db(dir, manfiles, db_file = db_file, encoding = encoding,     built_file = built_file)
37: .install_package_Rd_objects(".", instdir, encoding)
38: doTryCatch(return(expr), name, parentenv, handler)
39: tryCatchOne(expr, names, parentenv, handlers[[1L]])
40: tryCatchList(expr, classes, parentenv, handlers)
41: 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     sm <- strsplit(conditionMessage(e), "\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 && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }  invisible(structure(msg, class = "try-error", condition = e))})
42: try(.install_package_Rd_objects(".", instdir, encoding))
43: do_install_source(pkg_name, instdir, pkg, desc)
44: do_install(pkg)
45: tools:::.install_packages()
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault
@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Oct 22, 2018

Can you try to remove the previous installation of ps, and then install 1.2.0?

@dewittpe

This comment has been minimized.

dewittpe commented Oct 22, 2018

@gaborcsardi, Unfortunately the error persists. Version 1.0.0 and 1.1.0 install and uninstall without any issue. v 1.2.0 generates the segfault.

@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Oct 25, 2018

I have a guess why this is happening, but just can't reproduce it. :( Anyone happen to have a Docker container that produces this?

@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Oct 25, 2018

@btupper @florianduclot @dewittpe @tungmilan Can you please try the latest GH version, that should fix it. Thanks!

@dewittpe

This comment has been minimized.

dewittpe commented Oct 25, 2018

2a2b75c builds and install without any issues on my system. Thank you, @gaborcsardi, for the quick fix.

@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Oct 25, 2018

Thanks for checking! I'll make a new release today or tomorrow.

@florianduclot

This comment has been minimized.

florianduclot commented Oct 25, 2018

Works for me too, @gaborcsardi .

Thanks!

@tungmilan

This comment has been minimized.

tungmilan commented Oct 25, 2018

Thanks for the quick fix @gaborcsardi !

gaborcsardi added a commit that referenced this issue Oct 25, 2018

@btupper

This comment has been minimized.

btupper commented Oct 25, 2018

@mjsteinbaugh

This comment has been minimized.

mjsteinbaugh commented Nov 5, 2018

I can confirm that rolling back to ps v1.1.0 works on CentOS 7. v1.2.0 specifically results in the segfault error. Thanks @gaborcsardi for the quick patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment