Discussion:
[PATCH] testsuite: fix race conditions in ltdl dryrun
Pavel Raiskup
2014-12-15 13:13:27 UTC
Permalink
[+cc autoconf, as this seems to be relevant]

Hi all,

after several random [ltdl dryrun] failures, I used the 'make --debug' and
some stat calls to debug. Logs are attached for ok & failed runs as
tarball. Seems like after 'aclocal' run there should be an explicit
'sleep 1', similarly like in autoreconf [1]. Possible fix attached. The
problem seems to be in autoheader and Perl's move function (underlying
utime() handling?):

$ touch /tmp/a
$ stat /tmp/a
File: ‘/tmp/a’
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 23h/35d Inode: 1296845 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/praiskup) Gid: ( 1000/praiskup)
Context: unconfined_u:object_r:user_tmp_t:s0
Access: 2014-12-15 14:03:35.744530946 +0100
Modify: 2014-12-15 14:03:35.744530946 +0100
Change: 2014-12-15 14:03:35.744530946 +0100
Birth: -
$ perl -MFile::Copy -e 'move ("/tmp/a", "a");'
$ stat a
File: ‘a’
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: fd00h/64768d Inode: 11068678 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/praiskup) Gid: ( 1000/praiskup)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2014-12-15 14:03:42.000000000 +0100
Modify: 2014-12-15 14:03:35.000000000 +0100
^^^ floor()-ed
Change: 2014-12-15 14:03:42.678581581 +0100
Birth: -

[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/bin/autoreconf.in#n356

Pavel
Gary V. Vaughan
2015-01-20 15:29:29 UTC
Permalink
Post by Pavel Raiskup
[+cc autoconf, as this seems to be relevant]
Hi all,
Hi Pavel,

Thanks for the fix. This one has caught me out occasionally too, so I'll also
be glad to banish it!

Sorry for the delay in applying and pushing... it's been a crazy month!
Post by Pavel Raiskup
after several random [ltdl dryrun] failures, I used the 'make --debug' and
some stat calls to debug. Logs are attached for ok & failed runs as
tarball. Seems like after 'aclocal' run there should be an explicit
'sleep 1', similarly like in autoreconf [1]. Possible fix attached. The
problem seems to be in autoheader and Perl's move function (underlying
$ touch /tmp/a
$ stat /tmp/a
File: ‘/tmp/a’
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 23h/35d Inode: 1296845 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/praiskup) Gid: ( 1000/praiskup)
Context: unconfined_u:object_r:user_tmp_t:s0
Access: 2014-12-15 14:03:35.744530946 +0100
Modify: 2014-12-15 14:03:35.744530946 +0100
Change: 2014-12-15 14:03:35.744530946 +0100
Birth: -
$ perl -MFile::Copy -e 'move ("/tmp/a", "a");'
$ stat a
File: ‘a’
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: fd00h/64768d Inode: 11068678 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/praiskup) Gid: ( 1000/praiskup)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2014-12-15 14:03:42.000000000 +0100
Modify: 2014-12-15 14:03:35.000000000 +0100
^^^ floor()-ed
Change: 2014-12-15 14:03:42.678581581 +0100
Birth: -
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/bin/autoreconf.in#n356
Pavel
<racy-tests.tar.gz><0001-tests-fix-race-in-aclocal-autoheader-calls.patch>
Applied and pushed. Thanks again!

Cheers,
--
Gary V. Vaughan (gary AT gnu DOT org)
Loading...