Debian Bug report logs - #465915
segmentation fault in slapd under some load

version graph

Package: slapd; Maintainer for slapd is Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>; Source for slapd is src:openldap.

Reported by: Arthur de Jong <adejong@debian.org>

Date: Fri, 15 Feb 2008 15:03:06 UTC

Severity: important

Found in version openldap2.3/2.4.7-5

Fixed in version 2.4.9-1

Done: Steve Langasek <vorlon@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>:
Bug#465915; Package slapd. Full text and rfc822 format available.

Acknowledgement sent to Arthur de Jong <adejong@debian.org>:
New Bug report received and forwarded. Copy sent to Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Arthur de Jong <adejong@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: segmentation fault in slapd under some load
Date: Fri, 15 Feb 2008 16:01:22 +0100
[Message part 1 (text/plain, inline)]
Subject: segmentation fault in slapd under some load
Package: slapd
Version: 2.4.7-5
Severity: important

I have a test directory with 2032 DNs in it to test nss-ldapd. When I
run my test scripts (which result in a large number of LDAP requests)
the server occasionally crashes. Lately this seems to happen more often
so much so that it's become reproducible.

I have installed slapd-dbg and have reproduces the crash below. If you
need more information (e.g. contents of /var/lib/ldap) or the test
scripts just let me know. (the test scripts are from nss-ldapd and
basically do just searches with paging)

The crash is mostly this (full logs attached)
# db4.2_recover -h /var/lib/ldap
# gdb /usr/sbin/slapd
[...]
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) r -d 273 -h ldap:/// ldaps:/// ldapi:/// -g openldap -u openldap -f /etc/ldap/slapd.conf
Starting program: /usr/sbin/slapd -d 273 -h ldap:/// ldaps:/// ldapi:/// -g openldap -u openldap -f /etc/ldap/slapd.conf
[Thread debugging using libthread_db enabled]
[...]
=> send_search_entry: conn 8 dn="cn=Nona Delmore+uid=ndelmore,ou=lotsofpeople,dc=test,dc=tld"
<= send_search_entry: conn 7 exit.
entry_decode: "uid=mherlihy,ou=lotsofpeople,dc=test,dc=tld"
<= entry_decode(uid=mherlihy,ou=lotsofpeople,dc=test,dc=tld)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb521ab90 (LWP 28384)]
slap_send_search_entry (op=0x84263a0, rs=0xb521a168)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/result.c:900
900 /build/buildd/openldap2.3-2.4.7/servers/slapd/result.c: No such file or directory.
  in /build/buildd/openldap2.3-2.4.7/servers/slapd/result.c
(gdb) bt
#0  slap_send_search_entry (op=0x84263a0, rs=0xb521a168)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/result.c:900
#1  0xb78314ab in bdb_search (op=0x84263a0, rs=0xb521a168)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/back-bdb/search.c:869
#2  0x08077d13 in fe_op_search (op=0x84263a0, rs=0xb521a168)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/search.c:368
#3  0x0807853c in do_search (op=0x84263a0, rs=0xb521a168)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/search.c:217
#4  0x080757c6 in connection_operation (ctx=0xb521a248, arg_v=0x84263a0)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/connection.c:1083
#5  0x08075ed6 in connection_read_thread (ctx=0xb521a248, argv=0xf)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/connection.c:1210
#6  0xb7f56a44 in ?? () from /usr/lib/libldap_r-2.4.so.2
#7  0xb521a248 in ?? ()
#8  0x0000000f in ?? ()
#9  0x00000000 in ?? ()
(gdb)

