Created attachment 538758 [details] Carry the current transaction id in some new pblocks Description of problem: I'm in the process of converting the IPA password plugin to execute as a transaction plugin. This causes 389-ds to hang in the backend when the schema-compat plugin is invoked as part of the call process. Disabling schema compat resolves the issue. The problem exhibits itself when a plugin calls slapi_pblock_new() or slapi_pblock_init() when inside a transaction and doesn't get the parent TXN value. I've attached a patch that applies this narrowly. I haven't tested all possible paths but I'm able to do these which I think exercises it fairly well: 1. ipa user-add --first Tim --last User tuser1 --password 2. ldapsearch -Y GSSAPI -b cn=compat,dc=example,dc=com 3. ypcat -h `hostname` -d example.com passwd 4. ipa unit tests I didn't carry this across to all new pblock creation as I'm not that familiar with the code. Version-Release number of selected component (if applicable): slapi-nis-0.25-1.fc15 389-ds-base-1.2.10-0.5.a5.fc15
If the compat tree needs to support the "Read Your Writes" semantics outlined at http://www.directory.fedora.redhat.com/wiki/LDAP_Transactions , then it'll need to do more than simply carry the transaction information to the pblocks used for internal operations when it needs to update its cached data: that cache is going to have to become transaction-aware so that searching it works as expected.
Note that I can cause a similar deadlock with schema-compat disabled and memberof configured as betxnpostoperation, BZ https://bugzilla.redhat.com/show_bug.cgi?id=759183
Starting with 0.32, most of the plugin's update logic is performed in a be-txn-postoperation callback which passes along the SLAPI_TXN value for any internal operations that it performs, so this should be working correctly now. Please retest with the candidate update, once it's built, and let me know if you're still seeing deadlocks in the plugin.
slapi-nis-0.34-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/slapi-nis-0.34-1.fc15
slapi-nis-0.34-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/slapi-nis-0.34-1.fc16
Package slapi-nis-0.34-1.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing slapi-nis-0.34-1.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-0722/slapi-nis-0.34-1.fc16 then log in and leave karma (feedback).
slapi-nis-0.36-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
slapi-nis-0.36-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.