When libdb2 is used from a dlopen-ed module, it registers a function (say, foo_DB2_atexit) via atexit. Then the module is dlclose-d. Then, when main () returns and activates the atexit-registered functions, it tries to call foo_DB2_atexit, which has been unloaded, causing a SIGSEGV Segmentation fault. Personally, I believe that this is a problem between dlopen/close and atexit, but I'm being stonewalled on this, and told that libdb2 should use __cxa_atexit or __cxa_finalize (see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=28625 ) I have tried various tricks like using --wrap atexit (works for "normal" loading of modules, but not dlopen-ed stuff) and tried converting ibmdb2.so to ibmdb2_new.a with --wrap atexit, and then creating ibmdb2_new.so without an unresolved reference to atexit (got horribly bogged done - I'm too new with gnu to work it all out). Some installation info: [09:49:20 bwhi@ws2 bwhi]$rpm -qa | grep db2 db2cucs71-7.1.0-0 db2engn71-7.1.0-0 db2conn71-7.1.0-0 db2cnvj71-7.1.0-0 db2cdb71-7.1.0-0 db2adt71-7.1.0-0 db2-2.4.14-4 db2cliv71-7.1.0-0 db2jdbc71-7.1.0-0 db2rte71-7.1.0-0 db2crte71-7.1.0-0 db2das71-7.1.0-0 db2repl71-7.1.0-0 db2smpl71-7.1.0-0 db2cnvk71-7.1.0-0 db2cnvt71-7.1.0-0 db2dj71-7.1.0-0 db2clic71-7.1.0-0 db2adts71-7.1.0-0 db2cj71-7.1.0-0 db2cdrd71-7.1.0-0 db2wcc71-7.1.0-0 db2cnvc71-7.1.0-0 db2elic71-7.1.0-0 [09:49:24 bwhi@ws2 bwhi]$uname -a Linux ws2.rsctech.net 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000 i686 unknown
Is this IBM DB2 or Berkeley db2? I don't think these came from the db2 source package in the distribution....
My problem is definitely with /usr/IBMdb2/V7.1/lib/libdb2.so, and pointed to by /usr/lib/libdb2.so.bk - is this the right forum? if (bRightForum==false) AskSupplementaryQuestion("Where do I post this issue?"); I'm having a lot of problems cutting through the bogon flux with this one. Not you, may I hasten to add; I much prefer people who ask questions than those who try to drown me in bogosity. If you could help me by pointing me in the right direction, I would appreciate it; I'm rather new with this low-level GNU stuff. Thank you.
Given the directory this file is in, this looks like it's IBM's DB2 Universal Database, and not the Berkeley DB library, version 2. We don't have the source for that, so I think you'd have to go to IBM. I checked their web site and http://www-4.ibm.com/software/data/db2/linux/ appears to be the homepage, with contact information available via the "support" link on the left.
Thank you for pointing me in the right direction. I'll change this to "NOTABUG" - I guess that's the right way to close it.