Package: coreutils;
Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Date: Fri, 14 Dec 2012 17:31:01 UTC
Severity: normal
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13185 in the body.
You can then email your comments to 13185 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-coreutils <at> gnu.org
:bug#13185
; Package coreutils
.
(Fri, 14 Dec 2012 17:31:02 GMT) Full text and rfc822 format available.Stefano Lattarini <stefano.lattarini <at> gmail.com>
:bug-coreutils <at> gnu.org
.
(Fri, 14 Dec 2012 17:31:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Stefano Lattarini <stefano.lattarini <at> gmail.com> To: bug-coreutils <at> gnu.org Subject: Test case 'misc/timeout-group' failed Date: Fri, 14 Dec 2012 18:28:40 +0100
[Message part 1 (text/plain, inline)]
While running the coreutils testsuite on my oldish Debian desktop with a somewhat heavy load and several bleeding-edge tools in PATH, I've encountered this failure in the 'tests/misc/timeout-group.sh' test: ++ initial_cwd_=/devel/bleeding/src/coreutils ++ fail=0 +++ testdir_prefix_ +++ printf gt ++ pfx_=gt +++ mktempd_ /devel/bleeding/src/coreutils gt-timeout-group.sh.XXXX +++ case $# in +++ destdir_=/devel/bleeding/src/coreutils +++ template_=gt-timeout-group.sh.XXXX +++ MAX_TRIES_=4 +++ case $destdir_ in +++ case $template_ in ++++ unset TMPDIR +++ d=/devel/bleeding/src/coreutils/gt-timeout-group.sh.ZyEZ +++ case $d in +++ test -d /devel/bleeding/src/coreutils/gt-timeout-group.sh.ZyEZ ++++ ls -dgo /devel/bleeding/src/coreutils/gt-timeout-group.sh.ZyEZ ++++ tr S - +++ perms='drwx------ 2 4096 Dec 14 18:17 /devel/bleeding/src/coreutils/gt-timeout-group.sh.ZyEZ' +++ case $perms in +++ test 0 = 0 +++ echo /devel/bleeding/src/coreutils/gt-timeout-group.sh.ZyEZ +++ return ++ test_dir_=/devel/bleeding/src/coreutils/gt-timeout-group.sh.ZyEZ ++ cd /devel/bleeding/src/coreutils/gt-timeout-group.sh.ZyEZ ++ gl_init_sh_nl_=' ' ++ IFS=' ' ++ for sig_ in 1 2 3 13 15 +++ expr 1 + 128 ++ eval 'trap '\''Exit 129'\'' 1' +++ trap 'Exit 129' 1 ++ for sig_ in 1 2 3 13 15 +++ expr 2 + 128 ++ eval 'trap '\''Exit 130'\'' 2' +++ trap 'Exit 130' 2 ++ for sig_ in 1 2 3 13 15 +++ expr 3 + 128 ++ eval 'trap '\''Exit 131'\'' 3' +++ trap 'Exit 131' 3 ++ for sig_ in 1 2 3 13 15 +++ expr 13 + 128 ++ eval 'trap '\''Exit 141'\'' 13' +++ trap 'Exit 141' 13 ++ for sig_ in 1 2 3 13 15 +++ expr 15 + 128 ++ eval 'trap '\''Exit 143'\'' 15' +++ trap 'Exit 143' 15 ++ trap remove_tmp_ 0 + path_prepend_ ./src + test 1 '!=' 0 + path_dir_=./src + case $path_dir_ in + abs_path_dir_=/devel/bleeding/src/coreutils/./src + case $abs_path_dir_ in + PATH=/devel/bleeding/src/coreutils/./src:/devel/bleeding/src/coreutils/src:/usr/local/bleeding/bin:/usr/local/bleeding/sbin:/home/stefano/bin/local:/home/stefano/bin:/usr/local/bin:/opt/bin:/usr/lib/jvm/java-6-sun-1.6.0.26/bin:/usr/games:/usr/bin:/usr/sbin:/bin:/sbin + create_exe_shims_ /devel/bleeding/src/coreutils/./src + case $EXEEXT in + return 0 + shift + test 0 '!=' 0 + export PATH + print_ver_ timeout + test yes = yes + local i + for i in '$*' + env timeout --version timeout (GNU coreutils) 8.20.63-4f62d Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Padraig Brady. + setsid true + cat + chmod a+x timeout.cmd + cat + chmod a+x group.sh + setsid ./group.sh + retry_delay_ check_timeout_cmd_running .1 6 + local test_func=check_timeout_cmd_running + local init_delay=.1 + local max_n_tries=6 + local attempt=1 + local num_sleeps=1 + local time_fail + test 1 -le 6 ++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }' + local delay=0.1 + check_timeout_cmd_running 0.1 + local delay=0.1 + test -e timeout.running + time_fail=0 + break + test 0 = 0 + env kill -INT -- -28937 + wait + test -e int.received + fail=1 + rm -f int.received timeout.running ++ date +%s + start=1355505442 + timeout -sALRM 30 timeout -sINT 25 ./timeout.cmd 20 + pid=28946 + retry_delay_ check_timeout_cmd_running .1 6 + local test_func=check_timeout_cmd_running + local init_delay=.1 + local max_n_tries=6 + local attempt=1 + local num_sleeps=1 + local time_fail + test 1 -le 6 ++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }' + local delay=0.1 + check_timeout_cmd_running 0.1 + local delay=0.1 + test -e timeout.running + time_fail=0 + break + test 0 = 0 + kill -ALRM 28946 + wait 28946 + ret=124 + test 124 -eq 124 + test -e int.received ++ date +%s + end=1355505442 ++ expr 1355505442 - 1355505442 + test 0 -lt 20 + Exit 1 + set +e + exit 1 + exit 1 + remove_tmp_ + __st=1 + cleanup_ + : + cd /devel/bleeding/src/coreutils + chmod -R u+rwx /devel/bleeding/src/coreutils/gt-timeout-group.sh.ZyEZ + rm -rf /devel/bleeding/src/coreutils/gt-timeout-group.sh.ZyEZ + exit 1 Attached is the corresponding config.log (compressed). I've not investigated further. Let me know if you need more information. Regards, Stefano
[config.log.xz (application/octet-stream, attachment)]
bug-coreutils <at> gnu.org
:bug#13185
; Package coreutils
.
(Fri, 14 Dec 2012 17:36:01 GMT) Full text and rfc822 format available.Message #8 received at 13185 <at> debbugs.gnu.org (full text, mbox):
From: Stefano Lattarini <stefano.lattarini <at> gmail.com> To: 13185 <at> debbugs.gnu.org Subject: Re: bug#13185: Test case 'misc/timeout-group' failed Date: Fri, 14 Dec 2012 18:34:07 +0100
On 12/14/2012 06:28 PM, Stefano Lattarini wrote: > While running the coreutils testsuite on my oldish Debian desktop with > a somewhat heavy load and several bleeding-edge tools in PATH, I've > encountered this failure in the 'tests/misc/timeout-group.sh' test. > > [SNIP] > I've re-run the test few times with the system no longer loaded, and it passed. I he re-run it one more time with the system under some load again, and this time the test was skipped! timeout-group.sh: skipped test: timeout returned 142. SIGALRM not handled? SKIP: tests/misc/timeout-group.sh The detailed log of the skip is here below. HTH, Stefano -*-*- ++ initial_cwd_=/devel/bleeding/src/coreutils ++ fail=0 +++ testdir_prefix_ +++ printf gt ++ pfx_=gt +++ mktempd_ /devel/bleeding/src/coreutils gt-timeout-group.sh.XXXX +++ case $# in +++ destdir_=/devel/bleeding/src/coreutils +++ template_=gt-timeout-group.sh.XXXX +++ MAX_TRIES_=4 +++ case $destdir_ in +++ case $template_ in ++++ unset TMPDIR +++ d=/devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf +++ case $d in +++ test -d /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf ++++ ls -dgo /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf ++++ tr S - +++ perms='drwx------ 2 4096 Dec 14 18:30 /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf' +++ case $perms in +++ test 0 = 0 +++ echo /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf +++ return ++ test_dir_=/devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf ++ cd /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf ++ gl_init_sh_nl_=' ' ++ IFS=' ' ++ for sig_ in 1 2 3 13 15 +++ expr 1 + 128 ++ eval 'trap '\''Exit 129'\'' 1' +++ trap 'Exit 129' 1 ++ for sig_ in 1 2 3 13 15 +++ expr 2 + 128 ++ eval 'trap '\''Exit 130'\'' 2' +++ trap 'Exit 130' 2 ++ for sig_ in 1 2 3 13 15 +++ expr 3 + 128 ++ eval 'trap '\''Exit 131'\'' 3' +++ trap 'Exit 131' 3 ++ for sig_ in 1 2 3 13 15 +++ expr 13 + 128 ++ eval 'trap '\''Exit 141'\'' 13' +++ trap 'Exit 141' 13 ++ for sig_ in 1 2 3 13 15 +++ expr 15 + 128 ++ eval 'trap '\''Exit 143'\'' 15' +++ trap 'Exit 143' 15 ++ trap remove_tmp_ 0 + path_prepend_ ./src + test 1 '!=' 0 + path_dir_=./src + case $path_dir_ in + abs_path_dir_=/devel/bleeding/src/coreutils/./src + case $abs_path_dir_ in + PATH=/devel/bleeding/src/coreutils/./src:/devel/bleeding/src/coreutils/src:/usr/local/bleeding/bin:/usr/local/bleeding/sbin:/home/stefano/bin/local:/home/stefano/bin:/usr/local/bin:/opt/bin:/usr/lib/jvm/java-6-sun-1.6.0.26/bin:/usr/games:/usr/bin:/usr/sbin:/bin:/sbin + create_exe_shims_ /devel/bleeding/src/coreutils/./src + case $EXEEXT in + return 0 + shift + test 0 '!=' 0 + export PATH + print_ver_ timeout + test yes = yes + local i + for i in '$*' + env timeout --version timeout (GNU coreutils) 8.20.63-4f62d Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Padraig Brady. + setsid true + cat + chmod a+x timeout.cmd + cat + chmod a+x group.sh + setsid ./group.sh + retry_delay_ check_timeout_cmd_running .1 6 + local test_func=check_timeout_cmd_running + local init_delay=.1 + local max_n_tries=6 + local attempt=1 + local num_sleeps=1 + local time_fail + test 1 -le 6 ++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }' + local delay=0.1 + check_timeout_cmd_running 0.1 + local delay=0.1 + test -e timeout.running + sleep 0.1 + return 1 + time_fail=1 ++ expr 1 + 1 + attempt=2 ++ expr 1 '*' 2 + num_sleeps=2 + test 2 -le 6 ++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }' + local delay=0.2 + check_timeout_cmd_running 0.2 + local delay=0.2 + test -e timeout.running + time_fail=0 + break + test 0 = 0 + env kill -INT -- -3744 + wait + test -e int.received + rm -f int.received timeout.running ++ date +%s + start=1355506235 + pid=3779 + retry_delay_ check_timeout_cmd_running .1 6 + local test_func=check_timeout_cmd_running + local init_delay=.1 + local max_n_tries=6 + local attempt=1 + local num_sleeps=1 + local time_fail + test 1 -le 6 ++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }' + timeout -sALRM 30 timeout -sINT 25 ./timeout.cmd 20 + local delay=0.1 + check_timeout_cmd_running 0.1 + local delay=0.1 + test -e timeout.running + time_fail=0 + break + test 0 = 0 + kill -ALRM 3779 + wait 3779 + ret=142 + test 142 -eq 124 + skip_ 'timeout returned 142. SIGALRM not handled?' + warn_ 'timeout-group.sh: skipped test: timeout returned 142. SIGALRM not handled?' + case $IFS in + printf '%s\n' 'timeout-group.sh: skipped test: timeout returned 142. SIGALRM not handled?' timeout-group.sh: skipped test: timeout returned 142. SIGALRM not handled? + test 9 = 2 + printf '%s\n' 'timeout-group.sh: skipped test: timeout returned 142. SIGALRM not handled?' + sed 1q + Exit 77 + set +e + exit 77 + exit 77 + remove_tmp_ + __st=77 + cleanup_ + : + cd /devel/bleeding/src/coreutils + chmod -R u+rwx /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf + rm -rf /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf + exit 77
bug-coreutils <at> gnu.org
:bug#13185
; Package coreutils
.
(Tue, 18 Dec 2012 00:50:02 GMT) Full text and rfc822 format available.Message #11 received at 13185 <at> debbugs.gnu.org (full text, mbox):
From: Pádraig Brady <P <at> draigBrady.com> To: Stefano Lattarini <stefano.lattarini <at> gmail.com> Cc: 13185 <at> debbugs.gnu.org Subject: Re: bug#13185: Test case 'misc/timeout-group' failed Date: Tue, 18 Dec 2012 00:48:07 +0000
On 12/14/2012 05:34 PM, Stefano Lattarini wrote: > On 12/14/2012 06:28 PM, Stefano Lattarini wrote: >> While running the coreutils testsuite on my oldish Debian desktop with >> a somewhat heavy load and several bleeding-edge tools in PATH, I've >> encountered this failure in the 'tests/misc/timeout-group.sh' test. >> >> [SNIP] >> > I've re-run the test few times with the system no longer loaded, and > it passed. I he re-run it one more time with the system under some > load again, and this time the test was skipped! > > timeout-group.sh: skipped test: timeout returned 142. SIGALRM not handled? > SKIP: tests/misc/timeout-group.sh > > The detailed log of the skip is here below. > > HTH, > Stefano > > -*-*- > > ++ initial_cwd_=/devel/bleeding/src/coreutils > ++ fail=0 > +++ testdir_prefix_ > +++ printf gt > ++ pfx_=gt > +++ mktempd_ /devel/bleeding/src/coreutils gt-timeout-group.sh.XXXX > +++ case $# in > +++ destdir_=/devel/bleeding/src/coreutils > +++ template_=gt-timeout-group.sh.XXXX > +++ MAX_TRIES_=4 > +++ case $destdir_ in > +++ case $template_ in > ++++ unset TMPDIR > +++ d=/devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf > +++ case $d in > +++ test -d /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf > ++++ ls -dgo /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf > ++++ tr S - > +++ perms='drwx------ 2 4096 Dec 14 18:30 /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf' > +++ case $perms in > +++ test 0 = 0 > +++ echo /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf > +++ return > ++ test_dir_=/devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf > ++ cd /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf > ++ gl_init_sh_nl_=' > ' > ++ IFS=' > ' > ++ for sig_ in 1 2 3 13 15 > +++ expr 1 + 128 > ++ eval 'trap '\''Exit 129'\'' 1' > +++ trap 'Exit 129' 1 > ++ for sig_ in 1 2 3 13 15 > +++ expr 2 + 128 > ++ eval 'trap '\''Exit 130'\'' 2' > +++ trap 'Exit 130' 2 > ++ for sig_ in 1 2 3 13 15 > +++ expr 3 + 128 > ++ eval 'trap '\''Exit 131'\'' 3' > +++ trap 'Exit 131' 3 > ++ for sig_ in 1 2 3 13 15 > +++ expr 13 + 128 > ++ eval 'trap '\''Exit 141'\'' 13' > +++ trap 'Exit 141' 13 > ++ for sig_ in 1 2 3 13 15 > +++ expr 15 + 128 > ++ eval 'trap '\''Exit 143'\'' 15' > +++ trap 'Exit 143' 15 > ++ trap remove_tmp_ 0 > + path_prepend_ ./src > + test 1 '!=' 0 > + path_dir_=./src > + case $path_dir_ in > + abs_path_dir_=/devel/bleeding/src/coreutils/./src > + case $abs_path_dir_ in > + PATH=/devel/bleeding/src/coreutils/./src:/devel/bleeding/src/coreutils/src:/usr/local/bleeding/bin:/usr/local/bleeding/sbin:/home/stefano/bin/local:/home/stefano/bin:/usr/local/bin:/opt/bin:/usr/lib/jvm/java-6-sun-1.6.0.26/bin:/usr/games:/usr/bin:/usr/sbin:/bin:/sbin > + create_exe_shims_ /devel/bleeding/src/coreutils/./src > + case $EXEEXT in > + return 0 > + shift > + test 0 '!=' 0 > + export PATH > + print_ver_ timeout > + test yes = yes > + local i > + for i in '$*' > + env timeout --version > timeout (GNU coreutils) 8.20.63-4f62d > Copyright (C) 2012 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > Written by Padraig Brady. > + setsid true > + cat > + chmod a+x timeout.cmd > + cat > + chmod a+x group.sh > + setsid ./group.sh > + retry_delay_ check_timeout_cmd_running .1 6 > + local test_func=check_timeout_cmd_running > + local init_delay=.1 > + local max_n_tries=6 > + local attempt=1 > + local num_sleeps=1 > + local time_fail > + test 1 -le 6 > ++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }' > + local delay=0.1 > + check_timeout_cmd_running 0.1 > + local delay=0.1 > + test -e timeout.running > + sleep 0.1 > + return 1 > + time_fail=1 > ++ expr 1 + 1 > + attempt=2 > ++ expr 1 '*' 2 > + num_sleeps=2 > + test 2 -le 6 > ++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }' > + local delay=0.2 > + check_timeout_cmd_running 0.2 > + local delay=0.2 > + test -e timeout.running > + time_fail=0 > + break > + test 0 = 0 > + env kill -INT -- -3744 > + wait > + test -e int.received > + rm -f int.received timeout.running > ++ date +%s > + start=1355506235 > + pid=3779 > + retry_delay_ check_timeout_cmd_running .1 6 > + local test_func=check_timeout_cmd_running > + local init_delay=.1 > + local max_n_tries=6 > + local attempt=1 > + local num_sleeps=1 > + local time_fail > + test 1 -le 6 > ++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }' > + timeout -sALRM 30 timeout -sINT 25 ./timeout.cmd 20 > + local delay=0.1 > + check_timeout_cmd_running 0.1 > + local delay=0.1 > + test -e timeout.running > + time_fail=0 > + break > + test 0 = 0 > + kill -ALRM 3779 > + wait 3779 > + ret=142 > + test 142 -eq 124 > + skip_ 'timeout returned 142. SIGALRM not handled?' > + warn_ 'timeout-group.sh: skipped test: timeout returned 142. SIGALRM not handled?' > + case $IFS in > + printf '%s\n' 'timeout-group.sh: skipped test: timeout returned 142. SIGALRM not handled?' > timeout-group.sh: skipped test: timeout returned 142. SIGALRM not handled? > + test 9 = 2 > + printf '%s\n' 'timeout-group.sh: skipped test: timeout returned 142. SIGALRM not handled?' > + sed 1q > + Exit 77 > + set +e > + exit 77 > + exit 77 > + remove_tmp_ > + __st=77 > + cleanup_ > + : > + cd /devel/bleeding/src/coreutils > + chmod -R u+rwx /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf > + rm -rf /devel/bleeding/src/coreutils/gt-timeout-group.sh.6KTf > + exit 77 So the skip was on purpose and to avoid signal propagation issues seen on some older systems: http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=v8.14-30-g6603e37 This initial failure is worrying, though may be a false positive due to your shell or something. What versions of dash, bash, kernel do you have there? I can't reproduce at all here with any shell, though you might have older versions. What is your system /bin/sh, dash or bash? Note you can force a particular SHELL as follows, and it would be interesting to see if the issue affected all shells. make check TESTS='tests/misc/timeout-group.sh' SUBDIRS=. VERBOSE=yes SHELL=bash Hopefully we can come up with a skip for this case too. thanks, Pádraig.
bug-coreutils <at> gnu.org
:bug#13185
; Package coreutils
.
(Tue, 18 Dec 2012 09:48:02 GMT) Full text and rfc822 format available.Message #14 received at 13185 <at> debbugs.gnu.org (full text, mbox):
From: Stefano Lattarini <stefano.lattarini <at> gmail.com> To: Pádraig Brady <P <at> draigBrady.com> Cc: 13185 <at> debbugs.gnu.org Subject: Re: bug#13185: Test case 'misc/timeout-group' failed Date: Tue, 18 Dec 2012 10:45:45 +0100
On 12/18/2012 01:48 AM, Pádraig Brady wrote: > > So the skip was on purpose and to avoid signal propagation issues seen > on some older systems: > http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=v8.14-30-g6603e37 > > This initial failure is worrying, though may be a false positive > due to your shell or something. What versions of dash, bash, kernel > do you have there? > $ bash --version GNU bash, version 4.2.36(2)-release (i686-pc-linux-gnu) $ dpkg -l dash | sed -n '$p' ii dash 0.5.7-3 i386 POSIX-compliant shell $ uname -rsv Linux 2.6.30-2-686 #1 SMP Sat Sep 26 01:16:22 UTC 2009 > I can't reproduce at all here with any shell, though you might > have older versions. > > What is your system /bin/sh, dash or bash? > Bash. But the affected coreutils testsuite run was done with a more bleeding-edge version of bash, explicitly selected as SHELL (and CONFIG_SHELL). > Note you can force a particular SHELL as follows, > and it would be interesting to see if the issue affected all shells. > The fact is that I haven't been able to reproduce the issue after the first failure. So it won't be easy to ensure whether it has been fixed... > make check TESTS='tests/misc/timeout-group.sh' SUBDIRS=. VERBOSE=yes SHELL=bash > > Hopefully we can come up with a skip for this case too. > > thanks, > Pádraig. Regards, Stefano
Pádraig Brady <P <at> draigBrady.com>
:Stefano Lattarini <stefano.lattarini <at> gmail.com>
:Message #19 received at 13185-done <at> debbugs.gnu.org (full text, mbox):
From: Pádraig Brady <P <at> draigBrady.com> To: Stefano Lattarini <stefano.lattarini <at> gmail.com> Cc: 13185-done <at> debbugs.gnu.org Subject: Re: bug#13185: Test case 'misc/timeout-group' failed Date: Tue, 18 Dec 2012 13:18:26 +0000
On 12/18/2012 09:45 AM, Stefano Lattarini wrote: > On 12/18/2012 01:48 AM, Pádraig Brady wrote: >> >> So the skip was on purpose and to avoid signal propagation issues seen >> on some older systems: >> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=v8.14-30-g6603e37 >> >> This initial failure is worrying, though may be a false positive >> due to your shell or something. What versions of dash, bash, kernel >> do you have there? >> > > $ bash --version > GNU bash, version 4.2.36(2)-release (i686-pc-linux-gnu) > > $ dpkg -l dash | sed -n '$p' > ii dash 0.5.7-3 i386 POSIX-compliant shell > > $ uname -rsv > Linux 2.6.30-2-686 #1 SMP Sat Sep 26 01:16:22 UTC 2009 > >> I can't reproduce at all here with any shell, though you might >> have older versions. >> >> What is your system /bin/sh, dash or bash? >> > Bash. But the affected coreutils testsuite run was done with a > more bleeding-edge version of bash, explicitly selected as SHELL > (and CONFIG_SHELL). > >> Note you can force a particular SHELL as follows, >> and it would be interesting to see if the issue affected all shells. >> > The fact is that I haven't been able to reproduce the issue after > the first failure. So it won't be easy to ensure whether it has > been fixed... > >> make check TESTS='tests/misc/timeout-group.sh' SUBDIRS=. VERBOSE=yes SHELL=bash >> >> Hopefully we can come up with a skip for this case too. I noticed a possible race in the test script. So I'll apply this soon. thanks, Pádraig. commit 09f72d285514a91495960ea3b0570251eed415b0 Author: Pádraig Brady <P <at> draigBrady.com> Date: Tue Dec 18 13:06:15 2012 +0000 tests: avoid a race in timeout-group.sh * tests/misc/timeout-group.sh: The kernel might possibly delay signal propagation to timeout.cmd long enough, that it exits normally without running the signal handler (as sleep will be in the same process group and so get the signal too). So avoid this by explicitly checking that the signal handler is called, which should always happen under normal circumstances. Reported by Stefano Lattarini on linux-2.6.30-2-686 and bash-4.2.36. diff --git a/tests/misc/timeout-group.sh b/tests/misc/timeout-group.sh index 4cefc33..7117abb 100755 --- a/tests/misc/timeout-group.sh +++ b/tests/misc/timeout-group.sh @@ -34,7 +34,11 @@ cat > timeout.cmd <<\EOF #!/bin/sh trap 'touch int.received; exit' INT touch timeout.running -sleep $1 +count=$1 +until test -e int.received || test $count = 0; do + sleep 1 + count=$(expr $count - 1) +done EOF chmod a+x timeout.cmd
bug-coreutils <at> gnu.org
:bug#13185
; Package coreutils
.
(Tue, 18 Dec 2012 13:39:02 GMT) Full text and rfc822 format available.Message #22 received at 13185-done <at> debbugs.gnu.org (full text, mbox):
From: Stefano Lattarini <stefano.lattarini <at> gmail.com> To: Pádraig Brady <P <at> draigBrady.com> Cc: 13185-done <at> debbugs.gnu.org Subject: Re: bug#13185: Test case 'misc/timeout-group' failed Date: Tue, 18 Dec 2012 14:36:38 +0100
On 12/18/2012 02:18 PM, Pádraig Brady wrote: > > I noticed a possible race in the test script. > So I'll apply this soon. > > thanks, > Pádraig. > > commit 09f72d285514a91495960ea3b0570251eed415b0 > Author: Pádraig Brady <P <at> draigBrady.com> > Date: Tue Dec 18 13:06:15 2012 +0000 > > tests: avoid a race in timeout-group.sh > > * tests/misc/timeout-group.sh: The kernel might possibly delay > signal propagation to timeout.cmd long enough, that it exits > normally without running the signal handler (as sleep will > be in the same process group and so get the signal too). > So avoid this by explicitly checking that the signal handler > is called, which should always happen under normal circumstances. > Reported by Stefano Lattarini on linux-2.6.30-2-686 and bash-4.2.36. > > diff --git a/tests/misc/timeout-group.sh b/tests/misc/timeout-group.sh > index 4cefc33..7117abb 100755 > --- a/tests/misc/timeout-group.sh > +++ b/tests/misc/timeout-group.sh > @@ -34,7 +34,11 @@ cat > timeout.cmd <<\EOF > #!/bin/sh > trap 'touch int.received; exit' INT > touch timeout.running > -sleep $1 > +count=$1 > +until test -e int.received || test $count = 0; do > + sleep 1 > + count=$(expr $count - 1) > +done > EOF > chmod a+x timeout.cmd > > Seems sensible to me. Let's hope it works; I'll re-open this report if I ever stumble into this problem again. Thanks, Stefano
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Wed, 16 Jan 2013 12:24:03 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.