RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1007451 - schema-compat plugin should ignore slapi task entries to avoid possible DS deadlock
Summary: schema-compat plugin should ignore slapi task entries to avoid possible DS de...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: slapi-nis
Version: 7.0
Hardware: Unspecified
OS: All
medium
high
Target Milestone: rc
: ---
Assignee: Nalin Dahyabhai
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-12 14:06 UTC by mreynolds
Modified: 2014-06-18 01:22 UTC (History)
4 users (show)

Fixed In Version: slapi-nis-0.49-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:04:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description mreynolds 2013-09-12 14:06:38 UTC
Description of problem:

Potential deadlocks can occur when tasks are added to the Directory Server.  Where the task itself creates new thread and makes database updates, and the task add operation also triggers post plugins to fire off.

Version-Release number of selected component (if applicable):


How reproducible:

Sometimes

Steps to Reproduce:
1. Install FreeIPA server:
# ipa-server-install

2. Authenticate as admin:
# kinit admin

3. Add a hostgroup:
# ipa hostgroup-add --desc="Web Servers" webservers

4. Add a host:
# ipa host-add web1.example.com --force

5. Add an automember rule:
# ipa automember-add --type=hostgroup webservers
# ipa automember-add-condition --key=fqdn --type=hostgroup --inclusive-regex=^web[1-9]+\.example\.com webservers

6. Try to rebuild membership:
# cat rebuild.ldif 
dn: cn=rt,cn=automember rebuild membership,cn=tasks,cn=config
changetype: add
objectClass: top
objectClass: extensibleObject
cn: rt
basedn: cn=computers,cn=accounts,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com
filter: (fqdn=*)
scope: sub

7. ldapmodify -x -D 'cn=directory manager' -w password -f rebuild.ldif
adding new entry "cn=rt,cn=automember rebuild membership,cn=tasks,cn=config"

Actual results:

The ldapmodify in step 7 hangs

Expected results:

ldapmodify does not hang the Directory Server

Comment 3 Martin Kosek 2013-09-17 11:31:21 UTC
Alexander or Nalin, will you be able to address this in slapi-nis?

Comment 4 Nalin Dahyabhai 2013-09-17 14:44:51 UTC
(In reply to Martin Kosek from comment #3)
> Alexander or Nalin, will you be able to address this in slapi-nis?

I'm working on it.

Comment 5 Nalin Dahyabhai 2013-09-19 19:13:17 UTC
I'm having trouble reproducing this bug in a VM with these packages:
389-ds-base-1.3.1.6-4.el7
ipa-server-3.3.1-3.el7
slapi-nis-0.48-1.el7

If you are still seeing this on your system with 0.48, can you check if 0.49 fixes it?  For now, this scratch build is all I can offer:
https://brewweb.devel.redhat.com//taskinfo?taskID=6305170

Comment 6 mreynolds 2013-09-19 19:22:02 UTC
I was never able to reproduce the issue.  Ana was able to reproduce this though(pretty consistently), maybe she still has a system setup that can be used?

Comment 7 Nalin Dahyabhai 2013-09-24 18:39:42 UTC
Alright, it looks like 0.49, which introduces additional run-time configuration options which default to excluding the cn=tasks,cn=config subtree from consideration by the plugins, avoids this for both Ana's and my testing.

Starting from Ana's notes, we've been able to trigger the bug, but only with a freshly-installed system (not just a fresh IPA installation on an existing system, which is weird) the first time an "automember rebuild membership" task is run.  That scenario seems to hit the locking problem fairly reliably.

Comment 9 Namita Soman 2014-01-28 15:39:21 UTC
Verified using ipa-server-3.3.3-13.el7.x86_64, slapi-nis-0.52-2.el7.x86_64

Test automation output:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-automember-bugzilla-003: bz1007451 schema-compat plugin should ignore slapi task entries to avoid possible DS deadlock
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

----------------------------
Added hostgroup "webservers"
----------------------------
  Host-group: webservers
  Description: Web Servers
:: [   PASS   ] :: Running 'ipa hostgroup-add --desc="Web Servers" webservers' (Expected 0, got 0)
------------------------------
Added host "web1.testrelm.com"
------------------------------
  Host name: web1.testrelm.com
  Principal name: host/web1.testrelm.com
  Password: False
  Keytab: False
  Managed by: web1.testrelm.com
:: [   PASS   ] :: Running 'ipa host-add web1.testrelm.com --force' (Expected 0, got 0)
----------------------------------
Added automember rule "webservers"
----------------------------------
  Automember Rule: webservers
:: [   PASS   ] :: Running 'ipa automember-add --type=hostgroup webservers' (Expected 0, got 0)
----------------------------------
Added condition(s) to "webservers"
----------------------------------
  Automember Rule: webservers
  Inclusive Regex: fqdn=^web[1-9]+.testrelm.com
----------------------------
Number of conditions added 1
----------------------------
:: [   PASS   ] :: Running 'ipa automember-add-condition --key=fqdn --type=hostgroup --inclusive-regex=^web[1-9]+\.testrelm\.com webservers' (Expected 0, got 0)
:: [   PASS   ] :: Running 'ipa host-show web1.testrelm.com --all > /tmp/tmpout.ipaautomember_bz_1007451.out' (Expected 0, got 0)
:: [   PASS   ] :: File '/tmp/tmpout.ipaautomember_bz_1007451.out' should not contain 'Member of host-groups: webservers' 
adding new entry "cn=rt,cn=automember rebuild membership,cn=tasks,cn=config"

:: [   PASS   ] :: Running 'ldapmodify -x -D 'cn=directory manager' -w Secret123 -f /tmp/rebuild.ldif' (Expected 0, got 0)
:: [   PASS   ] :: Running 'ipa host-show web1.testrelm.com --all > /tmp/tmpout.ipaautomember_bz_1007451.out' (Expected 0, got 0)
:: [   PASS   ] :: File '/tmp/tmpout.ipaautomember_bz_1007451.out' should contain 'Member of host-groups: webservers'

Comment 10 Ludek Smid 2014-06-13 11:04:09 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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