#49219 Deadlock when deleting user
Closed: wontfix 6 years ago Opened 7 years ago by zeduke.

Issue Description

When deleting a user, deadlock occures "sometimes". Only a restart of dirsrv resolve the problem.
I say "sometimes" because it is not then only condition of the bug : most delete operations are successful.

Package Version and Platform

Centos 7.3
389-ds-base-libs-1.3.5.10-18.el7_3.x86_64
389-ds-base-snmp-1.3.5.10-18.el7_3.x86_64
389-ds-base-debuginfo-1.3.5.10-18.el7_3.x86_64
389-ds-base-1.3.5.10-18.el7_3.x86_64

Steps to reproduce

I haven't achieved a deterministic way to reproduce this bug. I have only determined what is the minimal context of the bug. I miss a element I think. So someone can considers that necessary but not sufficient conditions

  1. Delete a user : the operation can be time expensive because of memberOf Plugin and Managed Entry plugin
  2. Some LDAP ABANDON of LDAP search.
  3. SASL/GSSAPI connection of a replica : that is the last access log before deadlock

One time it occurs when adding a user

Actual results

deadlock when deleting user

Expected results

no deadlock when deleting occurs

stacktrace.1492092731.txt
dirsrv_access_log.txt


In this ticket, likely the deadlock is between Threads 30 and 21 that are taking locks (DB and schema-compat map) in opposite order. (Need db lock dump and dumped core of DS)

We know it exists such scenario of deadlocks and are working on a fix.
But I think your IPA configuration is not valid.
You should have:

schema-compat-ignore-subtree: cn=dna,cn=ipa,cn=etc,<main_suffix>
schema-compat-restrict-subtree: <main_suffix>
schema-compat-restrict-subtree: cn=Schema Compatibility,cn=plugins,cn=config

For the following entries:

dn: cn=computers,cn=Schema Compatibility,cn=plugins,cn=config
dn: cn=groups,cn=Schema Compatibility,cn=plugins,cn=config
dn: cn=ng,cn=Schema Compatibility,cn=plugins,cn=config
dn: cn=sudoers,cn=Schema Compatibility,cn=plugins,cn=configdn: cn=users,cn=Schema Compatibility,cn=plugins,cn=config
dn: cn=users,cn=Schema Compatibility,cn=plugins,cn=config

IMHO this ticket should rather be on IPA than DS because configuration of schema-compat is done in IPA.

In conclusion:
- if the deadlock occurs again and you have support case, please get a core dump of DS, also a dump of DB lock (db-stat -CA -N /var/lib/dirsrv/slapd-<suffix>/db, and usual data (dse.ldif and DS access/errors)
- Try the proposed Schema-compat configuration if it improves the situations
- What version DS/IPA are you using ?

Metadata Update from @tbordaz:
- Custom field type adjusted to defect

7 years ago

Metadata Update from @tbordaz:
- Issue assigned to tbordaz

6 years ago

This bug is a slapi-nis bug. I opened https://pagure.io/slapi-nis/issue/14 to track it and closing this one

Metadata Update from @tbordaz:
- Issue close_status updated to: invalid
- Issue status updated to: Closed (was: Open)

6 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/2278

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: invalid)

3 years ago

Login to comment on this ticket.

Metadata
Attachments 2
Attached 7 years ago View Comment