[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#108942: Bug#117565: libsasl7: rebuild with db3 for cyrus2-imapd; automake issues



On Tue, Oct 30, 2001 at 05:39:20PM -0500, Sam Hartman wrote:

> >>>>> "David" == David D Kilzer <ddkilzer@theracingworld.com> writes:
> 
>     David> Ahh, I guess I had assumed (my bad) that the rest of Debian
>     David> was going to db3 simply because it is a newer version of
>     David> db2 and it is available.
> 
> This is a true statement.  My argument is that db2 and db3 should play
> well together in the same application if the right shared library
> magic is done.  I.E. cyrus2 requires db3 should not be a good argument
> for SASL should go to db3.
> 
> Debian is moving to db3 is a reasonable argument for SASL should go to
> db3.

What kind of shared library magic are you talking about?  I believe such
magic should be required for the next release of Debian because a
situation similar to the following may happen in the next Debian
release.

After rebuilding various packages from Debian 'unstable' for 'potato'
(stable) so that I could run cyrus2-imapd, I encountered a segmentation
fault when running /usr/sbin/cyrmaster (the master process for various
Cyrus daemons).  While cyrmaster was linked to libdb3, libnss_db (from
the libc6 package) was linked to libdb2 and caused the seg fault when
trying to load /etc/services.db (which didn't happen to exist) before
/etc/services (/etc/nsswitch.conf had a "services db files" entry).

The workaround?  Remove "db" from the entries in /etc/nsswitch.conf
(which weren't being used anyway).  I could have rebuilt libc6 against
libdb3, but this was a quicker, less risky fix.  Yes, I know, that risk
is relatively benign compared to everything else I've done, but I wanted
to illustrate the issue quickly.

Note that libc6 in unstable is built against libdb3 and thus does not
exhibit this issue.

Here are the steps I did to achieve this situation.

1. Built db2 and db3 from unstable on potato.

2. Installed libdb2[-util] (replace packages from stable) and installed
   libdb3[-util].

3. Installed libdb3-dev (removing libdb2-dev).

4. Built and installed new versions of the following packages from
   unstable (required to build cyrus-sasl from unstable): autoconf,
   autoconf2.13, automake, autotools-dev, libtool.

5. Built cyrus-sasl packages from unstable against libdb3 and
   installed, replacing older packages built against db2.

6. Built cyrus2-imapd-2.0.16-0.pre3 and installed.  (Note that I
   had to create symlinks from /usr/lib/libucdagent.so.4.1 to
   /usr/lib/libucdagent.so and /usr/lib/libucdmibs.so.4.1 to
   /usr/lib/libucdmibs.so to build successfully.  These libs are
   from the smnpd package, but that this situation is resolved in
   unstable.)

7. Attempted to run /usr/sbin/cyrmaster, but get seg fault instead.

The gdb trace looks like this (for what it's worth):

pgtest:~# gdb /usr/sbin/cyrmaster 
GNU gdb 19990928
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(no debugging symbols found)...
(gdb) run
Starting program: /usr/sbin/cyrmaster 
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0 in ?? ()
(gdb) where
#0  0x0 in ?? ()
#1  0x40381c92 in __db_err () from /lib/libdb.so.3
#2  0x4037b3dd in db_open () from /lib/libdb.so.3
#3  0x40364d0a in _nss_db_getprotobynumber_r () from /lib/libnss_db.so.2
#4  0x40364efa in _nss_db_endservent () from /lib/libnss_db.so.2
#5  0x40365181 in _nss_db_getservbyname_r () from /lib/libnss_db.so.2
#6  0x403151d1 in getservbyname_r () from /lib/libc.so.6
#7  0x40315091 in getservbyname () from /lib/libc.so.6
#8  0x4008c1e3 in snmp_sess_perror () from /usr/lib/libsnmp.so.4.1
#9  0x4008c2f7 in init_snmp () from /usr/lib/libsnmp.so.4.1
#10 0x804af1e in strcpy ()
#11 0x4027da42 in __libc_start_main () from /lib/libc.so.6
(gdb) quit
The program is running.  Exit anyway? (y or n) y
pgtest:~# 

Dave



Reply to: