Similar to #5898 but this time vfork child execs and parent hangs at a sigaction call.
The hang only happens if there was a clone3 that fails (with EINVAL) followed by an equivalent clone (with CLONE_VM|CLONE_VFORK). this is a common case because new glibc posix_spawn and system tries clone3 first and if the used clone flags (CLONE_CLEAR_SIGHAND) are not supported by the kernel then it falls back to old clone. So on some kernel and glibc version combinations a simple int main(){ system("/bin/true"); } hangs under drrun. the reproducer below should hang independently of glibc/kernel version. (note: under some containers clone3 is filtered so it always fails with ENOSYS, then the bug is not reproducible).
Similar to #5898 but this time vfork child execs and parent hangs at a sigaction call.
The hang only happens if there was a clone3 that fails (with EINVAL) followed by an equivalent clone (with CLONE_VM|CLONE_VFORK). this is a common case because new glibc posix_spawn and system tries clone3 first and if the used clone flags (CLONE_CLEAR_SIGHAND) are not supported by the kernel then it falls back to old clone. So on some kernel and glibc version combinations a simple
int main(){ system("/bin/true"); }
hangs under drrun. the reproducer below should hang independently of glibc/kernel version. (note: under some containers clone3 is filtered so it always fails with ENOSYS, then the bug is not reproducible).the output is not very informative, but it hangs forever (needs kill -9 to stop):
relevant strace without drrun:
strace with drrun
$ strace -o s.log -f -tt -yy -s 222 DynamoRIO-AArch64-Linux-9.0.1/bin64/drrun -- ./a.out
: