On 19 July 2010 19:04, Carl Witty <carl.wi...@gmail.com> wrote: > On Mon, Jul 19, 2010 at 9:10 AM, David Kirkby <david.kir...@onetel.net> wrote: >> Yes - see below. >> >> sage: quit >> Exiting Sage (CPU time 0m0.29s, Wall time 0m3.52s). >> >> Program received signal SIGSEGV, Segmentation fault. >> 0xffffffff7e6627ec in _free_unlocked () from /lib/64/libc.so.1 >> (gdb) bt >> #0 0xffffffff7e6627ec in _free_unlocked () from /lib/64/libc.so.1 >> #1 0xffffffff7e662784 in free () from /lib/64/libc.so.1 >> #2 0xffffffff78c13154 in ?? () >> #3 0xffffffff78c13154 in ?? () >> Backtrace stopped: previous frame identical to this frame (corrupt stack?) >> (gdb) >> >> I don't know how to approach this. > > Well, under Linux I would try valgrind next; but evidently valgrind > doesn't work under Solaris. > > I'm guessing the problem is some sort of malloc heap corruption. If > so, here are some tips on debugging that. > > Is there a way under Solaris to turn on some sort of memory debugging > in libc? (For example, glibc does some extra heap corruption checks > if the MALLOC_CHECK environment variable is set.)
I don't know, but suspect so. This page looked interesting, to preload a Solaris malloc library with LD_PRELOAD. That seemed to display something semi-useful after I inspected the core file with 'mdb' and used this 'findleaks command'. There's a lot of pyton and pari stuff listed, but sorting the wood from the trees might be hard. Dave kir...@t2:[~/sage-4.5-hacked-for-64-bit-solaris] $ export LD_PRELOAD=libumem.so kir...@t2:[~/sage-4.5-hacked-for-64-bit-solaris] $ export UMEM_DEBUG=default kir...@t2:[~/sage-4.5-hacked-for-64-bit-solaris] $ ./sage ---------------------------------------------------------------------- | Sage Version 4.5, Release Date: 2010-07-16 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: quit Exiting Sage (CPU time 0m0.39s, Wall time 0m6.00s). /rootpool2/local/kirkby/sage-4.5-hacked-for-64-bit-solaris/local/bin/sage-sage: line 206: 19884 Segmentation Fault (core dumped) sage-ipython "$@" -i kir...@t2:[~/sage-4.5-hacked-for-64-bit-solaris] $ mdb core Loading modules: [ libumem.so.1 libc.so.1 libuutil.so.1 ld.so.1 ] > ::findleaks -dv findleaks: maximum buffers => 38054 findleaks: actual buffers => 37054 findleaks: findleaks: potential pointers => 10532388 findleaks: dismissals => 3532123 (33.5%) findleaks: misses => 4985446 (47.3%) findleaks: dups => 1977768 (18.7%) findleaks: follows => 37051 ( 0.3%) findleaks: findleaks: elapsed wall time => 8 seconds findleaks: BYTES LEAKED VMEM_SEG CALLER 65536 1 ffffffff73c60000 MMAP ------------------------------------------------------------------------ Total 1 oversized leak, 65536 bytes CACHE LEAKED BUFCTL CALLER 000000010015e028 1 00000001026e2020 gen.so`__pyx_f_4sage_4libs_4pari_3gen__new_gen+0x68 0000000100168028 1 00000001039e6e10 integer.so`__pyx_f_4sage_5rings_7integer_fast_tp_new+0xb0 ---------------------------------------------------------------------- Total 2 buffers, 24 bytes mmap(2) leak: [ffffffff73c60000, ffffffff73c70000), 65536 bytes umem_alloc_8 leak: 1 buffer, 8 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS 1026e2020 1014f7fe0 6880239fd06b2d 1 10015e028 0 0 libumem.so.1`umem_cache_alloc+0x148 libumem.so.1`umem_alloc+0x5c libumem.so.1`malloc+0x40 gen.so`__pyx_f_4sage_4libs_4pari_3gen__new_gen+0x68 gen.so`__pyx_f_4sage_4libs_4pari_3gen_12PariInstance_new_gen+0x28 gen.so`__pyx_pf_4sage_4libs_4pari_3gen_12PariInstance___init__+0x8d0 libpython2.6.so.1.0`type_call+0x88 libpython2.6.so.1.0`PyObject_Call+0x60 gen.so`initgen+0x194c libpython2.6.so.1.0`_PyImport_LoadDynamicModule+0x94 libpython2.6.so.1.0`import_submodule+0xc8 libpython2.6.so.1.0`load_next+0x98 libpython2.6.so.1.0`import_module_level+0x1f8 libpython2.6.so.1.0`PyImport_ImportModuleLevel+0x28 libpython2.6.so.1.0`builtin___import__+0x8c umem_alloc_16 leak: 1 buffer, 16 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS 1039e6e10 1039df140 6880256324a377 1 100168028 0 0 libumem.so.1`umem_cache_alloc+0x21c libumem.so.1`umem_alloc+0x5c libumem.so.1`malloc+0x40 integer.so`__pyx_f_4sage_5rings_7integer_fast_tp_new+0xb0 integer.so`__pyx_f_4sage_5rings_7integer_8int_to_Z__call_+0x68 coerce.so`__pyx_f_4sage_9structure_6coerce_24CoercionModel_cache_maps_canonical_coercion+0x2fc element.so`__pyx_f_4sage_9structure_7element_7Element__richcmp+0x248 integer.so`__pyx_pf_4sage_5rings_7integer_7Integer___richcmp__+0x20 libpython2.6.so.1.0`try_rich_compare+0x5c libpython2.6.so.1.0`PyObject_RichCompare+0x64 libpython2.6.so.1.0`PyEval_EvalFrameEx+0x2838 libpython2.6.so.1.0`PyEval_EvalCodeEx+0x988 libpython2.6.so.1.0`function_call+0x158 libpython2.6.so.1.0`PyObject_Call+0x60 libpython2.6.so.1.0`instancemethod_call+0x150 > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org