Bug 885405

Summary: mock hangs when rpm %check fails (reproducer)
Product: [Fedora] Fedora Reporter: Cole Robinson <crobinso>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: crobinso, mebrown, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mock-1.1.38-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-10 06:37:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
build.log
none
root.log
none
state.log
none
Exit from logOutput if child dies
none
slightly modified version of above patch none

Description Cole Robinson 2012-12-09 03:54:44 UTC
Created attachment 660206 [details]
build.log

mock-1.1.28-1.fc18.noarch

Grab this srpm:

http://crobinso.fedorapeople.org/misc/mockhang/qemu-1.3.0-1.fc19.src.rpm

then do:

mock --root fedora-rawhide-i386 qemu-1.3.0-1.fc19.src.rpm

One of the tests from qemu's 'make check' fails, and build.log ends with this:

GTESTER check-qtest-i386
**
ERROR:tests/rtc-test.c:209:set_year_20xx: assertion failed (cmos_read(RTC_HOURS) == 0x02): (25 == 2)
GTester: last random seed: R02S1f133be5efd8a9735d569ebc83c09106
make: *** [check-qtest-i386] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.Y78rZl (%check)
    bogus date in %changelog: Mon Mar 11 2010 Justin M. Forbes <jforbes> - 2:0.12.3-4
    bogus date in %changelog: Fri Jan 10 2010 Justin M. Forbes <jforbes> - 2:0.12.1.2-3
    bogus date in %changelog: Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
    bogus date in %changelog: Mon May 12 2004 David Woodhouse <dwmw2> 0.6.0-1
    bogus date in %changelog: Thu May 2 2004 David Woodhouse <dwmw2> 0.5.4-1
    Bad exit status from /var/tmp/rpm-tmp.Y78rZl (%check)
RPM build errors:

But then mock just hangs. A ctrl-c kills it fine.

Comment 1 Cole Robinson 2012-12-09 03:55:17 UTC
Created attachment 660207 [details]
root.log

Comment 2 Cole Robinson 2012-12-09 03:55:39 UTC
Created attachment 660208 [details]
state.log

Comment 3 Cole Robinson 2013-02-27 01:55:05 UTC
Created attachment 703230 [details]
Exit from logOutput if child dies

If a package build process is buggy, it can leave orphaned processes
hanging around even after rpmbuild has exited. If these processes
hold open file descriptors that mock is watching, then mock will
busy wait until the rpmbuild_timeout timeout is hit. I was actually
seeing this with qemu's test suite.

Make logOutput watch the child process. If the child exits, and
there are orphaned processes, kill them. This should wake up the loop.




This patch likely isn't acceptable as is, but it works for me. I can also provide a srpm reproducer that takes only 30-60 seconds to reproduce if anyone wants to try it themselves.

Comment 4 Clark Williams 2013-10-27 15:55:22 UTC
Created attachment 816540 [details]
slightly modified version of above patch

I modified this a bit to just use the loop predicate 'done' so that we exit logOutput immediately after detecting the child process has terminated. Please check to see that I haven't inadvertently missed something here.

Comment 5 Cole Robinson 2013-10-28 16:48:10 UTC
Looks good to me, thanks Clark.

Comment 6 Fedora Update System 2013-10-30 14:58:58 UTC
mock-1.1.34-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mock-1.1.34-1.fc18

Comment 7 Fedora Update System 2013-10-30 15:01:01 UTC
mock-1.1.34-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.34-1.el6

Comment 8 Fedora Update System 2013-10-30 15:03:19 UTC
mock-1.1.34-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.34-1.fc20

Comment 9 Fedora Update System 2013-10-30 15:05:20 UTC
mock-1.1.34-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.34-1.fc19

Comment 10 Fedora Update System 2013-10-30 17:13:00 UTC
Package mock-1.1.34-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mock-1.1.34-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-20329/mock-1.1.34-1.fc20
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2013-11-05 05:33:27 UTC
mock-1.1.35-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.35-1.fc19

Comment 12 Fedora Update System 2013-11-05 05:34:51 UTC
mock-1.1.35-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mock-1.1.35-1.fc18

Comment 13 Fedora Update System 2013-11-05 05:36:11 UTC
mock-1.1.35-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.35-1.el6

Comment 14 Fedora Update System 2013-11-05 05:37:26 UTC
mock-1.1.35-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.35-1.fc20

Comment 15 Fedora Update System 2013-11-10 06:37:50 UTC
mock-1.1.35-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2014-02-06 02:10:17 UTC
mock-1.1.36-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.36-1.fc19

Comment 17 Fedora Update System 2014-02-06 02:11:48 UTC
mock-1.1.36-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.36-1.fc20

Comment 18 Fedora Update System 2014-02-06 02:13:19 UTC
mock-1.1.36-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.36-1.el6

Comment 19 Fedora Update System 2014-02-08 05:04:13 UTC
mock-1.1.36-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2014-03-25 20:26:24 UTC
mock-1.1.37-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc19

Comment 21 Fedora Update System 2014-03-25 20:28:39 UTC
mock-1.1.37-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc20

Comment 22 Fedora Update System 2014-03-25 20:30:32 UTC
mock-1.1.37-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.37-1.el6

Comment 23 Fedora Update System 2014-03-27 17:49:02 UTC
mock-1.1.37-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc20

Comment 24 Fedora Update System 2014-03-27 17:50:55 UTC
mock-1.1.37-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc19

Comment 25 Fedora Update System 2014-03-27 17:52:57 UTC
mock-1.1.37-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.37-2.el6

Comment 26 Fedora Update System 2014-03-31 19:05:58 UTC
mock-1.1.38-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc19

Comment 27 Fedora Update System 2014-03-31 19:08:00 UTC
mock-1.1.38-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.38-1.el6

Comment 28 Fedora Update System 2014-03-31 19:09:58 UTC
mock-1.1.38-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc20

Comment 29 Fedora Update System 2014-04-09 13:20:25 UTC
mock-1.1.38-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2014-04-18 15:39:03 UTC
mock-1.1.38-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 31 Fedora Update System 2014-04-19 09:21:16 UTC
mock-1.1.38-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.