If this code is done with AF_UNIX/SOCK_STREAM then all threads will hang in S. As it should be.
Summarizing:
On pipes all threads waiting will be in S state
On AF_UNIX/SOCK_STREAM all threads waiting will be in S state
On AF_UNIX/SOCK_DGRAM one thread will be in S state, the others in D state (BROKEN!)
So, yes, this is definitely a bug in the socket handling code.
If this code is done with AF_UNIX/SOCK_STREAM then all threads will hang in S. As it should be.
Summarizing:
On pipes all threads waiting will be in S state
On AF_UNIX/SOCK_STREAM all threads waiting will be in S state
On AF_UNIX/SOCK_DGRAM one thread will be in S state, the others in D state (BROKEN!)
So, yes, this is definitely a bug in the socket handling code.