The crash does not occur on the same DN every time and sometimes an
assertion is triggered instead of a Segmentation fault (though I don't
think I've seen that with slapd-dbg installed). I've checked permissions
on /var/lib/ldap. Running slapindex seems to fix the situation sometimes
(for a while) and it seems that if you let slapd settle down a bit the
problem does not occur immediately.

If I increase the debug much level further (haven't tested all
combinations) the problem does not seem to appear. Also, I have only
been able to reproduce the crash under valgrind with -d 1:

# db4.2_recover -h /var/lib/ldap
# valgrind --leak-check=full /usr/sbin/slapd -d 1 -h ldap:/// ldaps:/// ldapi:/// -g openldap -u openldap -f /etc/ldap/slapd.conf
==12385== Thread 6:
==12385== Invalid read of size 4
==12385==    at 0x42A9160: pthread_mutex_lock (pthread_mutex_lock.c:51)
[...]
==12385==  Address 0x2c is not stack'd, malloc'd or (recently) free'd
==12385==
==12385== Process terminating with default action of signal 11 (SIGSEGV)
==12385==  Access not within mapped region at address 0x2C
==12385==    at 0x42A9160: pthread_mutex_lock (pthread_mutex_lock.c:51)
[...]
==12385== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 104 from 1)
==12385== malloc/free: in use at exit: 78,857,822 bytes in 21,789 blocks.
==12385== malloc/free: 41,385 allocs, 19,596 frees, 88,025,431 bytes allocated.
[...]
==12385== LEAK SUMMARY:
==12385==    definitely lost: 139 bytes in 4 blocks.
==12385==    indirectly lost: 336 bytes in 28 blocks.
==12385==      possibly lost: 1,296 bytes in 9 blocks.
==12385==    still reachable: 78,856,051 bytes in 21,748 blocks.
==12385==         suppressed: 0 bytes in 0 blocks.
==12385== Reachable blocks (those to which a pointer was found) are not shown.
==12385== To see them, rerun with: --leak-check=full --show-reachable=yes
Killed

