Chromium Code Reviews
DescriptionFix IO thread hang on releasing a socket.
The problem was we assumed ProcessPendingRequest() would always make progress once the group's releasing socket went down to zero. However, in OnAvailableSocketSlot(), since the top stalled group might still have a releasing socket, it won't necessarily make progress. The algorithmic solution is to simply never do any socket slot processing in DoReleaseSocket() if there are any releasing sockets. This requires us to search for any stalled groups after releasing sockets gets back down to 0, so it requires the full group scan each time num_releasing_sockets goes back to 0. There is a performance hit here, but I think a linear search through 256~ groups in the worst case is ok.
TODO(willchan): evaluate the perf hit and consider adding a secondary data structure to improve the stalled group search.
BUG=42267
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=46757
Patch Set 1 #
Total comments: 2
Patch Set 2 : Add infinite loop check. #
Messages
Total messages: 3 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||