Bug 465766

Summary: yum localinstall hangs if package produces large number of errors (rpm scriplet stderr pipe blocks)
Product: [Fedora] Fedora Reporter: Grahame Bowland <g.bowland>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 11CC: ffesti, g.bowland, james.antill, jnovy, katzj, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-10 23:13:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Grahame Bowland 2008-10-06 10:03:49 UTC
Description of problem:
yum localinstall hangs when installing an RPM which produces a large number of error messages on stderr

Version-Release number of selected component (if applicable):
yum-3.2.19-3.fc8

How reproducible:
Install a package with a large number of files owned by a user that does not exist, eg. yum localinstall nasty.rpm

Actual results:
yum deadlocks - it has a pipe open to the child RPM process, but never reads from the stderr pipe, so rpm blocks once the write buffer has filled.

Expected results:
yum reads and does something with (or simply ignores) the RPM stderr output

Additional info:

Comment 1 seth vidal 2008-10-09 13:48:50 UTC
Does this NOT happen if the same package is in a repository?

Comment 2 James Antill 2008-10-09 16:40:24 UTC
I had a quick look at this earlier ... I'm pretty sure it happens all the time, the basic problem being:

1. _setupOutputLogging() creates a write pipe.

2. rpm/scriptlets write to that while "blocking" yum

3. _scriptOutput() only does a single read() call.

...I'm not sure how much we'll buy if we change #3, really I think we need to have #2 fixed.

Comment 3 Bug Zapper 2008-11-26 11:12:48 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Panu Matilainen 2009-01-08 12:58:44 UTC
Unless I'm completely mistaken at what yum does... a process trying to communicate with itself over a pipe will block if pipe size happens to be exceeded, yes. You'd need to launch a reader thread for the scriptlet output to avoid blocking.

Comment 5 James Antill 2009-01-08 18:40:45 UTC
 I assume that means it's really hard to fix inside rpm?
 Well, yeh, we can do a reader process ... basically:

yum code <= process <= rpm code

...it just seemed like it'd be better to fix in rpm, if we could. As any API caller has to do something like the above currently (which is non-obvious).
 Anyway, yeh, we'll fix it.

Comment 6 James Antill 2009-03-13 17:20:46 UTC
 Ok, I've created two packages at:

http://james.fedorapeople.org/yum/test-packages/

...out-out spews lots of stuff to stdout (on %pre/%post%preun%postun), and out-err spews it to stderr ... AFAICS they both work fine on 3.0.1 (+RHEL-5 GA rpm) and current HEAD (+latest F10 rpm).
 So Grahame, do you have an rpm that produces the problem?

Comment 7 Bug Zapper 2009-06-09 09:45:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 seth vidal 2009-07-10 23:13:11 UTC
closing this as we have no feedback.