joyent / libuv

Go to
https://github.com/libuv/libuv
3.27k stars 653 forks source link

1.0.0-r2 failed test: threadpool_multiple_event_loops #1540

Open jbergstroem opened 10 years ago

jbergstroem commented 10 years ago

This is linux 3.17.1 x86_64 with glibc 2.19 and built with gcc 4.8.3:

`threadpool_multiple_event_loops` failed: timeout
Output from process `threadpool_multiple_event_loops`: (no output)

strace output (cut out most of the library loading part):

open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\33\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1705128, ...}) = 0
mmap(NULL, 3811800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f72be71c000
mprotect(0x7f72be8b6000, 2093056, PROT_NONE) = 0
mmap(0x7f72beab5000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x199000) = 0x7f72beab5000
mmap(0x7f72beabb000, 14808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f72beabb000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f72bf732000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f72bf731000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f72bf730000
arch_prctl(ARCH_SET_FS, 0x7f72bf731700) = 0
mprotect(0x7f72beab5000, 16384, PROT_READ) = 0
mprotect(0x7f72becc1000, 4096, PROT_READ) = 0
mprotect(0x7f72beed7000, 4096, PROT_READ) = 0
mprotect(0x7f72bf0f2000, 4096, PROT_READ) = 0
mprotect(0x7f72bf2fe000, 4096, PROT_READ) = 0
mprotect(0x7f72bf520000, 4096, PROT_READ) = 0
mprotect(0x647000, 4096, PROT_READ)     = 0
mprotect(0x7f72bf742000, 4096, PROT_READ) = 0
munmap(0x7f72bf735000, 46317)           = 0
set_tid_address(0x7f72bf7319d0)         = 10241
set_robust_list(0x7f72bf7319e0, 24)     = 0
futex(0x7fff49cf5be0, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7fff49cf5be0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7f72bf731700) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7f72beee1a40, [], SA_RESTORER|SA_SIGINFO, 0x7f72beeeaeb0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f72beee1ad0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f72beeeaeb0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f72be7512b0}, {SIG_DFL, [], 0}, 8) = 0
brk(0)                                  = 0xa30000
brk(0xa51000)                           = 0xa51000
unlink("/tmp/uv-test-sock")             = -1 ENOENT (No such file or directory)
nanosleep({0, 250000000}, NULL)         = 0
stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
open("/tmp/tmpfBUHyiQ", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
unlink("/tmp/tmpfBUHyiQ")               = 0
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f72bf740000
lseek(3, 0, SEEK_CUR)                   = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f72bf7319d0) = 10242
pipe([4, 5])                            = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f72bdf1b000
mprotect(0x7f72bdf1b000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f72be71aff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f72be71b9d0, tls=0x7f72be71b700, child_tidptr=0x7f72be71b9d0) = 10243
select(5, [4], NULL, NULL, {5, 0})      = 0 (Timeout)
kill(10242, SIGTERM)                    = 0
futex(0x7f72be71b9d0, FUTEX_WAIT, 10243, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=10242, si_uid=1000, si_status=SIGTERM, si_utime=1, si_stime=4} ---
futex(0x7f72be71b9d0, FUTEX_WAIT, 10243, NULL) = 0
close(4)                                = 0
close(5)                                = 0
write(2, "\n`threadpool_multiple_event_loop"..., 51
`threadpool_multiple_event_loops` failed: timeout
) = 51
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
write(2, "Output from process `threadpool_"..., 67Output from process `threadpool_multiple_event_loops`: (no output)
) = 67
write(2, "================================"..., 62=============================================================
) = 62
close(3)                                = 0
munmap(0x7f72bf740000, 4096)            = 0
exit_group(255)                         = ?
+++ exited with 255 +++
saghul commented 10 years ago

Can you consistently reproduce it? I've never seen this one fail IIRC.

jbergstroem commented 10 years ago

both this and issue #1539 is reproducible (happens every time :/)

txdv commented 10 years ago

What distro are you using?

jbergstroem commented 10 years ago

This is Gentoo. When it comes to reproducing I'll try on some other machines – but I can post the kernel config and additional versioning info if relevant.

txdv commented 10 years ago

I haven't tried gentoo in a while, maybe I should take it for a spin again. But compiling so long for one bug... I'm too inpatient for that.

saghul commented 10 years ago

@jbergstroem does the test complete if you rin it standalone?

./run_tests threadpool_multiple_event_loops threadpool_multiple_event_loops
jbergstroem commented 10 years ago

@txdv The amount of compiling from a base install in this particular case would be building git. Anyway, lets avoid os talk; I really don't care about Gentoo, rather this failing test.

@saghul: Works (no output/fail) if I call it twice – as you requested. Fails if I call the test only once (what I did with strace).

saghul commented 10 years ago

The difference between once and twice is that the test will run in a child process and be limited by the timeout, or not.