Bug 87747

Summary: rpm is unusable after breaking a piped command
Product: [Retired] Red Hat Linux Reporter: jbowman
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED ERRATA QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: bill
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-04-02 23:46:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
strace of a normal rpm -e command prior to breakage
none
strace of the rpm -qa portion of rpm -qa|less
none
strace of the less portion of the rpm -qa|less
none
strace of the rpm -e that hangs after rpm -qa|less, up until it gets kill -9'd none

Description jbowman 2003-04-01 23:46:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312

Description of problem:
Piping the output of an rpm command (for example, -qa) into another program
which then breaks the pipe results in all further rpm commands hanging. The only
recourse is to kill -9 the hung process.

Removing the /var/lib/rpm/__db.00* files restores functionality.

Version-Release number of selected component (if applicable):
rpm-4.2-0.69

How reproducible:
Always

Steps to Reproduce:
1. On a working RedHat 9 system: rpm -qa|less , then hit 'q' to exit less.
2. Attempt to run *any* rpm afterwards.


Actual Results:  RPM hangs

Expected Results:  RPM should perform the specified action.

Additional info:

Comment 1 jbowman 2003-04-01 23:48:47 UTC
Created attachment 90821 [details]
strace of a normal rpm -e command prior to breakage

Comment 2 jbowman 2003-04-01 23:49:28 UTC
Created attachment 90822 [details]
strace of the rpm -qa portion of rpm -qa|less

Comment 3 jbowman 2003-04-01 23:49:56 UTC
Created attachment 90823 [details]
strace of the less portion of the rpm -qa|less

Comment 4 jbowman 2003-04-01 23:50:38 UTC
Created attachment 90824 [details]
strace of the rpm -e that hangs after rpm -qa|less, up until it gets kill -9'd

Comment 5 Jeff Johnson 2003-04-02 23:46:05 UTC
Yes, rpm didn't handle SIGPIPE until recently.

FIxed (and errata pending) in packages at
    ftp://ftp.rpm.org/pub/rpm/test-4.2