Bug 465766 - yum localinstall hangs if package produces large number of errors (rpm scriplet stderr pipe blocks)
yum localinstall hangs if package produces large number of errors (rpm scripl...
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-10-06 06:03 EDT by Grahame Bowland
Modified: 2014-01-21 18:06 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-10 19:13:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Grahame Bowland 2008-10-06 06:03:49 EDT
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):

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 09:48:50 EDT
Does this NOT happen if the same package is in a repository?
Comment 2 James Antill 2008-10-09 12:40:24 EDT
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 06:12:48 EST
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: 
Comment 4 Panu Matilainen 2009-01-08 07:58:44 EST
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 13:40:45 EST
 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 13:20:46 EDT
 Ok, I've created two packages at:


...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 05:45:24 EDT
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:
Comment 8 seth vidal 2009-07-10 19:13:11 EDT
closing this as we have no feedback.

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