[mojo-core] Fix potential hang in ChannelPosix
It turns out that we were not putting the IO thread back to sleep when a message header indicates that we should expect more bytes but those bytes aren't available yet. In production this could lead to excess CPU usage when receiving large messages, and it can also lead to IO-thread hangs if a properly malformed message is sent to a receiving Channel. This fixes the hang by properly breaking out of our read loop when recvmsg returns EAGAIN or EWOULDBLOCK. Bug: 909801 Change-Id: Icc10cbd9c2ddec7e33a68ab9b4d53b755b650cbb Reviewed-on: https://chromium-review.googlesource.com/c/1361623Reviewed-by:Oksana Zhuravlova <oksamyt@chromium.org> Commit-Queue: Ken Rockot <rockot@google.com> Cr-Commit-Position: refs/heads/master@{#613786}
Showing
Please register or sign in to comment