Red Hat Bugzilla – Bug 84037
rpm corrupts rpm database on rpm -e / rpm -qa
Last modified: 2007-04-18 12:51:00 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)
Description of problem:
When I do the following:
rpm -qa | more (and don't go thru all the output but leave it
at page one)
rpm -e "some installed package"
The "rpm -e" command will now hang indefinately and will have to
be killed with a 'kill -9 <pid of rpm -e>'. If I now quit the rpm -qa
on terminal 1. A repeat of the 'rpm -qa | more' command will now
also hang. I now have to:
rm -f /var/lib/rpm/__db.00*
to get rpm -qa working again. Just doing the 'rpm --rebuilddb' without deleting
the __db.0* files will result in a hang of the rpm command.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. rpm -qa | more (on terminal 1)
2. rpm -e <some rpm> (on terminal 2, after starting rpm -qa on terminal 1)
Actual Results: The rpm database got corrupted
Expected Results: I think it just should have deleted the rpm in question.
rpm --version: RPM version 4.1
Yup, rpm-4.1 doesn't catch SIGPIPE.
Workaround for now is to do
rm -f /var/lib/rpm/__db*
to remove stale locks.