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]

[Michael Marxmeier <mike@msede.com>] libc/1508: symbol conflict due to nss_db.so usage of /lib/libdb.so.3



Is there anything we can do about this problem?

The obvious solutions are:
- disable nss_db
- don't use proprietary software that you can't recompile

Or should this work with glibc 2.2?
Andreas




>Number:         1508
>Category:       libc
>Synopsis:       symbol conflict due to nss_db.so usage of /lib/libdb.so.3
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    libc-gnats
>State:          open
>Class:          change-request
>Submitter-Id:   unknown
>Arrival-Date:   Fri Dec 31 12:00:04 EST 1999
>Last-Modified:
>Originator:     Michael Marxmeier
>Organization:
Marxmeier Software AG
 
>Release:        libc-2.1.2
>Environment:
Host type: i386-suse-linux-gnu
System: Linux office 2.2.13 #2 Wed Dec 29 23:22:38 CET 1999 i686
unknown
Architecture: i686

Addons: crypt linuxthreads noversion nss-v1

Build CC: gcc
Compiler version: egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Kernel headers: 2.2.13
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio

>Description:
I encountered a segfault with the Netscape Messenger server for Linux.
It failed with a segv.
I tracked this down to Netscape server using a different version shlib 
of db (/netscape/server4/lib/libdb.so). Now when you have db in
nsswitch.conf there are two versions of the db library in the
current process, resulting in all kind of breakage.

The stack trace below should explain it:
#1  0x40355fb0 in __db_calloc (num=1, size=156) at os/os_alloc.c:69
#2  0x4034eeaa in __nss_db_open (fname=0x401ce337
"/var/db/services.db", 
    type=DB_BTREE, flags=65536, mode=0, dbenv=0x0, dbinfo=0x0,
dbpp=0x401cf5f0)
    at db/db.c:159
#3  0x401cba07 in internal_setent (stayopen=0)
    at nss_files/../nss_db/db-XXX.c:67
#4  0x401cbc01 in lookup (key=0xbffff248, result=0x4032febc,
buffer=0x80c1d78, 
    buflen=1024, errnop=0x8060344) at nss_files/../nss_db/db-XXX.c:173
#5  0x401cbe8d in _nss_db_getservbyname_r (name=0xbffffa18 "store", 
    proto=0x805b5db "tcp", result=0x4032febc, buffer=0x80c1d78
"¨»2@¨»2@", 
    buflen=1024, errnop=0x8060344) at nss_files/files-service.c:44
#6  0x40303819 in __getservbyname_r (name=0xbffffa18 "store", 
    proto=0x805b5db "tcp", resbuf=0x4032febc, buffer=0x80c1d78
"¨»2@¨»2@", 
    buflen=1024, result=0xbffff2c8) at ../nss/getXXbyYY_r.c:182
#7  0x40303672 in getservbyname (name=0xbffffa18 "store", 
    proto=0x805b5db "tcp") at ../nss/getXXbyYY.c:123
#8  0x804ddad in c_main (argc=5, argv=0xbffff874) at serverstart.c:243
#9  0x80575fd in main (argc=5, argv=0xbffff874) at main_c.c:14

In this case __db_calloc was taken from the Netscape db shlib.

>How-To-Repeat:
Create a program using a shared library with an older/incompatible
db version and use nss_db.so (eg. getservbyname).

>Fix:
Workaround is to remove db entries from /etc/nsswitch.conf.

IMHO the real fix would be to use a distinct name space for the
system db library.

Thanks for your time
Michael

-- 
Michael Marxmeier           Marxmeier Software AG
E-Mail: mike@msede.com      Besenbruchstrasse 9
Phone : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/
>Audit-Trail:
>Unformatted:




-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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