Full logs of all tests as well as slapd.conf are attached.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages slapd depends on:
ii  adduser               3.105              add and remove users and groups
ii  coreutils             6.10-3             The GNU core utilities
ii  debconf [debconf-2.0] 1.5.19             Debian configuration management sy
ii  libc6                 2.7-8              GNU C Library: Shared libraries
ii  libdb4.2              4.2.52+dfsg-4      Berkeley v4.2 Database Libraries [
ii  libgnutls26           2.2.1-3            the GNU TLS library - runtime libr
ii  libldap-2.4-2         2.4.7-5            OpenLDAP libraries
ii  libltdl3              1.5.26-1           A system independent dlopen wrappe
ii  libperl5.8            5.8.8-12           Shared Perl library
ii  libsasl2-2            2.1.22.dfsg1-17+b1 Cyrus SASL - authentication abstra
ii  libslp1               1.2.1-7.1          OpenSLP libraries
ii  libwrap0              7.6.dbs-14         Wietse Venema's TCP wrappers libra
ii  perl [libmime-base64- 5.8.8-12           Larry Wall's Practical Extraction 
ii  psmisc                22.6-1             Utilities that use the proc filesy
ii  unixodbc              2.2.11-16          ODBC tools libraries

Versions of packages slapd recommends:
ii  libsasl2-modules      2.1.22.dfsg1-17+b1 Cyrus SASL - pluggable authenticat

-- debconf information:
  slapd/internal/adminpw: (password omitted)
* slapd/password1: (password omitted)
* slapd/password2: (password omitted)
* slapd/allow_ldap_v2: false
  slapd/password_mismatch:
  slapd/tlsciphersuite:
  slapd/suffix_change: false
  slapd/fix_directory: true
  slapd/invalid_config: true
* shared/organization: Test domain for nss-ldapd
  slapd/slave_databases_require_updateref:
  slapd/dump_database_destdir: /var/backups/slapd-VERSION
  slapd/upgrade_slapcat_failure:
  slapd/slurpd_obsolete:
  slapd/autoconf_modules: true
* slapd/purge_database: false
* slapd/domain: test.tld
* slapd/backend: BDB
* slapd/no_configuration: false
  slapd/migrate_ldbm_to_bdb: false
* slapd/move_old_database: true
  slapd/dump_database: when needed
  slapd/upgrade_slapadd_failure:

-- 
-- arthur - adejong@debian.org - http://people.debian.org/~adejong --
[gdb-slapd-d256.txt.gz (application/x-gzip, attachment)]
[gdb-slapd-d273.txt.gz (application/x-gzip, attachment)]
[valgrind-slapd-d1.txt.gz (application/x-gzip, attachment)]
[valgrind-slapd-d256.txt.gz (application/x-gzip, attachment)]
[valgrind-slapd-d273.txt.gz (application/x-gzip, attachment)]
[slapd.conf (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>:
Bug#465915; Package slapd. Full text and rfc822 format available.

Acknowledgement sent to Quanah Gibson-Mount <quanah@zimbra.com>:
Extra info received and forwarded to list. Copy sent to Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #10 received at 465915@bugs.debian.org (full text, mbox):

From: Quanah Gibson-Mount <quanah@zimbra.com>
To: 465915@bugs.debian.org
Cc: Arthur de Jong <adejong@debian.org>
Subject: Re: [Pkg-openldap-devel] Bug#465915: segmentation fault in slapd under some load
Date: Fri, 15 Feb 2008 10:57:00 -0800
This is most likely upstream bug ITS#5336.

It would be helpful to see the output in gdb of:

print *bdb

to see how the caches were configured.

For example, from ITS#5336, at frame 3, a print *bdb

would have been useful there.  If you can do something similarly in your 
bug, that would be great.  Also, all the steps to reproduce this.

Regards,
Quanah

--On February 15, 2008 4:01:22 PM +0100 Arthur de Jong <adejong@debian.org> 
wrote:

> Subject: segmentation fault in slapd under some load
> Package: slapd
> Version: 2.4.7-5
> Severity: important
>
> I have a test directory with 2032 DNs in it to test nss-ldapd. When I
> run my test scripts (which result in a large number of LDAP requests)
> the server occasionally crashes. Lately this seems to happen more often
> so much so that it's become reproducible.
>
> I have installed slapd-dbg and have reproduces the crash below. If you
> need more information (e.g. contents of /var/lib/ldap) or the test
> scripts just let me know. (the test scripts are from nss-ldapd and
> basically do just searches with paging)
>
> The crash is mostly this (full logs attached)
># db4.2_recover -h /var/lib/ldap
># gdb /usr/sbin/slapd
> [...]
> Using host libthread_db library "/lib/libthread_db.so.1".
> (gdb) r -d 273 -h ldap:/// ldaps:/// ldapi:/// -g openldap -u openldap -f
> /etc/ldap/slapd.conf Starting program: /usr/sbin/slapd -d 273 -h ldap:///
> ldaps:/// ldapi:/// -g openldap -u openldap -f /etc/ldap/slapd.conf
> [Thread debugging using libthread_db enabled]
> [...]
> => send_search_entry: conn 8 dn="cn=Nona
> Delmore+uid=ndelmore,ou=lotsofpeople,dc=test,dc=tld" <=
> send_search_entry: conn 7 exit.
> entry_decode: "uid=mherlihy,ou=lotsofpeople,dc=test,dc=tld"
> <= entry_decode(uid=mherlihy,ou=lotsofpeople,dc=test,dc=tld)
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb521ab90 (LWP 28384)]
> slap_send_search_entry (op=0x84263a0, rs=0xb521a168)
>     at /build/buildd/openldap2.3-2.4.7/servers/slapd/result.c:900
> 900 /build/buildd/openldap2.3-2.4.7/servers/slapd/result.c: No such file
> or directory.   in /build/buildd/openldap2.3-2.4.7/servers/slapd/result.c
> (gdb) bt
># 0  slap_send_search_entry (op=0x84263a0, rs=0xb521a168)
>     at /build/buildd/openldap2.3-2.4.7/servers/slapd/result.c:900
># 1  0xb78314ab in bdb_search (op=0x84263a0, rs=0xb521a168)
>     at /build/buildd/openldap2.3-2.4.7/servers/slapd/back-bdb/search.c:869
># 2  0x08077d13 in fe_op_search (op=0x84263a0, rs=0xb521a168)
>     at /build/buildd/openldap2.3-2.4.7/servers/slapd/search.c:368
># 3  0x0807853c in do_search (op=0x84263a0, rs=0xb521a168)
>     at /build/buildd/openldap2.3-2.4.7/servers/slapd/search.c:217
># 4  0x080757c6 in connection_operation (ctx=0xb521a248, arg_v=0x84263a0)
>     at /build/buildd/openldap2.3-2.4.7/servers/slapd/connection.c:1083
># 5  0x08075ed6 in connection_read_thread (ctx=0xb521a248, argv=0xf)
>     at /build/buildd/openldap2.3-2.4.7/servers/slapd/connection.c:1210
># 6  0xb7f56a44 in ?? () from /usr/lib/libldap_r-2.4.so.2
># 7  0xb521a248 in ?? ()
># 8  0x0000000f in ?? ()
># 9  0x00000000 in ?? ()
> (gdb)
>
> The crash does not occur on the same DN every time and sometimes an
> assertion is triggered instead of a Segmentation fault (though I don't
> think I've seen that with slapd-dbg installed). I've checked permissions
> on /var/lib/ldap. Running slapindex seems to fix the situation sometimes
> (for a while) and it seems that if you let slapd settle down a bit the
> problem does not occur immediately.
>
> If I increase the debug much level further (haven't tested all
> combinations) the problem does not seem to appear. Also, I have only
> been able to reproduce the crash under valgrind with -d 1:
>
># db4.2_recover -h /var/lib/ldap
># valgrind --leak-check=full /usr/sbin/slapd -d 1 -h ldap:/// ldaps:///
># ldapi:/// -g openldap -u openldap -f /etc/ldap/slapd.conf
> ==12385== Thread 6:
> ==12385== Invalid read of size 4
> ==12385==    at 0x42A9160: pthread_mutex_lock (pthread_mutex_lock.c:51)
> [...]
> ==12385==  Address 0x2c is not stack'd, malloc'd or (recently) free'd
> ==12385==
> ==12385== Process terminating with default action of signal 11 (SIGSEGV)
> ==12385==  Access not within mapped region at address 0x2C
> ==12385==    at 0x42A9160: pthread_mutex_lock (pthread_mutex_lock.c:51)
> [...]
> ==12385== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 104 from 1)
> ==12385== malloc/free: in use at exit: 78,857,822 bytes in 21,789 blocks.
> ==12385== malloc/free: 41,385 allocs, 19,596 frees, 88,025,431 bytes
> allocated. [...]
> ==12385== LEAK SUMMARY:
> ==12385==    definitely lost: 139 bytes in 4 blocks.
> ==12385==    indirectly lost: 336 bytes in 28 blocks.
> ==12385==      possibly lost: 1,296 bytes in 9 blocks.
> ==12385==    still reachable: 78,856,051 bytes in 21,748 blocks.
> ==12385==         suppressed: 0 bytes in 0 blocks.
> ==12385== Reachable blocks (those to which a pointer was found) are not
> shown. ==12385== To see them, rerun with: --leak-check=full
> --show-reachable=yes Killed
>
> Full logs of all tests as well as slapd.conf are attached.
>
> -- System Information:
> Debian Release: lenny/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: i386 (i686)
>
> Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores)
> Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
> Shell: /bin/sh linked to /bin/bash
>
> Versions of packages slapd depends on:
> ii  adduser               3.105              add and remove users and
> groups ii  coreutils             6.10-3             The GNU core utilities
> ii  debconf [debconf-2.0] 1.5.19             Debian configuration
> management sy ii  libc6                 2.7-8              GNU C Library:
> Shared libraries ii  libdb4.2              4.2.52+dfsg-4      Berkeley
> v4.2 Database Libraries [ ii  libgnutls26           2.2.1-3
> the GNU TLS library - runtime libr ii  libldap-2.4-2         2.4.7-5
> OpenLDAP libraries
> ii  libltdl3              1.5.26-1           A system independent dlopen
> wrappe ii  libperl5.8            5.8.8-12           Shared Perl library
> ii  libsasl2-2            2.1.22.dfsg1-17+b1 Cyrus SASL - authentication
> abstra ii  libslp1               1.2.1-7.1          OpenSLP libraries
> ii  libwrap0              7.6.dbs-14         Wietse Venema's TCP wrappers
> libra ii  perl [libmime-base64- 5.8.8-12           Larry Wall's Practical
> Extraction  ii  psmisc                22.6-1             Utilities that
> use the proc filesy ii  unixodbc              2.2.11-16          ODBC
> tools libraries
>
> Versions of packages slapd recommends:
> ii  libsasl2-modules      2.1.22.dfsg1-17+b1 Cyrus SASL - pluggable
> authenticat
>
> -- debconf information:
>   slapd/internal/adminpw: (password omitted)
> * slapd/password1: (password omitted)
> * slapd/password2: (password omitted)
> * slapd/allow_ldap_v2: false
>   slapd/password_mismatch:
>   slapd/tlsciphersuite:
>   slapd/suffix_change: false
>   slapd/fix_directory: true
>   slapd/invalid_config: true
> * shared/organization: Test domain for nss-ldapd
>   slapd/slave_databases_require_updateref:
>   slapd/dump_database_destdir: /var/backups/slapd-VERSION
>   slapd/upgrade_slapcat_failure:
>   slapd/slurpd_obsolete:
>   slapd/autoconf_modules: true
> * slapd/purge_database: false
> * slapd/domain: test.tld
> * slapd/backend: BDB
> * slapd/no_configuration: false
>   slapd/migrate_ldbm_to_bdb: false
> * slapd/move_old_database: true
>   slapd/dump_database: when needed
>   slapd/upgrade_slapadd_failure:
>
> --
> -- arthur - adejong@debian.org - http://people.debian.org/~adejong --



--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra ::  the leader in open source messaging and collaboration




Information forwarded to debian-bugs-dist@lists.debian.org, Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>:
Bug#465915; Package slapd. Full text and rfc822 format available.

Acknowledgement sent to Arthur de Jong <adejong@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #15 received at 465915@bugs.debian.org (full text, mbox):

From: Arthur de Jong <adejong@debian.org>
To: Quanah Gibson-Mount <quanah@zimbra.com>
Cc: 465915@bugs.debian.org
Subject: Re: [Pkg-openldap-devel] Bug#465915: segmentation fault in slapd under some load
Date: Fri, 15 Feb 2008 23:19:23 +0100
[Message part 1 (text/plain, inline)]
On Fri, 2008-02-15 at 10:57 -0800, Quanah Gibson-Mount wrote:
> This is most likely upstream bug ITS#5336.
> 
> It would be helpful to see the output in gdb of:
> 
> print *bdb
> 
> to see how the caches were configured.
> 
> For example, from ITS#5336, at frame 3, a print *bdb
> 
> would have been useful there.  If you can do something similarly in your 
> bug, that would be great.

This is basically what I get (full log attached):

# gdb /usr/sbin/slapd
[...]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5625b90 (LWP 25836)]
0xb7d0f160 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb) bt
#0  0xb7d0f160 in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0xb7f6351d in ldap_pvt_thread_mutex_lock () from /usr/lib/libldap_r-2.4.so.2
#2  0xb784583d in bdb_cache_return_entry_rw (bdb=0x81e9cd0, e=0x8208c2c, rw=0, lock=0xb5623fd4)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/back-bdb/cache.c:256
#3  0xb7839e12 in bdb_search (op=0x8327b10, rs=0xb5625168)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/back-bdb/search.c:909
#4  0x08077d13 in fe_op_search (op=0x8327b10, rs=0xb5625168)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/search.c:368
#5  0x0807853c in do_search (op=0x8327b10, rs=0xb5625168)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/search.c:217
#6  0x080757c6 in connection_operation (ctx=0xb5625248, arg_v=0x8327b10)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/connection.c:1083
#7  0x08075ed6 in connection_read_thread (ctx=0xb5625248, argv=0x14)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/connection.c:1210
#8  0xb7f62a44 in ?? () from /usr/lib/libldap_r-2.4.so.2
#9  0xb5625248 in ?? ()
#10 0x00000014 in ?? ()
#11 0x00000000 in ?? ()
(gdb) frame 3
#3  0xb7839e12 in bdb_search (op=0x8327b10, rs=0xb5625168)
    at /build/buildd/openldap2.3-2.4.7/servers/slapd/back-bdb/search.c:909
909 /build/buildd/openldap2.3-2.4.7/servers/slapd/back-bdb/search.c: No such file or directory.
  in /build/buildd/openldap2.3-2.4.7/servers/slapd/back-bdb/search.c
(gdb) print *bdb
$1 = {bi_dbenv = 0x823baf8, bi_dbenv_home = 0x81e9fa8 "/var/lib/ldap", bi_dbenv_xflags = 0,
  bi_dbenv_mode = 384, bi_ndatabases = 3, bi_databases = 0x823c1c0, bi_database_mutex = {__data = {
      __lock = 0, __count = 0, __owner = 0, __kind = 0, __nusers = 0, {__spins = 0, __list = {
          __next = 0x0}}}, __size = '\0' <repeats 23 times>, __align = 0}, bi_db_opflags = 0,
  bi_defaultmask = 0, bi_cache = {c_eifree = 0x8241418, c_idtree = 0x83c1568, c_lruhead = 0x8271638,
    c_lrutail = 0x83c0c48, c_dntree = {bei_parent = 0x0, bei_id = 0, bei_lockpad = 0, bei_state = 128,
      bei_finders = 0, bei_nrdn = {bv_len = 0, bv_val = 0x0}, bei_e = 0x8244464, bei_kids = 0x823f3d8,
      bei_kids_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __kind = 0, __nusers = 0, {
            __spins = 0, __list = {__next = 0x0}}}, __size = '\0' <repeats 23 times>, __align = 0},
      bei_lrunext = 0x0, bei_lruprev = 0x0}, c_maxsize = 1000, c_cursize = 1003, c_minfree = 1,
    c_eimax = 2000, c_eiused = 2010, c_leaves = 2005, c_purging = 0, c_locker = 6, c_rwlock = {__data = {
        __lock = 0, __nr_readers = 0, __readers_wakeup = 58, __writer_wakeup = 14,
        __nr_readers_queued = 0, __nr_writers_queued = 0, __flags = 0 '\0', __shared = 0 '\0',
        __pad1 = 0 '\0', __pad2 = 0 '\0', __writer = 0},
      __size = "\000\000\000\000\000\000\000\000:\000\000\000\016", '\0' <repeats 18 times>, __align = 0},
    c_lru_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __kind = 0, __nusers = 0, {__spins = 0,
          __list = {__next = 0x0}}}, __size = '\0' <repeats 23 times>, __align = 0}, c_count_mutex = {
      __data = {__lock = 0, __count = 0, __owner = 0, __kind = 0, __nusers = 0, {__spins = 0, __list = {
            __next = 0x0}}}, __size = '\0' <repeats 23 times>, __align = 0}, c_eifree_mutex = {__data = {
        __lock = 0, __count = 0, __owner = 0, __kind = 0, __nusers = 0, {__spins = 0, __list = {
            __next = 0x0}}}, __size = '\0' <repeats 23 times>, __align = 0}}, bi_attrs = 0x81d0268,
  bi_nattrs = 1, bi_search_stack = 0x0, bi_search_stack_depth = 16, bi_linear_index = 0, bi_txn_cp = 1,
  bi_txn_cp_min = 30, bi_txn_cp_kbyte = 512, bi_txn_cp_task = 0x81e98d8, bi_index_task = 0x0,
  bi_lock_detect = 1, bi_shm_key = 0, bi_lastid = 2032, bi_lastid_mutex = {__data = {__lock = 0,
      __count = 0, __owner = 0, __kind = 0, __nusers = 0, {__spins = 0, __list = {__next = 0x0}}},
    __size = '\0' <repeats 23 times>, __align = 0}, bi_idl_cache_max_size = 0, bi_idl_cache_size = 0,
  bi_idl_tree = 0x0, bi_idl_lru_head = 0x0, bi_idl_lru_tail = 0x0, bi_idl_tree_rwlock = {__data = {
      __lock = 0, __nr_readers = 0, __readers_wakeup = 0, __writer_wakeup = 0, __nr_readers_queued = 0,
      __nr_writers_queued = 0, __flags = 0 '\0', __shared = 0 '\0', __pad1 = 0 '\0', __pad2 = 0 '\0',
      __writer = 0}, __size = '\0' <repeats 31 times>, __align = 0}, bi_idl_tree_lrulock = {__data = {
      __lock = 0, __count = 0, __owner = 0, __kind = 0, __nusers = 0, {__spins = 0, __list = {
          __next = 0x0}}}, __size = '\0' <repeats 23 times>, __align = 0}, bi_alock_info = {al_fd = 11,
    al_slot = 2}, bi_db_config_path = 0x81e9850 "/var/lib/ldap/DB_CONFIG", bi_db_config = 0x8230b48,
  bi_monitor = {bdm_cb = 0x0, bdm_ndn = {bv_len = 0, bv_val = 0x0}}, bi_flags = 3}

