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
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
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
[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
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.
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.