#48349 Eliminate the unnecessary lock on conn->c_mutex
Closed: wontfix None Opened 8 years ago by nhosoi.

Approach suggested by Ludwig and Rich:

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.

It is expected to reduce the chance of self deadlock.

See also:
Attachment 0001-Ticket-48338-SimplePagedResults-abandon-could-happen.3.patch​ added
git patch file (master) -- fixing a self deadlock introduced by the previous patch 0001-Ticket-48338-SimplePagedResults?-abandon-could-happen.patch (take 2)


Comment by Ludwig regarding the patch 4 [0].

but is the assignment for SLAPI_CONN_CLIENTNETADDR atomic, it does a copy of an PRNetAddr struct. This would be a candidate for keeping a copy in the pblock and access it from the pblock and not via pb_conn.
It probably does no harm, I think the net addr will not change during the life of the connection, so it should be fine.

[0] https://fedorahosted.org/389/attachment/ticket/48338/0001-Ticket-48338-SimplePagedResults-abandon-could-happen.4.patch

acl self deadlock on conn mutex
deadlock.txt

Note - we are seeing a self deadlock on conn mutex for getting the CONN_DN. Attaching the stack trace showing the self deadlock

Metadata Update from @mreynolds:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.3.5.0

7 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/1680

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: Duplicate)

3 years ago

Login to comment on this ticket.

Metadata