Hope this is any use (I'm not really a gdb hero so if you need more
details, please spell it out).

> Also, all the steps to reproduce this.

I don't have a very clean test case because I found this while testing
my own software. Anyway, this does it for me:

1. download and unpack
   http://ch.tudelft.nl/~arthur/nss-ldapd/nss-ldapd-0.6.tar.gz

2. compile:
   ./configure --enable-warnings --enable-debug
   make

3. set up slapd with earlier provided slapd.conf and attached LDIF file
   (tests expect slapd to listen on localhost but you can tune
   tests/nss-ldapd-test.conf)

4. run tests:
   make check

Output I'm getting (only test_myldap is significant):
[...]
PASS: test_tio
PASS: test_cfg
test_myldap.sh: using LDAP server ldap://127.0.0.1/
test_myldap: test_search(): getting session...
test_myldap: test_search(): doing search...
nslcd: DEBUG: myldap_search(base="dc=test,dc=tld", filter="(objectclass=posixaccount)")
nslcd: DEBUG: simple anonymous bind to ldap://127.0.0.1/
nslcd: connected to LDAP server ldap://127.0.0.1/
[...]
test_myldap: test_threads(): [worker 4] [9] DN uid=bbertao,ou=lotsofpeople,dc=test,dc=tld
test_myldap: test_threads(): [worker 4] ...
nslcd: ldap_result() failed: Can't contact LDAP server
nslcd: ldap_result() failed: Can't contact LDAP server
FAIL: test_myldap.sh

