Bug 1099509 - [PATCH] rpmdb often gets corrupted upon concurrent access due to a race in CDB
Summary: [PATCH] rpmdb often gets corrupted upon concurrent access due to a race in CDB
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libdb
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Jan Staněk
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 1298211 (view as bug list)
Depends On:
Blocks: 1634487 1123758 1296246 1616259
TreeView+ depends on / blocked
 
Reported: 2014-05-20 13:34 UTC by Lubomir Rintel
Modified: 2018-10-01 05:46 UTC (History)
10 users (show)

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.
Clone Of:
: 1099511 1123758 1616259 (view as bug list)
Environment:
Last Closed: 2015-08-10 14:31:20 UTC


Attachments (Terms of Use)
Fix for bdb issue #3514381 (3.97 KB, patch)
2014-05-20 13:34 UTC, Lubomir Rintel
no flags Details | Diff

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. ***


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