Hang in Rust's test
I've found hang when running Rust tests with relibc on Linux: https://github.com/mati865/rust/blob/5fadf22c2c55466b3a5f787829c11666b72cc8d9/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs#L130
Executable prints dlsym(0x0, Some("pipe2"))
and keeps waiting on the child.
Task manager shows the child became zombie and strace
prints this over and over:
epoll_create1(EPOLL_CLOEXEC) = 3
epoll_ctl(3, EPOLL_CTL_ADD, 4, {EPOLLIN, {u32=0, u64=0}}) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN, {u32=0, u64=4294967296}}) = 0
epoll_pwait(3, [{EPOLLHUP, {u32=0, u64=0}}, {EPOLLIN|EPOLLHUP, {u32=0, u64=4294967296}}], 32, -1, NULL, 0) = 2
close(3) = 0
Backtrace from main process:
(gdb) bt
#0 0x000000000044871a in poll ()
#1 0x000000000042354f in std::sys::unix::pipe::read2::{{closure}} () at src/libstd/sys/unix/pipe.rs:98
#2 std::sys::unix::cvt_r () at src/libstd/sys/unix/mod.rs:140
#3 std::sys::unix::pipe::read2 () at src/libstd/sys/unix/pipe.rs:98
#4 std::process::Child::wait_with_output () at src/libstd/process.rs:1446
#5 0x0000000000423096 in std::process::Command::output::{{closure}} () at src/libstd/process.rs:798
#6 core::result::Result<T,E>::and_then () at /rustc/1a7f29f6d3f20aa0348417db726aa13e2e3b8ff9/src/libcore/result.rs:691
#7 std::process::Command::output () at src/libstd/process.rs:797
#8 0x000000000040dd0d in foo::main () at src/main.rs:130
I suspect zombie process is the issue here but I have no idea about most of this stuff.
My Rust patches: https://github.com/mati865/rust/commits/relibc I can also provide prebuilt Rust or static debug binary reproducing the issue.