bugGNU Octave - Bugs: bug #33927, Immediate "segmentation...

 
 

bug #33927: Immediate "segmentation fault" when running octave 3.4.2 on CentOS 5.6

Submitter:  Frank Thommen <fthommen>
Submitted:  Tue 02 Aug 2011 11:16:39 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  jordigh
Originator Name:  Frank Thommen Open/Closed:  * Closed
Release:  * 3.4.2 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 29 Feb 2012 06:38:45 PM UTC, comment #9: 

gcc 4.1.2 seems to work.  No immediate crash!
Thanks...

Ken

Ken Nishimura <nishimur>
Wed 29 Feb 2012 04:46:13 AM UTC, comment #8: 

3.6.1 has a patch specifically for the seg fault
problem when compiling on RHEL 5 using gcc 4.1.2.
I compiled it on a RHEL 5 system and it runs correctly.
The RHEL 5 system that I used is at the current update
level from RedHat.  This might be relevant.

Michael Godfrey <godfrey>
Group Member
Wed 29 Feb 2012 04:31:27 AM UTC, comment #7: 

I would love to test this, but I've now spent way too many hours
trying to fight a compile issue.  I am running stock RHEL5, so the gcc is old (4.1.2), so in keeping with the request, I retrieved and compiled (successfully, I hope) gcc 4.6.2.  I am trying to compile octave 3.6.1 using this 4.6.2 gcc package and end up in shared library hell.

