Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 455357 - slapd crashes in modify operation on dbd database
Summary: slapd crashes in modify operation on dbd database
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: openldap
Version: 9
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Zeleny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-15 02:09 UTC by Frantisek Hanzlik
Modified: 2009-03-19 15:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-03-19 15:10:13 UTC


Attachments (Terms of Use)

Description Frantisek Hanzlik 2008-07-15 02:09:27 UTC
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)

Comment 1 Frantisek Hanzlik 2008-07-15 12:10:48 UTC
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;
 
 			/*


Comment 2 Jan Safranek 2008-07-16 11:36:38 UTC
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.

Comment 3 Fedora Update System 2008-07-21 08:19:15 UTC
openldap-2.4.10-1.fc9 has been submitted as an update for Fedora 9

Comment 4 Fedora Update System 2008-07-23 07:20:56 UTC
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

Comment 5 Frantisek Hanzlik 2008-07-23 21:35:41 UTC
After working 1 day with openldap 2.4.10, all looks fine, and described problem
is avay.

Comment 6 Fedora Update System 2008-08-07 23:51:03 UTC
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.

Comment 7 Fedora Admin XMLRPC Client 2009-03-19 07:36:58 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.


Note You need to log in before you can comment on or make changes to this bug.