Bug 2124214

Summary: schema compat plugin deadlock on delete post op
Product: Red Hat Enterprise Linux 8 Reporter: Anton Bobrov <abobrov>
Component: slapi-nisAssignee: Alexander Bokovoy <abokovoy>
Status: NEW --- QA Contact: ipa-qe
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.6CC: abokovoy, cilmar, dcamilof, frenaud, ftrivino, msauton, pasik, progier, rcritten, tbordaz, tmihinto, tscherf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anton Bobrov 2022-09-05 10:01:11 UTC
Description of problem:

The IPA schema compat plugin for RHDS deadlocks on delete post op. One thread is trying to acquire a write lock while in delete post op while several other threads are trying to acquire read locks in bind ops. It is not clear which thread is actually holding the lock/s. No FATAL error messages are reported in the logs for lock/unlock API. Because of this issue the RHDS gets into a "hang" like state where it is not responsive to operations which is obviously a problem. There is one thread that is doing post op plugin ops for add op tho it is not in schema compat plugin. And there are a few threads that just stuck in backend search ops inside bdb code likely because the locks they need are held by thread/s stuck in schema compat plugin operations. 

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

OS: Red Hat Enterprise Linux release 8.6 (Ootpa)
     Kernel: 4.18.0-372.13.1.el8_6.x86_64

389-ds: 1.4.3.28-6

IPA: 4.9.8-7


How reproducible:

We do not have a local lab reproducer however it happens fairly often on a customer system (just one specific master).


Additional info:

We havent gathered any RHDS PLUGIN level logs as it does not look like they would be of much help to debug this. I see there is DEBUG_MAP_LOCK flag that can be helpful however there doesnt seem to be any way to enable it dynamically. Unless this is a known issue or someone familiar with the related code can pin it as is a debug build with DEBUG_MAP_LOCK enabled is probably the next step to do.

Comment 27 Pierre Rogier 2023-08-11 08:51:36 UTC
*** Bug 2211904 has been marked as a duplicate of this bug. ***

Comment 28 Pierre Rogier 2023-08-11 09:00:27 UTC
*** Bug 2218887 has been marked as a duplicate of this bug. ***