Subject: pkg/24473: databases/openldap: slapd segfaults
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jukka-netbsd@2004.salmi.ch>
List: netbsd-bugs
Date: 02/18/2004 15:50:46
>Number:         24473
>Category:       pkg
>Synopsis:       databases/openldap: slapd segfaults
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 18 14:51:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jukka Salmi
>Release:        NetBSD 1.6.2
>Organization:
>Environment:
System: NetBSD bart.stasoft.ch 1.6.2 NetBSD 1.6.2 (BART) #0: Tue Feb 10 10:29:57 CET 2004 root@bart.stasoft.ch:/usr/src/sys/arch/i386/compile/BART i386
Architecture: i386
Machine: i386
>Description:
On a stable NetBSD system using current pkgsrc, databases/openldap builds without problems, but slapd segfaults when started:

$ gdb slapd
GNU gdb 5.0nb1
[...]
This GDB was configured as "i386--netbsdelf"...
(gdb) run
Starting program: /opt/pkgbuild/databases/openldap/work/openldap-2.1.25/servers/slapd/slapd 

Program received signal SIGSEGV, Segmentation fault.
0x811410a in __pth_ring_append ()
(gdb) bt
#0  0x811410a in __pth_ring_append ()
#1  0x810f406 in pth_mutex_acquire ()
#2  0x80d5072 in ldap_pvt_thread_mutex_lock (mutex=0x814d058) at thr_pth.c:134
#3  0x80ed8e0 in ldap_pvt_gethostbyname_a (name=0xbfbfd7d0 "bart.stasoft.ch", 
    resbuf=0xbfbfd7b8, buf=0xbfbfd8d4, result=0xbfbfd7cc, 
    herrno_ptr=0xbfbfd7b0) at util-int.c:157
#4  0x80edee0 in ldap_pvt_get_fqdn (name=0xbfbfd7d0 "bart.stasoft.ch")
    at util-int.c:530
#5  0x80ec520 in ldap_int_initialize (gopts=0x813df20, dbglvl=0x813c674)
    at init.c:525
#6  0x80ece30 in ldap_set_option (ld=0x0, option=20481, invalue=0x813c674)
    at options.c:338
#7  0x804c476 in main (argc=1, argv=0xbfbfda1c) at main.c:311
#8  0x804bea0 in ___start ()
(gdb) 

openldap was built as follows (excerpt from config.status.overridden):
# ./configure  --sysconfdir=/usr/pkg/etc/openldap --localstatedir=/var/openldap
--enable-bdb --enable-crypt --enable-dnssrv --enable-ldap --enable-ldbm
--enable-passwd --enable-wrappers --with-tls=openssl --without-readline
--with-cyrus-sasl --enable-spasswd --without-kerberos --with-threads=pth
--host=i386--netbsdelf --prefix=/usr/pkg

>How-To-Repeat:
with a current pkgsrc, do:
$ cd databases/openldap && make build &&
	./work/openldap-2.1.25/servers/slapd/slapd
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: