Socket/Asyncore bug needs attention
Anyone who has worked on sockets or asyncore should take a look at SF bug #1010098: CPU usage shoots up with asyncore. Since Py2.3, the behavior changed for the worse. The bug report has been around for about five weeks and doesn't look like it is actively being solved. If you worked on those modules, please review your check-ins to see if they were the cause: www.python.org/sf/1010098 Thx, Raymond
[Raymond Hettinger]
Anyone who has worked on sockets or asyncore should take a look at SF bug #1010098: CPU usage shoots up with asyncore. Since Py2.3, the behavior changed for the worse. The bug report has been around for about five weeks and doesn't look like it is actively being solved. If you worked on those modules, please review your check-ins to see if they were the cause:
www.python.org/sf/1010098
FYI, as I noted in a comment there, I stared at that one long enough to determine that asyncore almost certainly wasn't to blame (despite the OP's natural belief that it must be). Instead something "above" asyncore changed so that a socket *always* shows up as "ready to write" in 2.4, but hardly ever in 2.3. CPU usage is nailed to 100% as a consequence in 2.4, while in 2.3 asyncore's select() times out instead, consuming almost no CPU.
Hello Raymond, On Mon, Sep 27, 2004 at 12:35:07PM -0400, Raymond Hettinger wrote:
Anyone who has worked on sockets or asyncore should take a look at SF bug #1010098: CPU usage shoots up with asyncore. (...) If you worked on those modules, please review your check-ins to see if they were the cause:
Funnily enough, the check-in to blame is from you :-) You replaced asynchat.py's usage of fifo lists with collection.deque()s, but you overlooked the test for emptiness, which was 'self.list == []'. This is fine if 'self.list' is really a list, but not if it is a deque :-) Fixed, checked in. Armin
participants (4)
-
Armin Rigo
-
Raymond Hettinger
-
Raymond Hettinger
-
Tim Peters