octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: segfault and onCleanup()


From: Ben Abbott
Subject: Re: segfault and onCleanup()
Date: Thu, 08 Dec 2011 13:08:45 -0500

On Dec 8, 2011, at 1:00 PM, John W. Eaton wrote:

> On  8-Dec-2011, Ben Abbott wrote:
> 
> |  On Dec 8, 2011, at 11:07 AM, John W. Eaton wrote:
> | 
> | > On  8-Dec-2011, Ben Abbott wrote:
> | > 
> | > | With the change above, I still see a segfault.
> | > | 
> | > | panic: Segmentation fault: 11 -- stopping myself...
> | > | attempting to save variables to `octave-core'...
> | > | terminate called after throwing an instance of 'std::length_error'
> | > |   what():  basic_string::_S_create
> | > | panic: attempted clean up apparently failed -- aborting...
> | > | make[1]: *** [check] Abort trap: 6
> | > | make: *** [check] Error 2
> | > | 
> | > | I tried (naively?) restoring the patches to ov-typeinfo.cc and 
> graphics.cc, but the segfault persists.
> | > 
> | > Is there an onCleanup.oct file from a previous build still present?
> | > 
> | > jwe
> | 
> | After  (1) deleted everything named onCleanup.*, (2) maintainter-clean, (3) 
> hg pull ; hg update -C, and (4) building octave.  I still see a segfault (a 
> bit different now).
> | 
> | panic: Segmentation fault: 11 -- stopping myself...
> | attempting to save variables to `octave-core'...
> | octave(38952,0x7fff72320960) malloc: *** mmap(size=3458773283022905344) 
> failed (error code=12)
> | *** error: can't allocate region
> | *** set a breakpoint in malloc_error_break to debug
> | terminate called after throwing an instance of 'std::bad_alloc'
> |   what():  std::bad_alloc
> | panic: attempted clean up apparently failed -- aborting...
> | make[1]: *** [check] Abort trap: 6
> | make: *** [check] Error 2
> 
> Does this happen when starting Octave?  Exiting?  Running tests?
> 
> | >From gdb ...
> | 
> | Program received signal EXC_BAD_ACCESS, Could not access memory.
> | Reason: KERN_INVALID_ADDRESS at address: 0x0000000111f23118
> | 0x00000001001ee9d7 in std::_Rb_tree<std::string, std::pair<std::string 
> const, graphics_toolkit>, std::_Select1st<std::pair<std::string const, 
> graphics_toolkit> >, std::less<std::string>, 
> std::allocator<std::pair<std::string const, graphics_toolkit> > >::_M_erase ()
> | (gdb) bt
> | #0  0x00000001001ee9d7 in std::_Rb_tree<std::string, std::pair<std::string 
> const, graphics_toolkit>, std::_Select1st<std::pair<std::string const, 
> graphics_toolkit> >, std::less<std::string>, 
> std::allocator<std::pair<std::string const, graphics_toolkit> > >::_M_erase ()
> | #1  0x00007fff8526c7c8 in __cxa_finalize ()
> | #2  0x00007fff8526c652 in exit ()
> | #3  0x00000001003918ff in clean_up_and_exit ()
> | #4  0x0000000100392420 in main_loop ()
> | #5  0x0000000100324fdf in octave_main ()
> | #6  0x0000000100000f44 in start ()
> 
> Are you building without -g?
> 
> If this really is a case of an uncaught bad_alloc exception, then we
> need to know where it is thrown.  In gdb, do
> 
>  (gdb) catch throw
> 
> then trigger the bug and gdb should stop at the point where the
> exception is thrown.
> 
> jwe

I had noticed that I have a problem with the debug info ... First, "catch 
throw" gives me ...

>> fntests
Reading symbols for shared libraries . done

Integrated test scripts:

Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
  src/DLD-FUNCTIONS/__contourc__.cc ...................... PASS    1/1   
  src/DLD-FUNCTIONS/__delaunayn__.cc ..................... PASS    1/1   
  src/DLD-FUNCTIONS/__dispatch__.cc ...................... PASS    1/1   
  src/DLD-FUNCTIONS/__dsearchn__.cc ...................... PASS    1/1   
  src/DLD-FUNCTIONS/__fltk_uigetfile__.cc ................ PASS    1/1   
  src/DLD-FUNCTIONS/__glpk__.cc .......................... PASS    1/1   
  src/DLD-FUNCTIONS/__lin_interpn__.cc ................... PASS    1/1   
  src/DLD-FUNCTIONS/__magick_read__.cc ................... PASS    4/4   
  src/DLD-FUNCTIONS/__pchip_deriv__.cc ................... PASS    1/1   
  src/DLD-FUNCTIONS/__qp__.cc ............................ PASS    1/1   
  src/DLD-FUNCTIONS/__voronoi__.cc ....................... PASS    1/1   
  src/DLD-FUNCTIONS/besselj.cc ...........................Reading symbols for 
shared libraries . done
 PASS  180/180 
  src/DLD-FUNCTIONS/betainc.cc ...........................Reading symbols for 
shared libraries . done
 PASS    6/6   
  src/DLD-FUNCTIONS/bsxfun.cc ............................Reading symbols for 
shared libraries . done
Reading symbols for shared libraries . done

Catchpoint 1 (exception thrown).
Catchpoint 1 (exception caught), throw location unknown, catch location 
unknown, exception type octave_execution_exception
0x00000001071c603d in __cxa_throw ()

Second, regarding the debug info, I'm missing something that should be obvious. 
My configure script is below, can you (someone?) spot what I've done wrong?

export PREFIX=/opt/local
export CC=/opt/local/bin/gcc-mp-4.5
export CXX=/opt/local/bin/g++-mp-4.5
export CXXCPP="/opt/local/bin/g++-mp-4.5 -E"
export F77=/opt/local/bin/gfortran-mp-4.5
export FC=/opt/local/bin/gfortran-mp-4.5
export CXXFLAGS="-pipe -O2 -g -m64 -gstabs"
export FFLAGS="$CXXFLAGS -D_THREAD_SAFE -pthread -gstabs"
export CFLAGS="$FFLAGS -lstdc++"
export LDFLAGS=-L$PREFIX/lib
export CPPFLAGS=-I$PREFIX/include
export BLAS_LIBS="-lcblas -lf77blas -latlas"
export LAPACK_LIBS=-llapack

./configure --prefix="/opt/local" --without-framework-carbon --with-x \
            --with-cholmod="-lcholmod -lmetis"

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]