[Pkg-openldap-devel] Bug#816294: slapd segfault on update dbconfig

Ryan Tandy ryan at nardis.ca
Fri Mar 11 05:22:43 UTC 2016


Control: tag -1 confirmed
Control: found -1 2.4.42+dfsg-2

On Tue, Mar 01, 2016 at 01:58:43PM +0100, Thomas Otto wrote:
>service slapd stop
>rm -f /var/lib/ldap/*/*
>service slapd start
>
>... (wait some time) ...
>
>ldapmodify ...
>
>dn: olcDatabase={2}hdb,cn=config
>changetype: modify
>replace: olcDbConfig
>olcDbConfig: set_cachesize 3 0 1
>olcDbConfig: set_lk_max_locks   20000
>olcDbConfig: set_lk_max_objects 10000
>olcDbConfig: set_lk_max_lockers 1500
>
>modifying entry "olcDatabase={2}hdb,cn=config"
>ldap_modify: Other (e.g., implementation specific) error (80)
>	additional info: failed to reopen database, rc=22
>
>
>I started slapd with debug output and attach this ...
>
>I Attach also a filterd config ...

Thank you. Reproduced using your config and the ldapmodify above.

0x00007fffefac8929 in hdb_modify (op=0x7fffffffde00, rs=0x7fffffffdd90) at modify.c:555
555	modify.c: No such file or directory.
(gdb) bt
#0  0x00007fffefac8929 in hdb_modify (op=0x7fffffffde00, rs=0x7fffffffdd90) at modify.c:555
#1  0x00007ffff1a266c2 in syncprov_checkpoint (op=0x7fffffffe500, on=<optimized out>, on=<optimized out>)
    at ../../../../../servers/slapd/overlays/syncprov.c:1467
#2  0x00007ffff1a268ec in syncprov_db_close (be=0x5555559b78c0, cr=<optimized out>)
    at ../../../../../servers/slapd/overlays/syncprov.c:3170
#3  0x00005555555fc208 in over_db_close (be=0x5555559b78c0, cr=0x0) at ../../../../servers/slapd/backover.c:176
#4  0x000055555559bf7b in backend_shutdown (be=0x5555559b78c0) at ../../../../servers/slapd/backend.c:376
#5  0x000055555557272a in main (argc=<optimized out>, argv=<optimized out>) at ../../../../servers/slapd/main.c:1022

modify.c:555 is:

        rs->sr_err = TXN_BEGIN( bdb->bi_dbenv, NULL, &ltid,
                bdb->bi_db_opflags );

and TXN_BEGIN is:

#define TXN_BEGIN(env,p,t,f)            (env)->txn_begin((env), p, t, f)

but:

(gdb) p bdb->bi_dbenv
$4 = (DB_ENV *) 0x0

On a simpler setup, just a single hdb database with the syncprov overlay 
added, I also get a crash, but with a different signature:

#0  __txn_abort_pp (txn=0x555555aad940) at ../src/txn/txn.c:1022
#1  0x00007ffff7996b6f in ldap_pvt_thread_pool_context_reset (vctx=0x7ffff7bd5580 <ldap_int_main_thrctx>)
    at ../../../../libraries/libldap_r/tpool.c:1020
#2  0x00005555555bc01c in slap_destroy () at ../../../../servers/slapd/init.c:248
#3  0x0000555555570d79 in main (argc=11, argv=<optimized out>) at ../../../../servers/slapd/main.c:1034

I'm not sure what's in between #0 and #1 there - maybe bdb_reader_free.

Anyway: at this point, upstream considers the BDB and HDB backends EOL, 
provided for the convenience of existing users, but not really 
maintained any more; migrating to the new LMDB backend is encouraged.  
I'll see what I can do, but I have to warn you that I'm not optimistic 
about actually getting this fixed. It looks non-trivial...



More information about the Pkg-openldap-devel mailing list