Re: Interpret object causing crash in __cxa_finalize (have core)

Jan Kratochvil
2011-08-24T19:40:01Z

On Wed, 24 Aug 2011 21:31:14 +0200, Jeffrey Walton wrote:
> I'm observing an intermittent crash during unloading of a shared
> object. The library and test harness were built with '-g3 -ggdb -O0',
> and 'ulimit -c unlimited', so I am able to get it under GDB.

If you have it reproducible run it under valgrind first.

> But I'm having problems interpreting what object is being problematic.
[...]
> #21 0x00002ba649808630 in __cxa_finalize (d=0x2ba64901c3d8)
> at cxa_finalize.c:56
> check = <value optimized out>
> cxafn = 0x6
> cxaarg = 0xa46
> f = 0x13925e0
> funcs = 0x13924f0
> (gdb) po 0x13925e0
> evaluation of this expression requires the target program to be active

print-object is for Objecttive-C. And you will decode there just the info you
see in the frame #20.

This looks as a memory corruption, it is better to debug instrument the code
leading to this state, this core file may no longer be too useful.

Regards,
Jan

[...]
> #20 0x0000000000470c0a in ~map (this=0x83dfc0, __in_chrg=<value optimized out>)
> at /usr/include/c++/4.4/bits/stl_map.h:87
> No locals.
> #21 0x00002ba649808630 in __cxa_finalize (d=0x2ba64901c3d8)
> at cxa_finalize.c:56
> check = <value optimized out>
> cxafn = 0x6
> cxaarg = 0xa46
> f = 0x13925e0
> funcs = 0x13924f0
> #22 0x00002ba648c59076 in __do_global_dtors_aux () from lib/libesapi-c++.so
> No symbol table info available.
> #23 0x0000000000000000 in ?? ()
> No symbol table info available.
> (gdb)