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