On 01/04/2012 05:35 PM, Pádraig Brady wrote: > On 01/04/2012 02:12 PM, Stefano Lattarini wrote: > >> The only failed test was `misc/timeout-group'. > > This is either a race in the test or a bug in timeout, neither of which I can see. > Your system is running 2.6.30-2-686 SMP > > Does this fail all the time? > (cd tests && make check TESTS=misc/timeout-group VERBOSE=yes) > No, it only fails ~ 6% of the time: $ cat foo.sh #!/bin/bash pass=0 fail=0 for ((i = 1; i <= 200; i++)); do if make -C tests check TESTS=misc/timeout-group VERBOSE=yes &>/dev/null then echo "- run $i: pass" let pass++ else echo "- run $i: fail" let fail++ fi done echo PASS: $pass echo FAIL: $fail $ ./foo.sh - run 1: fail - run 2: pass - run 3: pass - run 4: pass - run 5: pass - run 6: pass - run 7: pass - run 8: pass - run 9: pass - run 10: fail - run 11: pass ... - run 199: pass - run 200: pass PASS: 188 FAIL: 12 > Does it fail if you force bash? > (cd tests && make check TESTS=misc/timeout-group VERBOSE=yes SHELL=/bin/bash) > The behaviour is the same as above (as was predictable, since /bin/sh is linked to /bin/bash). > If you change timeout.c to fprintf(stderr) that the first > send_sig (monitored_pid) call is made, does that happen in the failing case? > OK, so, in 'timeout.c:cleanup()' I've added this line: fprintf (stderr, "^^^ send_sig (%lu, %u)\n", monitored_pid, sig); just before this line: send_sig (monitored_pid, sig); The logs of a failing and a passing test run after this modification are attached. > As an outside guess, maybe timer_create() causes threads to > be created on your system, which may in turn cause signal issues? > Does the failure still happen if you s/HAVE_TIMER_SETTIME/0/ in timeout.c? > Yes (after 10 runs the first time I've tried, after 2 the second time, after 13 the third and last time). HTH, Stefano