Tight loop in async code
[Moved from bugzilla] Reporter: nickm@alum.mit.edu (Nick Mathewson)
Description: Opened: 2004-01-22 06:12
There's a tight loop somewhere in the new networking code. I'm noting this here so I don't forget to fix it.
The symptom is high CPU use, and an strace that shows many successive calls to poll(2) or select(2), with no change in arguments. One possible cause is that some TLS connection thinks it wants to read/write, but that it doesn't do anything to clear the read/write state. Another possible cause is that we're getting an event other than POLLIN|POLLOUT, and not doing anything with it.
As a first step, I should add log messages accounting for all opened/closed sockets, by fd, so that the next time this happens, I can link suffering fds to suffering connections. To make sure nothing stupid is the cause, I should also
(I'd fix this now, but I -need- to finish writing e2e-traffic.)
------- Additional Comments From Nick Mathewson 2004-01-27 01:59 -------
Fixed last week: we were getting POLLERR, but never handling it.
[Automatically added by flyspray2trac: Operating System: All]