Description of problem: When modify existing entry in dbd DB slapd crashes with message: slapd: /build/buildd/openldap2.3-2.4.7/servers/slapd/schema_init.c:366: octetStringIndexer: Assertion `i > 0' failed. Version-Release number of selected component (if applicable): openldap-2.4.8-6.fc9 How reproducible: always when user modify record in ldap address book. Steps to Reproduce: ldap DB is accessed from web app (PHP script). I not tried invoke crash via e.g. ldapmodify. Actual results: slapd crashes with SIGABRT Expected results: slightly stable goings Additional info: - bug appeared after upgrade F6 -> F9. - it appears as this bug is already reported in Ubuntu and Debian distros: https://bugs.launchpad.net/ubuntu/+source/openldap2.3/+bug/220724 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474161 (there are patches for it too)
After applying Ubuntu patch, slapd no longer crashes and work OK. Slightly modified patch version for openldap 2.4.8 : diff -ur openldap-2.4.8.orig/servers/slapd/back-bdb/modify.c openldap-2.4.8/servers/slapd/back-bdb/modify.c --- openldap-2.4.8.orig/servers/slapd/back-bdb/modify.c 2008-02-12 00:26:46.000000000 +0100 +++ openldap-2.4.8/servers/slapd/back-bdb/modify.c 2008-07-15 04:30:35.000000000 +0200 @@ -283,7 +283,7 @@ /* attribute was completely deleted */ vals = ap->a_nvals; } - if ( !BER_BVISEMPTY( vals )) { + if ( !BER_BVISNULL( vals )) { rc = bdb_index_values( op, tid, ap->a_desc, vals, e->e_id, SLAP_INDEX_DELETE_OP ); if ( rc != LDAP_SUCCESS ) { diff -ur openldap-2.4.8.orig/servers/slapd/modify.c openldap-2.4.8/servers/slapd/modify.c --- openldap-2.4.8.orig/servers/slapd/modify.c 2008-02-12 00:26:44.000000000 +0100 +++ openldap-2.4.8/servers/slapd/modify.c 2008-07-15 04:30:35.000000000 +0200 @@ -589,6 +589,7 @@ ml->sml_values[nvals] = pval; } } + ml->sml_values[nvals].bv_len = 0; ml->sml_numvals = nvals; /*
I haven't forgotten the bug, currently I plan to rebase openldap to openldap-2.4.10 to fix another issue. This bug would be fixed as side-effect... Stay tuned.
openldap-2.4.10-1.fc9 has been submitted as an update for Fedora 9
openldap-2.4.10-1.fc9 has been pushed to the Fedora 9 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update openldap'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-6653
After working 1 day with openldap 2.4.10, all looks fine, and described problem is avay.
openldap-2.4.10-1.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.