ftweedal / 389-ds-base

Forked from 389-ds-base 6 years ago
Clone

5cfd3de Ticket 48597 Deadlock when rebuilding the group of authorized replication managers

Authored and Committed by tbordaz 8 years ago
    Ticket 48597 Deadlock when rebuilding the group of authorized replication managers
    
    Bug description:
                When the replication managers list is defined in a group, the members
            of the groups are refreshed using an internal search. The refresh is done
            while holding the replica lock (start_replication_session).
            If at the same time a write operation holding some DB page , need to lock
            the replica (i.e. generated a csn) it can deadlock if the internal search
            need to access the same DB page hold by the write operation.
    
    Fix description:
                The fix is to trigger the internal search of the group members without
            holding the replica lock. The lookup is done with a local variable that
            replace the replica field (groupdn_list) once the replica lock is acquired.
            If the replica updatedn_groups has changed during the lookup (while the
            replica lock was release) then groupdn_list is not changed.
    
    https://fedorahosted.org/389/ticket/48597
    
    Reviewed by: Noriko Hosoi (thanks Noriko !)
    
    Platform tested: F23 (but did not find reproducible test case for the hang)
    
    Flag day: no
    
    Doc impact: no