Bug 1417338 - To debug DB_DEADLOCK condition, allow to reset DB_TXN_NOWAIT flag on txn_begin
Summary: To debug DB_DEADLOCK condition, allow to reset DB_TXN_NOWAIT flag on txn_begin
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: thierry bordaz
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-28 02:11 UTC by Noriko Hosoi
Modified: 2020-09-13 21:54 UTC (History)
5 users (show)

Fixed In Version: 389-ds-base-1.3.6.1-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:14:10 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2135 0 None None None 2020-09-13 21:54:58 UTC
Red Hat Product Errata RHBA-2017:2086 0 normal SHIPPED_LIVE 389-ds-base bug fix and enhancement update 2017-08-01 18:37:38 UTC

Description Noriko Hosoi 2017-01-28 02:11:28 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/49076

DB_DEADLOCK can happen quite frequently this is why transactions are started with DB_TXN_NOWAIT and deadlock is managed (retry) by backend code.

When there are too many retries (49), the operation fails.
The problem is that when the operation fails (because of too many deadlocks) it is difficult to identify the threads that triggered the deadlock and propose workarounds.

For debug reason it could be interesting to have a new configuration option 'nsslapd-db-txn-begin-flags' (in 'cn=config,cn=ldbm database,cn=plugins,cn=config') to call txn_begin.
By default the option is DB_TXN_NOWAIT

Comment 1 thierry bordaz 2017-03-22 14:46:17 UTC
Upstream ticket pushed https://pagure.io/389-ds-base/issue/49076

Comment 3 Simon Pichugin 2017-05-31 17:25:11 UTC
Automated test case can be found at dirsrvtests/tests/tickets/ticket49076_test.py:

===================== test session starts =====================
platform linux2 -- Python 2.7.5, pytest-3.1.1, py-1.4.33, pluggy-0.4.0 -- /usr/bin/python
cachedir: .cache
metadata: {'Python': '2.7.5', 'Platform': 'Linux-3.10.0-671.el7.x86_64-x86_64-with-redhat-7.4-Maipo', 'Packages': {'py': '1.4.33', 'pytest': '3.1.1', 'pluggy': '0.4.0'}, 'Plugins': {'beakerlib': '0.7.1', 'html': '1.14.2', 'cov': '2.5.1', 'metadata': '1.5.0'}}
DS build: 1.3.6.1
389-ds-base: 1.3.6.1-15.el7
nss: 3.28.4-8.el7
nspr: 4.13.1-1.0.el7_3
openldap: 2.4.44-4.el7
svrcore: 4.1.3-2.el7

rootdir: /export/tests, inifile:
plugins: metadata-1.5.0, html-1.14.2, cov-2.5.1, beakerlib-0.7.1
collected 1 items

tickets/ticket49076_test.py::test_ticket49076 PASSED

===================== 1 passed in 8.41 seconds =====================

Marking as verified.

Comment 4 errata-xmlrpc 2017-08-01 21:14:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2086


Note You need to log in before you can comment on or make changes to this bug.