Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 84037

Summary: rpm corrupts rpm database on rpm -e / rpm -qa
Product: [Retired] Red Hat Linux Reporter: Leon brouwers <leonb>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: noudlnx
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-02-13 16:06:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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.