Hide Forgot
Description of problem: Rebuilding the libguestfs RPM in RHEL 6.5 hangs when building the test Fedora image. Libguestfs runs: /usr/libexec/qemu-kvm -nographic -machine accel=kvm:tcg -device \? and this command hangs, but also causes the parent process to be killed with SIGSTOP(!) 19995 pts/0 T 0:00 /usr/bin/perl /home/rjones/d/rhel/libguestfs/rhel-6.5/libguestfs-1.20.11/tests/guests/guest-aux/make-fedora-img.pl 20006 pts/0 T 0:00 /usr/libexec/qemu-kvm -nographic -machine accel=kvm:tcg -device ? Version-Release number of selected component (if applicable): libguestfs 1.20.11-2.el6 How reproducible: 100% on two different machines Steps to Reproduce: 1. Update to RHEL 6.5 nightly (20131030) 2. rhpkg local
Created attachment 817864 [details] strace.log strace -f make check -C tests/guests Compressed file -- this file expands to 239 MB (sic!) The important part is that it's stopping while writing to the console, ie: 21593 --- SIGTTOU (Stopped (tty output)) @ 0 (0) --- I have no idea why this happens in RHEL 6.5 but not anywhere else.
reproduced, # rpmbuild --rebuild --target=x86_64 libguestfs-1.20.11-2.el6.src.rpm ( omit message ...) SRCDIR=. ../../run --test guest-aux/make-debian-img.sh 7 seconds: guest-aux/make-debian-img.sh debian.img: file size bytes: 536870912 debian.img: allocated bytes: 14405632 debian.img: MD5 hash: acae590ee7f33d5cfd904ca07db0b65d SRCDIR=. LAYOUT=partitions ../../run --test guest-aux/make-fedora-img.pl (it hangs here) It blocks errata tps-srpmtest, please help to fix ASAP
I believe this is a bug in coreutils 'timeout' utility, in fact one which is still present upstream. I will upload two attachments which demonstrate the bug: $ gcc -Wall test.c -o test $ ./test $ timeout 4h ./test $ ./run <-- this command hangs with ./test putting itself into STOPPED state The following patch to coreutils fixes the problem for me. --- coreutils-8.21/src/timeout.c.old 2013-10-31 19:44:01.719755435 +0000 +++ coreutils-8.21/src/timeout.c 2013-10-31 19:50:07.634292913 +0000 @@ -443,9 +443,11 @@ { /* child */ int exit_status; +#if 0 /* exec doesn't reset SIG_IGN -> SIG_DFL. */ signal (SIGTTIN, SIG_DFL); signal (SIGTTOU, SIG_DFL); +#endif execvp (argv[0], argv); /* FIXME: should we use "sh -c" ... here? */
Created attachment 818048 [details] run
Created attachment 818049 [details] test.c
Just disabling the code path is probably not correct way ;) ... however, it should at least be investigated - I don't think that priority urgent is the right one, though - as this should be "workaroundable" somehow in the test itself.
I see it tracked on upstream tracker already - http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15779 ... thanks Richard!
Workaround in libguestfs: commit 7113aee0b439b411602d8d7d4b03bf02bc91b800
I'm also seeing this on Fedora 19.
timeout has the --foreground option on fedora 19
Hoping we've fixed it properly (in libguestfs) this time: https://github.com/libguestfs/libguestfs/commit/e3f72805d108c601280b889692c47d7d825e6079
Verified with libguestfs-1.20.11-3.el6, Build passed
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1458.html