bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make check (8.1) hangs forever


From: Pádraig Brady
Subject: Re: make check (8.1) hangs forever
Date: Thu, 03 Dec 2009 10:11:12 +0000
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Alan Curry wrote:
> Jim Meyering writes:
>> P=C3=A1draig Brady wrote:
>>> Alan Curry wrote:
>>>> SIGTERM to gdb, but gdb has SIGTERM blocked so nothing happens.
>>> thanks for investigating.
>>> Perhaps we need to use `timeout -sKILL ...`
>> Sounds good to me.
> 
> I added that and re-ran make check. It worked but gdb's child process
> (tail -f file) is still lingering afterward until I kill it manually.

right. gdb is acting as the monitor and so starts processes it's debugging
in their own group for much the same reasons as `timeout` does. However
that means that `timeout` has no control over gdb's children.
So sending a KILL to gdb is not an acceptable solution.

> Why has nobody else noticed this? Are other versions of gdb less
> stubborn? Maybe I did something to make it stubborn, but I don't
> know what that could be.

Note my gdb --version is 6.8.50.20090302-39.fc11

If I send a SIGTERM to gdb it terminates everything and cleans up
as expected. However I did notice that the test was skipped _sometimes_
for me because of this GDB output:

warning: .dynamic section for "/lib/libc.so.6" is not at the expected address
warning: difference appears to be caused by prelink, adjusting expectations

I'm really not sure why this only happens sometimes for me (a bug?)
but perhaps this is also happening for you for the last gdb run and
the unexpected output is causing SIGTSTP to hang things up?

Could you try this with the patch below, thanks:
for i in $(seq 100); do
  (cd tests && make check TESTS=tail-2/inotify-race VERBOSE=yes)
done


diff --git a/tests/tail-2/inotify-race b/tests/tail-2/inotify-race
index b1e1a7c..bd39ddf 100755
--- a/tests/tail-2/inotify-race
+++ b/tests/tail-2/inotify-race
@@ -37,7 +37,7 @@ case $(cat gdb.out) in
     *) skip_test_ "can't run gdb";;
 esac

-# See if gdb works:
+# See if gdb works and tail_forever_inotify was compiled in
 timeout 10s gdb -nx --batch-silent                  \
     --eval-command='break tail_forever_inotify'    \
     --eval-command='run -f file'                   \
@@ -55,7 +55,7 @@ timeout 10s gdb -nx --batch-silent                 \
     --eval-command="shell echo never-seen-with-tail-7.5 >> file" \
     --eval-command='continue'                      \
     --eval-command='quit'                          \
-    tail < /dev/null &
+    tail < /dev/null > /dev/null 2>&1 &
 pid=$!

 tail --pid=$pid -f tail.out | (read; kill $pid)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]