[Rd] R-3.4.3 frequently segfaults on HP-UX 11.31

Dmitry Zotikov xio at ungrund.org
Wed Jan 24 18:38:08 CET 2018


I've built R-3.4.3 on HP-UX 11.31 with GCC-4.9.2.  However, it segfaults
frequently, and I can't clearly understand why.

Some things work, like

> 1+2
[1] 3
> sum(c(1,2))
[1] 3
> var(c(1,2,3))
[1] 1

Some don't:

> pgamma(1,Inf,Inf)
*** caught segfault ***
address d0650000, cause 'invalid permissions'

Traceback:
1: pgamma(1, Inf, Inf)

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: 1
R is aborting now ...
Segmentation fault (core dumped)

The 'cause' may be very different.

GCC's C and C++ compilers were already installed in the system, but I built
gfortran myself.  It didn't work from first time, so I had to experiment with
optimization flags and some other configure keys.  Although compiled through
the proper 3-stage boostrap procedure, I have no certainty that gfortran is
absolutely flawless, and if possible, I'd like to rule it out first.

Here's output from file and ldd (some libs are installed locally to, say,
$LOCAL):

$ file bin/exec/R
bin/exec/R:     ELF-32 executable object file - IA64

$ ldd bin/exec/R

bin/exec/R:
        /usr/lib/hpux32/libpthread.so =>        /usr/lib/hpux32/libpthread.so
        libRblas.sl =>  $LOCAL/var/build/R-3.4.3/lib/libRblas.sl
        libgfortran.so.3 =>     $LOCAL/lib/libgfortran.so.3
        libm.so.1 =>    /usr/lib/hpux32/libm.so.1
        libunwind.so.1 =>       /usr/lib/hpux32/libunwind.so.1
        libdl.so.1 =>   /usr/lib/hpux32/libdl.so.1
        /usr/local/lib/hpux32/libintl.so =>     /usr/local/lib/hpux32/libintl.so
        /usr/local/lib/hpux32/libiconv.so =>    /usr/local/lib/hpux32/libiconv.so
        libpcre.so.3 => $LOCAL/lib/libpcre.so.3
        liblzma.so =>   /usr/local/lib/hpux32/liblzma.so
        libbz2.so =>    /usr/local/lib/hpux32/libbz2.so
        libz.so =>      /usr/local/lib/hpux32/libz.so
        libnsl.so.1 =>  /usr/lib/hpux32/libnsl.so.1
        librt.so.1 =>   /usr/lib/hpux32/librt.so.1
        libc.so.1 =>    /usr/lib/hpux32/libc.so.1
        libgfortran.so.3 =>     $LOCAL/lib/libgfortran.so.3
        libm.so.1 =>    /usr/lib/hpux32/libm.so.1
        libunwind.so.1 =>       /usr/lib/hpux32/libunwind.so.1
        libgcc_s.so.0 =>        $LOCAL/lib/libgcc_s.so.0
        libm.so.1 =>    /usr/lib/hpux32/libm.so.1
        libc.so.1 =>    /usr/lib/hpux32/libc.so.1
        libgcc_s.so.0 =>        $LOCAL/lib/libgcc_s.so.0
        libunwind.so.1 =>       /usr/lib/hpux32/libunwind.so.1
        libuca.so.1 =>  /usr/lib/hpux32/libuca.so.1
        libiconv.so =>  /usr/local/lib/hpux32/libiconv.so
        libc.so.1 =>    /usr/lib/hpux32/libc.so.1
        libc.so.1 =>    /usr/lib/hpux32/libc.so.1
        libpthread.so.1 =>      /usr/lib/hpux32/libpthread.so.1
        libc.so.1 =>    /usr/lib/hpux32/libc.so.1
        libc.so.1 =>    /usr/lib/hpux32/libc.so.1
        libxti.so.1 =>  /usr/lib/hpux32/libxti.so.1
        libdl.so.1 =>   /usr/lib/hpux32/libdl.so.1
        libc.so.1 =>    /usr/lib/hpux32/libc.so.1
        libunwind.so.1 =>       /usr/lib/hpux32/libunwind.so.1

Where should I go looking first?



More information about the R-devel mailing list