Simo Sorce wrote:
On Thu, 2009-10-15 at 15:28 +0200, Pavel Zuna wrote:
Rob Crittenden wrote:
One of the last steps of an install is to run through any updates. This change adds a sleep() prior to calling tasks to ensure postop writes are done

We were seeing a rare deadlock of DS when creating the memberOf task because one thread was adding memberOf in a postop while another was trying to create an index and this was causing a PRLock deadlock.

rob

sleep might not be the best synchronization mechanism out there, but I think that in this case it is pretty much the only one available and it gets the job done, so ack.

So are we covering a DS bug here ? Or are we doing an asynchronous ldap
request when we should do a synchronous one and wait for it to finish
(I've fixed another place where we were doing that and racing against
our own requests) ?

Simo.


This works around a bug in DS that was causing a deadlock. We are adding entries that write memberOf which is done in a postop. We then create an index for memberof and it is deadlocking.

Updates are all done synchronously so the sleep should give the postop writes plenty of time to finish up (hoping this isn't famous last words).

I think that given that this updater code has been around for quite some time and nobody has noticed until now means that the problem probably isn't that big so sleep() should work fine.

rob

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to