This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libc/1508: symbol conflict due to nss_db.so usage of /lib/libdb.so.3


   Date: Tue, 04 Jan 2000 22:00:40 +0100
   From: Michael Marxmeier <mike@msede.com>

   Hello Andreas and Mark.

   Sorry for my stupid ranting. 

   > __db_calloc is not called directly from glibc at all.  Have a look at
   > the stacktrace and the source.  nss_db_open is an alias for db_open -
   > glibc just calls db_open in nss_db/db-XXX.c

   You are right. So might more likely be a problem with either malloc() 
   or __db_jump.j_malloc pointer?

Well, malloc() problems are always a likely cause for segmentations
faults.  You could try glibc's built-in malloc checks to see if that
changes the behaviour.  Try setting the environment variable
MALLOC_CHECK_ to 1 or 2 (see the glibc manual for more details).

The __db_jump thing looks suspicious though.  I'm not sure, but I
think that both libdb.so's will end up using the same __db_jump table.
And if they're using the __db_jump that's in the libdb26.so that comes
with your program it's very likely that it is simply initialized to
zero.  Since __db_calloc unconditionally uses the jump table this will
definitely cause a segmentation fault.  If this is indeed the case,
fiddling with MALLOC_CHECK_ shouldn't help, and the program should
crash at the same spot as it did before.

We probably shouldn't export __db_jump from the libdb.so that comes
with glibc.  It is an internal symbol.  Unfortunately we need to
export it because two of the maintenance programs that come with the
db library need __db_jump.  This can be fixed though.

If you're brave you could try to re-build glibc such that its libdb.so
is build without making __db_jump globally visible.  To do this,
remove __db_jump from db2/Versions.  You'll also need to disable
building the db_checkpoint and db_deadlock programs.  To do that,
remove them from db2/Makefile.  You probably don't want to install the
library though.  Just copy the libdb.so.3 that is created to a
conveient place and set LD_LIBRARY_PATH.

If you can do this, it would really help us in making sure that this
really is the problem, and it will allow us to fix things.

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]