Subject: Re: bug#12820: gnulib testsuite failure in latest master

From: Stefano Lattarini <[email-masked]>
Date: Wed, 07 Nov 2012 18:06:13 +0100

tags 12820 + moreinfo
severity 12820 minor
thanks

Hi Paul.

On 11/07/2012 04:46 PM, Paul Eggert wrote:
> Can you please run "strace ./test-utimens" and
> let us know the system calls that the failing test
> executes?
>
Sure, here it is:

-*-*-

execve("./test-utimens", ["./test-utimens"], [/* 89 vars */]) = 0
brk(0)                                  = 0x981c000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb803b000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=197544, ...}) = 0
mmap2(NULL, 197544, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb800a000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/i686/cmov/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\30\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=30684, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb8009000
mmap2(NULL, 33360, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb8000000
mmap2(0xb8007000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb8007000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240o\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1413288, ...}) = 0
mmap2(NULL, 1427832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ea3000
mprotect(0xb7ff9000, 4096, PROT_NONE)   = 0
mmap2(0xb7ffa000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x156) = 0xb7ffa000
mmap2(0xb7ffd000, 10616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ffd000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/i686/cmov/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220L\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=117009, ...}) = 0
mmap2(NULL, 98816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e8a000
mmap2(0xb7e9f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb7e9f000
mmap2(0xb7ea1000, 4608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ea1000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e89000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e898d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7e9f000, 4096, PROT_READ)   = 0
mprotect(0xb7ffa000, 8192, PROT_READ)   = 0
mprotect(0xb8007000, 4096, PROT_READ)   = 0
mprotect(0xb8059000, 4096, PROT_READ)   = 0
munmap(0xb800a000, 197544)              = 0
set_tid_address(0xb7e89938)             = 6810
set_robust_list(0xb7e89940, 0xc)        = 0
futex(0xbfa0d810, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, bfa0d820) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0xb7e8e6e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb7e8eb70, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="bigio", ...}) = 0
rt_sigaction(SIGINT, {SIG_IGN, [], 0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, [], 0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_PARENT_SETTID|SIGCHLD, parent_tidptr=0xbfa0d7e4) = 6811
waitpid(6811, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 6811
rt_sigaction(SIGINT, {SIG_DFL, [], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
open("test-utimens.tfile", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0600) = 3
close(3)                                = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
open("test-utimens.ttmp", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0600) = 3
close(3)                                = 0
stat64("test-utimens.ttmp", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
unlink("test-utimens.ttmp")             = 0
nanosleep({0, 20000000}, NULL)          = 0
open("test-utimens.ttmp", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0600) = 3
close(3)                                = 0
stat64("test-utimens.ttmp", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
unlink("test-utimens.ttmp")             = 0
nanosleep({2, 0}, NULL)                 = 0
utimensat(AT_FDCWD, "test-utimens.tfile", NULL, 0) = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
clock_gettime(CLOCK_REALTIME, {1352305270, 38052554}) = 0
utimensat(AT_FDCWD, "test-utimens.tfile", {{1352305270, 38052554}, {1352305270, 38052554}}, 0) = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
utimensat(AT_FDCWD, "no_such", NULL, 0) = -1 ENOENT (No such file or directory)
utimensat(AT_FDCWD, "no_such/", NULL, 0) = -1 ENOENT (No such file or directory)
utimensat(AT_FDCWD, "", NULL, 0)        = -1 ENOENT (No such file or directory)
utimensat(AT_FDCWD, "test-utimens.tfile/", {{946684800, 0}, {946684800, 0}}, 0) = -1 ENOTDIR (Not a directory)
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
utimensat(AT_FDCWD, "test-utimens.tfile", {{946684800, 499999999}, {946684800, 999999999}}, 0) = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
utimensat(AT_FDCWD, "test-utimens.tfile", {{946684800, 0}, UTIME_NOW}, 0) = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
utimensat(AT_FDCWD, "test-utimens.tfile", {{1000000000, 0}, {1352305274, 0}}, 0) = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
symlink("test-utimens.tfile", "test-utimens.tlink") = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
utimensat(AT_FDCWD, "test-utimens.tlink/", NULL, 0) = -1 ENOTDIR (Not a directory)
utimensat(AT_FDCWD, "test-utimens.tlink", {{946684800, 0}, {946684800, 0}}, 0) = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
stat64("test-utimens.tlink", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
unlink("test-utimens.tlink")            = 0
unlink("test-utimens.tfile")            = 0
open("test-utimens.tfile", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0600) = 3
close(3)                                = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
open("test-utimens.tfile", O_WRONLY|O_LARGEFILE) = 3
utimensat(3, NULL, NULL, 0)             = 0
close(3)                                = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
clock_gettime(CLOCK_REALTIME, {1352305278, 41932970}) = 0
open("test-utimens.tfile", O_WRONLY|O_LARGEFILE) = 3
utimensat(3, NULL, {{1352305278, 41932970}, {1352305278, 41932970}}, 0) = 0
close(3)                                = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
open("no_such", O_WRONLY|O_LARGEFILE)   = -1 ENOENT (No such file or directory)
open("no_such", O_RDONLY|O_LARGEFILE)   = -1 ENOENT (No such file or directory)
utimensat(AT_FDCWD, "no_such", NULL, 0) = -1 ENOENT (No such file or directory)
open("no_such/", O_WRONLY|O_LARGEFILE)  = -1 ENOENT (No such file or directory)
open("no_such/", O_RDONLY|O_LARGEFILE)  = -1 ENOENT (No such file or directory)
utimensat(AT_FDCWD, "no_such/", NULL, 0) = -1 ENOENT (No such file or directory)
open("", O_WRONLY|O_LARGEFILE)          = -1 ENOENT (No such file or directory)
open("", O_RDONLY|O_LARGEFILE)          = -1 ENOENT (No such file or directory)
utimensat(AT_FDCWD, "", NULL, 0)        = -1 ENOENT (No such file or directory)
open("test-utimens.tfile", O_WRONLY|O_LARGEFILE) = 3
close(3)                                = 0
open("test-utimens.tfile", O_WRONLY|O_LARGEFILE) = 3
close(3)                                = 0
open("test-utimens.tfile/", O_WRONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
open("test-utimens.tfile/", O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
utimensat(AT_FDCWD, "test-utimens.tfile/", {{946684800, 0}, {946684800, 0}}, 0) = -1 ENOTDIR (Not a directory)
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
open("test-utimens.tfile", O_WRONLY|O_LARGEFILE) = 3
utimensat(3, NULL, {{946684800, 499999999}, {946684800, 999999999}}, 0) = 0
close(3)                                = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
open("test-utimens.tfile", O_WRONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
utimensat(3, NULL, {{946684800, 0}, UTIME_NOW}, 0) = 0
close(3)                                = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
open("test-utimens.tfile", O_WRONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
utimensat(3, NULL, {{1000000000, 0}, {1352305282, 0}}, 0) = 0
close(3)                                = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
symlink("test-utimens.tfile", "test-utimens.tlink") = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
open("test-utimens.tlink/", O_WRONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
open("test-utimens.tlink/", O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
utimensat(AT_FDCWD, "test-utimens.tlink/", NULL, 0) = -1 ENOTDIR (Not a directory)
open("test-utimens.tlink", O_WRONLY|O_LARGEFILE) = 3
utimensat(3, NULL, {{946684800, 0}, {946684800, 0}}, 0) = 0
close(3)                                = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
stat64("test-utimens.tlink", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
unlink("test-utimens.tlink")            = 0
unlink("test-utimens.tfile")            = 0
open("test-utimens.tfile", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0600) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
utimensat(3, NULL, NULL, 0)             = 0
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
clock_gettime(CLOCK_REALTIME, {1352305286, 46894728}) = 0
utimensat(3, NULL, {{1352305286, 46894728}, {1352305286, 46894728}}, 0) = 0
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
utimensat(99, NULL, NULL, 0)            = -1 EBADF (Bad file descriptor)
dup(0)                                  = 4
close(4)                                = 0
utimensat(4, NULL, NULL, 0)             = -1 EBADF (Bad file descriptor)
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
utimensat(3, NULL, {{946684800, 499999999}, {946684800, 999999999}}, 0) = 0
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
utimensat(3, NULL, {{946684800, 0}, UTIME_NOW}, 0) = 0
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
utimensat(3, NULL, {{1000000000, 0}, {1352305290, 0}}, 0) = 0
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
close(3)                                = 0
unlink("test-utimens.tfile")            = 0
utimensat(AT_FDCWD, "no_such", NULL, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
utimensat(AT_FDCWD, "no_such/", NULL, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
utimensat(AT_FDCWD, "", NULL, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
open("test-utimens.tfile", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0600) = 3
close(3)                                = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
utimensat(AT_FDCWD, "test-utimens.tfile/", {{946684800, 0}, {946684800, 0}}, AT_SYMLINK_NOFOLLOW) = -1 ENOTDIR (Not a directory)
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
utimensat(AT_FDCWD, "test-utimens.tfile", {{946684800, 0}, {946684800, 0}}, AT_SYMLINK_NOFOLLOW) = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
symlink("test-utimens.tfile", "test-utimens.tlink") = 0
utimensat(AT_FDCWD, "test-utimens.tlink", NULL, AT_SYMLINK_NOFOLLOW) = 0
stat64("test-utimens.tfile", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
unlink("test-utimens.tfile")            = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
utimensat(AT_FDCWD, "test-utimens.tlink", {{946684800, 499999999}, {946684800, 999999999}}, AT_SYMLINK_NOFOLLOW) = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
utimensat(AT_FDCWD, "test-utimens.tlink", {{946684800, 0}, UTIME_NOW}, AT_SYMLINK_NOFOLLOW) = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
nanosleep({2, 0}, NULL)                 = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
utimensat(AT_FDCWD, "test-utimens.tlink", {{1000000000, 0}, {1352305300, 0}}, AT_SYMLINK_NOFOLLOW) = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
unlink("test-utimens.tlink")            = 0
symlink("test-utimens.tdir", "test-utimens.tlink") = 0
mkdir("test-utimens.tdir", 0700)        = 0
utimensat(AT_FDCWD, "test-utimens.tlink/", {{946684800, 0}, {946684800, 0}}, AT_SYMLINK_NOFOLLOW) = 0
stat64("test-utimens.tdir", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=17, ...}) = 0
utimensat(AT_FDCWD, "test-utimens.tlink", NULL, AT_SYMLINK_NOFOLLOW) = 0
stat64("test-utimens.tdir", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("test-utimens.tlink", {st_mode=S_IFLNK|0777, st_size=17, ...}) = 0
rmdir("test-utimens.tdir")              = 0
unlink("test-utimens.tlink")            = 0
exit_group(0)                           =

-*-*-

And I couldn't but notice that the test had passed this time ...

So I tried to re-run it from "make check", and passed this time as well.
Weird.  Let's see if I can reproduce the failure with:

  $ i=0; while strace -o ut ./test-utimens; do echo RUN $((++i)); done

... Well, I still haven't reproduced it after 47 runs.  I'll let you
know if I manage to reproduce it somehow.  In the meantime, I've taken
the liberty of tagging my report with "moreinfo".

Regards,
  Stefano