[karmic] [PATCH] slapd hangs at 100% cpu and is unkillable

Bug #485026 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openldap
Fix Committed
Undecided
Unassigned
openldap (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

slapd-2.4.18-0ubuntu1

Steps to reproduce:
1. apt-get install slapd
2. "ldapmodify -H ldapi:/// -Y EXTERNAL < base.ldif" (file attached to this ticket)
3. the ldapmodify hangs and slapd consumes all available cpu
4. slapd can now only be killed with the -9 signal

I tried to cut down the base.ldif as much as possible. I had a much bigger ldif file before.

I suspect a race or an ordering issue, because removing any one of the overlays makes the ldapmodify work.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Interesting, looks like ordering is an issue.

In this order, slapd hangs:
adding new entry "olcOverlay=refint,olcDatabase={1}hdb,cn=config"
adding new entry "olcOverlay=syncprov,olcDatabase={1}hdb,cn=config"
adding new entry "o=example,c=us" <---- HANGS

In this other order, it works:
adding new entry "olcOverlay=syncprov,olcDatabase={1}hdb,cn=config"
adding new entry "olcOverlay=refint,olcDatabase={1}hdb,cn=config"
adding new entry "o=example,c=us"

Note: when testing again, you need to clear the database and the config, or just purge slapd and reinstall. Running that ldapmodify command twice in a row won't work.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I just built a 2.4.19 package for karmic and it exhibits the same problem.

Revision history for this message
Chuck Short (zulcss) wrote :

I was able to reproduce this.

Regards
chuck

Changed in openldap (Ubuntu):
status: New → Confirmed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

It also happens with openldap-2.4.20 which was just released.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Attached is a gdb backtrace with debugging symbols from the hung process. I'll also attach the output of slapd -d -1, and probably open a bug upstream.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

And now the slapd -d -1 output

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

To help upstream to reproduce this bug, I'm also attaching a tarball containing the whole slapd.d contents as they are before running the ldapmodify command that triggers the issue. There is no database yet defined except the cn=config one.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

ITS 6408 filed upstream

Revision history for this message
Howard Chu (hyc) wrote :

Fixed in CVS slapd/bconfig.c 1.402

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I applied the diff the Howard mentioned (http://www.openldap.org/devel/cvsweb.cgi/servers/slapd/bconfig.c.diff?r1=1.401&r2=1.402&hideattic=1&sortbydate=0) to 2.4.20 and now it works!

Thanks!

Changed in openldap:
status: New → Fix Committed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The same patch also worked in 2.4.18, but it applied with some offsets.

summary: - [karmic] slapd hangs at 100% cpu and is unkillable
+ [karmic] [PATCH] slapd hangs at 100% cpu and is unkillable
Revision history for this message
Chuck Short (zulcss) wrote :

This has been fixed in lucid.

Regards
chuck

Changed in openldap (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.