Please note that the test also includes some operations that should fail
(e.g. connecting to ldapi://%2fdev%2fnull/) but these can be disabled by
commenting out test_connections() in tests/test_myldap.c).

Btw, if by any chance you find any glaring errors in my code I'd like to
hear about it. I'm still not 100% comfortable with using OpenLDAP.

Thanks

-- 
-- arthur - adejong@debian.org - http://people.debian.org/~adejong --
[test.ldif.gz (application/x-gzip, attachment)]
[gdb-slapd-d273.txt.gz (application/x-gzip, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>:
Bug#465915; Package slapd. Full text and rfc822 format available.

Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #20 received at 465915@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: 465915-submitter@bugs.debian.org, 465915@bugs.debian.org
Subject: Re: segmentation fault in slapd under some load
Date: Sat, 28 Jun 2008 10:40:08 -0700
Quanah, did Arthur's follow-up give enough information to confirm that this
bug is the same as ITS#5336?

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org




Message sent on to Arthur de Jong <adejong@debian.org>:
Bug#465915. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>:
Bug#465915; Package slapd. Full text and rfc822 format available.

Acknowledgement sent to Arthur de Jong <adejong@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #28 received at 465915@bugs.debian.org (full text, mbox):

From: Arthur de Jong <adejong@debian.org>
To: Steve Langasek <vorlon@debian.org>, 465915 <465915@bugs.debian.org>
Subject: Re: Bug#465915: segmentation fault in slapd under some load
Date: Sat, 28 Jun 2008 21:32:44 +0200
[Message part 1 (text/plain, inline)]
On Sat, 2008-06-28 at 10:40 -0700, Steve Langasek wrote:
> Quanah, did Arthur's follow-up give enough information to confirm that this
> bug is the same as ITS#5336?

I am currently using slapd 2.4.9-1 and have not seen any stability
problems since the upgrade (just did a test that would crash slapd with
older versions). I think it's safe to say that version 2.4.9-1 does not
have the described problem.

-- 
-- arthur - adejong@debian.org - http://people.debian.org/~adejong --
[signature.asc (application/pgp-signature, inline)]

Reply sent to Steve Langasek <vorlon@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Arthur de Jong <adejong@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #33 received at 465915-done@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: Arthur de Jong <adejong@debian.org>
Cc: 465915-done@bugs.debian.org
Subject: Re: Bug#465915: segmentation fault in slapd under some load
Date: Sat, 28 Jun 2008 23:21:05 -0700
Version: 2.4.9-1

On Sat, Jun 28, 2008 at 09:32:44PM +0200, Arthur de Jong wrote:
> On Sat, 2008-06-28 at 10:40 -0700, Steve Langasek wrote:
> > Quanah, did Arthur's follow-up give enough information to confirm that this
> > bug is the same as ITS#5336?

> I am currently using slapd 2.4.9-1 and have not seen any stability
> problems since the upgrade (just did a test that would crash slapd with
> older versions). I think it's safe to say that version 2.4.9-1 does not
> have the described problem.

Ok, marking it as closed.  Thanks!

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 27 Jul 2008 07:26:47 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 15:35:55 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.