[Rpm-maint] [rpm-software-management/rpm] Rpm query causes corruption in the file-backed mmaped bdb regions (#232)

Steven Morad notifications at github.com
Sun Jun 11 22:15:28 UTC 2017


So corruption in this case means that any rpm operation that reads or writes to BDB will fail, because the db fails to open. In our case, all rpm operations are done as root. As you can see, this is reproducible as root:
```
[root at redacted ~]# for i in {1..30}; do /bin/rpm -qa &>/dev/null & done
[1] 84680
[2] 84681
[3] 84682
...
[30] 84710
[root at redacted ~]# rpm -qa
error: db4 error(-30974) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 -  (-30974)
error: cannot open Packages database in /opt/yum/var/lib/rpm
error: db4 error(-30974) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 -  (-30974)
error: cannot open Packages database in /opt/yum/var/lib/rpm
```

Also, please note that during sandboxing I did not disallow writes to the rpm directory, just to the disk-backed mmapped regions (`/opt/yum/var/lib/rpm.__db.*`). The .dbenv file locks are still written (not sure if these are the shared locks you are talking about). It sounds like the fsync stub may be responsible for what we are seeing here.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/232#issuecomment-307660544
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170611/a43c9764/attachment.html>


More information about the Rpm-maint mailing list