Bug ID: 231848
Summary: accept4() doesn't return a socket address when
threading is involved
Product: Base System
Severity: Affects Only Me
Assignee: [hidden email] Reporter: [hidden email]
We've added threading support to socket_wrapper  which is a tool to create
artificial networks for testing.
We wrote several tests to make sure socket_wrapper works correctly. However
there are two tests which fail on FreeBSD but work correctly on Linux.
When running with socket_wrapper we tracked it down to accept4() not filling
out the passed sockaddr. socket_wrapper uses unix socket and we would expect
the unix socket path returned by accept4, which isn't the case.
If I change the echo_srv to write to a file and enable debugging of
socket_wapper this slows down the whole thing and the tests pass correclty.
This means accept4 correctly filling out the sockaddr structure. So this looks
like a race condition in the freebsd libc code.
You can find the code we are currently working on at .