cgrzemba / 389-ds-base

Forked from 389-ds-base 5 years ago
Clone

36245ab Ticket #48338 - SimplePagedResults -- abandon could happen between the abandon check and sending results

Authored and Committed by nhosoi 8 years ago
    Ticket #48338 - SimplePagedResults -- abandon could happen between the abandon check and sending results
    
    Description: commit 390b8bd9076e8976facc0858e60985d6b4fac05c introduced
    a self deadlock (see also bz1282607: 389-ds-base-1.2.11.15-67.el6_7 hang)
    
    First phase of the following approach:
      Fix design by Ludwig Krispenz and Rich Megginson (Thanks!)
      Investigate the connection params used in the pblock access one by one and.
      - for fields not used, either remove the access or just leave it as is
      - With a big ASSERT to flag cases if the field is ever used, and a plan to
        deprecate and remove the field.
      - for fields with atomic access, like c_isreplication_session remove the mutex
      - for filelds requiring copying, define them directly in the pblock and when
        the pblock is created, populate them from the connection, the pblock access
        would no longer need the c_mutex.
    Removing PR_Lock(c_mutex) from slapi_pblock_get(SLAPI_CONN_CLIENTNETADDR) since
    acquiring the lock is not necessary for the atomic reads.  This change solves
    the self deadlock.
    
    https://fedorahosted.org/389/ticket/48338#comment:11
    
    Reviewed by nkinder@redhat.com and mreynolds@redhat.com (Thank you, Nathan and Mark!)
    
    (cherry picked from commit 79ca67d1fc5d50d8a9ae6b686b9564f3960f8592)
    
        
file modified
+2 -4