Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upipc-channel can deadlock on Linux #34
Closed
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When a recv() is reading a fragmented message, the Linux implementation pushes any interleaved fragments from other messages back to the same file descriptor via sendmsg().
However, since that is being sent to the same fd, if the send buffer is full, deadlock occurs - because the send is occurring on the same thread that should be draining from that fd.
This causes a lot of timeouts in the webrender reftests, and (I suspect) is also responsible for a lot of the Linux timeouts we see on the build machines.
For example, see the backtrace below - thread 72 is blocked in sendmsg since the send buffer is full, but this is called inside of the recv() function for the same fd, so the send buffer will never be emptied.