Bug 758830 - Hang possible in schema compat when calling in a transaction
Summary: Hang possible in schema compat when calling in a transaction
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: slapi-nis
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 759183
Blocks: 766320
TreeView+ depends on / blocked
 
Reported: 2011-11-30 19:31 UTC by Rob Crittenden
Modified: 2012-02-04 05:33 UTC (History)
2 users (show)

Fixed In Version: slapi-nis-0.36-1.fc16
Clone Of:
: 766320 (view as bug list)
Environment:
Last Closed: 2012-02-04 05:26:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Carry the current transaction id in some new pblocks (3.81 KB, patch)
2011-11-30 19:31 UTC, Rob Crittenden
no flags Details | Diff

Description Rob Crittenden 2011-11-30 19:31:44 UTC
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

Comment 1 Nalin Dahyabhai 2011-11-30 23:01:16 UTC
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.

Comment 2 Rob Crittenden 2011-12-01 16:09:05 UTC
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

Comment 3 Nalin Dahyabhai 2012-01-19 19:43:17 UTC
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.

Comment 4 Fedora Update System 2012-01-19 20:03:02 UTC
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

Comment 5 Fedora Update System 2012-01-19 20:03:21 UTC
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

Comment 6 Fedora Update System 2012-01-21 21:49:40 UTC
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).

Comment 7 Fedora Update System 2012-02-04 05:26:38 UTC
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.

Comment 8 Fedora Update System 2012-02-04 05:33:23 UTC
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.


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