Bug 84037 - rpm corrupts rpm database on rpm -e / rpm -qa
Summary: rpm corrupts rpm database on rpm -e / rpm -qa
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-11 12:25 UTC by Leon brouwers
Modified: 2007-04-18 16:51 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-02-13 16:06:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Leon brouwers 2003-02-11 12:25:20 UTC
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:

Terminal 1: 
    rpm -qa | more  (and don't go thru all the output but leave it 
                     at page one)

Terminal 2:
    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*
rpm --rebuilddb

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):


How reproducible:
Always

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)
3.     

Actual Results:  The rpm database got corrupted

Expected Results:  I think it just should have deleted the rpm in question.

Additional info:

rpm --version: RPM version 4.1
(rpm-4.1-1.06)
db4: db4-4.0.14-14

Comment 1 Jeff Johnson 2003-02-11 13:20:53 UTC
Yup, rpm-4.1 doesn't catch SIGPIPE.

Workaround for now is to do
    rm -f /var/lib/rpm/__db*
to remove stale locks.


Note You need to log in before you can comment on or make changes to this bug.