[Rpm-maint] [rpm-software-management/rpm] when rebuilding rpmdb database gets inconsistent when installing at the same time (#1761)

Oliver Kurth notifications at github.com
Sat Aug 21 20:10:12 UTC 2021


There seems to be a race when locking the db using `rpm --rebuilddb`. If a package gets installed at the same time, the database gets inconsistent. To reproduce:

In one shell, continuously rebuild the db:
`while true; do echo "start"; rpm --rebuilddb; echo "done" ; done

In another shell, install an arbitrary package. There is no error:
```
[root at localhost ~]# rpm -Uv ./lsof-4.93.2-4.fc33.aarch64.rpm 
warning: waiting for transaction lock on /var/lib/rpm/.rpm.lock
Verifying packages...
Preparing packages...
lsof-4.93.2-4.fc33.aarch64
[root at localhost ~]#
```
Then check for it:
```
[root at localhost ~]# rpm -qi lsof
package lsof is not installed
[root at localhost ~]#
```
However, the bits are all there:
```
[root at localhost ~]# lsof -v
lsof version information:
    revision: 4.93.2
...
```
This behavior reproduces reliably. Version is:
```
[root at localhost ~]# rpm --version
RPM version 4.16.1.2
[root at localhost ~]# 
```

Above repro is on Fedora 33. I observe the same behavior in Photon 4.

-- 
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/1761
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210821/1b6968b6/attachment.html>


More information about the Rpm-maint mailing list