This is an umbrella bug to handle various rpm
The usual cause of segfaults in rpm, unlike most
programs, is bad data either from a package or from
the installed database.
In order to address this issue, rpm-4.1 verifies
all header data when read and written, using digital
signatures and digests if available, otherwise by
doing sanity checks on header data.
So, if you're not running rpm-4.1 and are segfaulting,
the general answer is (or will be) to upgrade to rpm-4.1.
If you need help upgrading, please open an individual bug report.
If not running rpm-4.1, and you're segfaulting while reading
the database, I may need a pointer (i.e. URL, bugzilla attachments
won't work) to a copy of your database to give you a fix:
tar czvf /tmp/rpmdb.tar.gz rpm
If running rpm-4.1 already, and have a segfault, you
will definitely need to do
rm -f /var/lib/rpm/__db*
in order to eliminate stale locks. Do that and open
an individual bug report please.
I experienced similar problems after upgrading to RedHat 8.0 (although the
problems were likely there already from the previous installation). I could
query and verify packages but not erase them. The issue, as Jeff helpfully
suggested, was due to stale locks in /var/lib/rpm. Removing them solved the
I can't help but think that RPM could be a little smarter when dealing with
locks. It is already intelligent enough to print an error message when it is run
without the proper permissions (i.e. try erasing a package as a normal user).
Couldn't it also print a warning message when it finds stale locks? That would
have saved me a lot of time hunting down this problem.
Closing the umbrella bug. Please open individual
bug reports for rpm segfaults.