The operative error is of the form:
/mnt/dogbert.tmp2/octave-3.6.1/src/.libs/lt-octave:
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /mnt/dogbert.tmp2/octave-3.6.1/src/.libs/liboctinterp.so.1)
/mnt/dogbert.tmp2/octave-3.6.1/src/.libs/lt-octave:
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /mnt/dogbert.tmp2/octave-3.6.1/src/.libs/liboctinterp.so.1)
/mnt/dogbert.tmp2/octave-3.6.1/src/.libs/lt-octave:
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /mnt/dogbert.tmp2/octave-3.6.1/src/.libs/liboctinterp.so.1)
/mnt/dogbert.tmp2/octave-3.6.1/src/.libs/lt-octave:
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /mnt/dogbert.tmp2/octave-3.6.1/liboctave/.libs/liboctave.so.1)
/*mnt/dogbert.tmp2/octave-3.6.1/src/.libs/lt-octave:
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /mnt/dogbert.tmp2/octave-3.6.1/liboctave/.libs/liboctave.so.1)


The configure command for octave attempted to use rpath....

$ ./configure GCC=/opt/gcc-4.6.2/bin/gcc-4.6.2 CXX=/opt/gcc-4.6.2/bin/g++-4.6.2 F77=/opt/gcc-4.6.2/bin/gfortran-4.6.2 LDFLAGS=-Wl,-rpath -Wl,/opt/gcc-4.6.2/lib64 -Wl,-rpath-link -Wl,/opt/gcc-4.6.2/lib64 -L/opt/gcc-4.6.2/lib64
--prefix=/opt/octave-3.6.1 --without-curl


ldd of liboctave/.libs/liboctave.so.1 shows:

libstdc++.so.6 (CXXABI_1.3.1) => /opt/gcc-4.6.2/lib/../lib64/libstdc++.so.6
                libstdc++.so.6 (GLIBCXX_3.4.9) =>
/opt/gcc-4.6.2/lib/../lib64/libstdc++.so.6
                libstdc++.so.6 (CXXABI_1.3) =>
/opt/gcc-4.6.2/lib/../lib64/libstdc++.so.6
    *            libstdc++.so.6 (GLIBCXX_3.4.15) =>
/opt/gcc-4.6.2/lib/../lib64/libstdc++.so.6*
                libstdc++.so.6 (GLIBCXX_3.4) =>
/opt/gcc-4.6.2/lib/../lib64/libstdc++.so.6
        /mnt/dogbert.tmp2/octave-3.6.1/libcruft/.libs/libcruft.so.1:
                libstdc++.so.6 (CXXABI_1.3) =>
/opt/gcc-4.6.2/lib/../lib64/libstdc++.so.6
                libstdc++.so.6 (GLIBCXX_3.4) =>
/opt/gcc-4.6.2/lib/../lib64/libstdc++.so.6


shows that the rpath is working, but still, it keeps going back to the original /usr/lib64/libstdc++.so.6 library which is OLD.

What is wrong here?

Ken


Ken Nishimura <nishimur>
Mon 27 Feb 2012 05:55:09 PM UTC, comment #6: 

Can the reporter verify whether this is still a problem with a recent version of gcc and the latest Octave source code (3.6.1)?

Rik <rik5>
Group administrator
Wed 10 Aug 2011 10:05:44 PM UTC, comment #5: 

Note that RH 5.7 ships with gcc 4.1.2...

Ken Nishimura <nishimur>
Wed 10 Aug 2011 04:25:27 PM UTC, comment #4: 

I think this is a duplicate of

https://savannah.gnu.org/bugs/?func=detailitem&item_id=30685#options

In that report, the problem was occurring with old versions of GCC (4.1.x and 4.2.x) but not newer ones, so I'm surprised that the problem is happening now with GCC 4.4.x.

John W. Eaton <jwe>
Group administrator
Tue 09 Aug 2011 11:31:28 PM UTC, comment #3: 

FWIW, I have the exact same problem after compiling 3.4.2 in a RedHat 5.7 environment.  The backtrace is:

(gdb) bt
#0  0x00002aaaabacac28 in sigemptyset ()
   from /mnt/dogbert.tmp2/octave-3.4.2/src/.libs/liboctinterp.so.0
#1  0x00002aaaab07e4a1 in octave_set_signal_handler (sig=2,
    handler=0x2aaaab07ea10 <sigint_handler(int)>, restart_syscalls=true)
    at sighandlers.cc:225
#2  0x00002aaaab07e56a in octave_catch_interrupts () at sighandlers.cc:460
#3  0x00002aaaab07e5d3 in install_signal_handlers () at sighandlers.cc:529
#4  0x00002aaaab050ef7 in octave_main (argc=6, argv=0x7fffffffd858, embedded=0)
    at octave.cc:665
#5  0x000000336901d994 in __libc_start_main () from /lib64/libc.so.6
#6  0x0000000000400639 in _start ()

Machine is:

Linux vienna 2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

Sorry the code isn't inline, but I can't find the magic widget!



Ken Nishimura <nishimur>
Wed 03 Aug 2011 11:21:49 AM UTC, comment #2: 

[that's why I spoke about a "strace output" and not a "stack trace" in my original post :-)]

Here is the stack trace.  HTH


octave-3.4.2 > ./run-octave -g
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-32.el5_6.2)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/.libs/lt-octave...done.
(gdb) run
Starting program: /g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/.libs/lt-octave --no-init-path --path=/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/test:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/sparse:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/elfun:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/path:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/strings:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/signal:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/startup:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/io:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/testfun:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/pkg:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/plot:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/image:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/deprecated:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/general:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/miscellaneous:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/statistics:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/statistics/tests:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/statistics/distributions:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/statistics/base:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/statistics/models:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/special-matrix:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/linear-algebra:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/audio:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/help:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/geometry:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/specfun:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/set:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/time:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/optimization:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/polynomial:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/.deps:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/.libs:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/sparse:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/elfun:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/path:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/strings:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/signal:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/startup:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/io:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/testfun:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/pkg:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/plot:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/image:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/deprecated:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/general:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/miscellaneous:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/statistics:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/statistics/tests:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/statistics/distributions:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/statistics/base:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/statistics/models:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/special-matrix:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/linear-algebra:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/audio:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/help:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/geometry:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/specfun:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/set:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/time:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/optimization:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/polynomial:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/.deps:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/.libs:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/DLD-FUNCTIONS:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/DLD-FUNCTIONS/.deps:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/DLD-FUNCTIONS/.libs:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/OPERATORS:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/OPERATORS/.deps:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/OPERATORS/.libs:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/TEMPLATE-INST:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/TEMPLATE-INST/.deps:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/TEMPLATE-INST/.libs:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/.deps:/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/.libs --image-path=/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/scripts/image --doc-cache-file=/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/doc/interpreter/doc-cache --info-file=/g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/doc/interpreter/octave.info
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x2aaaaaaab000
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00002aaaabb11248 in sigemptyset () from /g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/.libs/liboctinterp.so.0
(gdb) bt
#0  0x00002aaaabb11248 in sigemptyset () from /g/software/linux/pack/octave-3.4.2/SRC/octave-3.4.2/src/.libs/liboctinterp.so.0
#1  0x00002aaaab0a8391 in octave_set_signal_handler (sig=2, handler=0x2aaaab0a8900 <sigint_handler(int)>, restart_syscalls=true) at sighandlers.cc:225
#2  0x00002aaaab0a845a in octave_catch_interrupts () at sighandlers.cc:460
#3  0x00002aaaab0a84c3 in install_signal_handlers () at sighandlers.cc:529
#4  0x00002aaaab07ade7 in octave_main (argc=6, argv=0x7fffffffd578, embedded=0) at octave.cc:665
#5  0x000000373fe1d994 in __libc_start_main () from /lib64/libc.so.6
#6  0x00000000004006d9 in _start ()
(gdb)


Frank Thommen <fthommen>
Tue 02 Aug 2011 02:51:39 PM UTC, comment #1: 

That's not really a stack trace. It's strace output (s here means "system calls", not "stack"), which can be useful later, but is very noisy for now. Can you please provide a stack trace? Do this:


./run-octave -g
run
bt


and that should make gdb give you a stack trace. That may be more helpful to diagnose the problem.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Tue 02 Aug 2011 11:16:39 AM UTC, original submission:  

Running octave 3.4.2 (or ./run-octave just after installation) on CentOS 5.6 results in immediate "Segmentation fault".  Same problem when compiling with gcc 4.1.2 and gcc 4.4.4.

Configure commandline:

./configure --prefix=/g/software/linux/pack/octave-3.4.2 --without-curl --enable-docs=no


Environment variables set:

setenv FFLAGS "-ff2c"


A complete strace output is attached as gzipped textfile.

ldd output below:

octave-3.4.2 > ldd /g/software/linux/pack/octave-3.4.2/bin/octave
        linux-vdso.so.1 =>  (0x00007fff45aec000)
        liboctinterp.so.0 => /g/software/linux/pack/octave-3.4.2/lib/octave/3.4.2/liboctinterp.so.0 (0x00002b7405086000)
        liboctave.so.0 => /g/software/linux/pack/octave-3.4.2/lib/octave/3.4.2/liboctave.so.0 (0x00002b7406132000)
        libcruft.so.0 => /g/software/linux/pack/octave-3.4.2/lib/octave/3.4.2/libcruft.so.0 (0x00002b740708c000)
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0000003742200000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x0000003740e00000)
        libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x0000003742600000)
        libGL.so.1 => /usr/lib64/nvidia/libGL.so.1 (0x0000003749800000)
        libGLU.so.1 => /usr/lib64/libGLU.so.1 (0x0000003744600000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x0000003741200000)
        libreadline.so.5 => /usr/lib64/libreadline.so.5 (0x0000003741e00000)
        libncurses.so.5 => /usr/lib64/libncurses.so.5 (0x0000003753000000)
        libpcre.so.0 => /lib64/libpcre.so.0 (0x000000374c800000)
        liblapack.so.3 => /usr/lib64/liblapack.so.3 (0x00002b74073dd000)
        libblas.so.3 => /usr/lib64/libblas.so.3 (0x00002b7407ae6000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003740600000)
        libg2c.so.0 => /usr/lib64/libg2c.so.0 (0x00002b7407d3b000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003740200000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003740a00000)
        libc.so.6 => /lib64/libc.so.6 (0x000000373fe00000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003746600000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003745e00000)
        libexpat.so.0 => /lib64/libexpat.so.0 (0x0000003742a00000)
        libnvidia-tls.so.260.19.29 => /usr/lib64/nvidia/tls/libnvidia-tls.so.260.19.29 (0x000000374b400000)
        libnvidia-glcore.so.260.19.29 => /usr/lib64/nvidia/libnvidia-glcore.so.260.19.29 (0x0000003750000000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00002b7407f5f000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x0000003741a00000)
        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x0000003741600000)
        libgfortran.so.1 => /usr/lib64/libgfortran.so.1 (0x00002b7408171000)
        /lib64/ld-linux-x86-64.so.2 (0x000000373fa00000)
octave-3.4.2 >



System information: CentOS 5.6, fully updated, Kernel 2.6.18-238.19.1.el5, x86_64 system.


Please let me know if I can provide additional informations to fix this.

Frank Thommen <fthommen>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by nishimur (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by fthommen (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-02-29 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2011-08-02 jordigh StatusNone Need Info
        Assigned toNone jordigh
    2011-08-02 fthommen Attached File- Added octave_3.4.2-gcc_4.4.4-strace.txt.gz, #23728

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code