Bug 1527825

Summary: Incorrect page lock order when accessing OPD tree
Product: [Fedora] Fedora Reporter: Petr Kubat <pkubat>
Component: libdbAssignee: Petr Kubat <pkubat>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: urgent    
Version: 27CC: adam, afarley, aheverle, a.v.miroshnichenko, chhudson, databases-maint, fkrska, glamb, gparente, hhorak, jprokes, jstanek, jsynacek, lkrispen, lkuprova, mhonek, msauton, nathan.t.mcgarvey, novyjindrich, pkubat, spurrier, tbordaz, tmihinto, tscherf, vdanek, vonsch, wibrown
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libdb-5.3.28-27.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1349779 Environment:
Last Closed: 2017-12-28 02:52:06 UTC 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:
Attachments:
Description Flags
libdb deadlock reproducer none

Description Petr Kubat 2017-12-20 08:32:16 UTC
+++ This bug was initially created as a clone of Bug #1349779 +++

libdb does not lock its internal buffers in correct order when accessing pages located in a off-page duplicate (OPD) tree while doing operations on a cursor.

As a result of this a race condition is possible where a writer process can access the primary tree first and then the OPD tree, locking the pages accessed, while a reader process can do the same in reverse order. This causes a deadlock in libdb since neither of the processes release their respective locks.

This is a Fedora clone of a bug originally found in RHEL, for detailed information about the issue please check the original bug.

Comment 1 Petr Kubat 2017-12-20 08:41:49 UTC
Created attachment 1370347 [details]
libdb deadlock reproducer

Comment 3 Fedora Update System 2017-12-20 11:38:13 UTC
libdb-5.3.28-27.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4eff8b26bc

Comment 4 Fedora Update System 2017-12-21 20:25:41 UTC
libdb-5.3.28-27.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4eff8b26bc

Comment 5 Fedora Update System 2017-12-28 02:52:06 UTC
libdb-5.3.28-27.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.