Bug 1099509

Summary: [PATCH] rpmdb often gets corrupted upon concurrent access due to a race in CDB
Product: Red Hat Enterprise Linux 7 Reporter: Lubomir Rintel <lkundrak>
Component: libdbAssignee: Jan Staněk <jstanek>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.0CC: aglotov, databases-maint, hhorak, jherrman, jkurik, jscotka, lkundrak, ovasik, qe-baseos-daemons, tspeetje
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, a race condition could occur in the Berkeley DB Concurrent Data Store, which corrupted to the RPM database (RPMDB). After this update, process IDs during file transactions are more thoroughly tested. As a result, the race condition and the consequent RPMDB corruption no longer occur.
Story Points: ---
Clone Of:
: 1099511 1123758 1616259 (view as bug list) Environment:
Last Closed: 2015-08-10 14:31:20 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:
Bug Depends On:    
Bug Blocks: 1123758, 1296246, 1616259, 1634487    
Attachments:
Description Flags
Fix for bdb issue #3514381 none

Description Lubomir Rintel 2014-05-20 13:34:12 UTC
Created attachment 897574 [details]
Fix for bdb issue #3514381

Description of problem:

Our continuous integration often encounters a situation when rpmdb gets corrupted while a rpmdb reader meets with a package installation. We've tracked down the issue to a race condition in CDB and upstream had now kindly provided a fix.

Upstream bug report: https://community.oracle.com/thread/3514381

Test cases (slow one, that reproduces the issue with RPM, and a minimal one for db4) are here: http://v3.sk/~lkundrak/bdb-crash/

Attaching the fix.

Version-Release number of selected component (if applicable):

libdb-5.3.21-17.el7.x86_64

Comment 1 Lubomir Rintel 2014-05-20 13:39:11 UTC
Cloned for el6, bug #1099511

Comment 3 Honza Horak 2014-06-02 14:17:00 UTC
The patch seems sane, thank you very much. However, I haven't found if this is the same patch which upstream is going to use in the next version -- Lubomir, do you know?

Comment 4 Lubomir Rintel 2014-06-02 14:52:01 UTC
This is what I got from the contact at Oracle:

   We will put the fixes into 6.0 and release another patch release for 
that.

   We are also close to wrapping up our next release and the fixes wll 
be in that as well.

   So if you migrate to 6.x the fixes will be there.

Comment 5 Honza Horak 2014-06-02 15:09:27 UTC
(In reply to Lubomir Rintel from comment #4)

Thank you. I read it as upstream accepts the fixes and states they are correct.

Comment 17 Jan Kurik 2015-08-10 14:31:20 UTC
This bug has been closed as CURRENTRELEASE due to delivery of the fix in a z-stream. As the component is not on ACL, the fix is currently included in y-stream as well.

For more information please see the zstream process documentation:
* https://engineering.redhat.com/trac/ZStream/attachment/wiki/WikiStart/Z-Stream_process_update_4.odp .

Comment 18 Tim Speetjens 2016-04-25 11:37:39 UTC
*** Bug 1298211 has been marked as a duplicate of this bug. ***