[issue12502] 100% cpu usage when using asyncore with UNIX socket

2013-02-04 Thread Benjamin Ash
Benjamin Ash added the comment: Hi Charles-François, I am using a recent version of Python-2.7 that does in fact contains this patch http://hg.python.org/cpython/rev/16bc59d37866: python-2.7.3-4.fc16.x86_64 (Fedora 16) The CPU usage spikes after I make the initial client connection to the

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2013-02-04 Thread Benjamin Ash
Benjamin Ash added the comment: After doing a bit more testing, I was able to prevent the problem from occurring in asyncore_test.py with the following patch: --- /proc/self/fd/112013-02-04 11:24:41.298347199 -0500 +++ asyncore_test.py2013-02-04 11:24:40.393318513 -0500 @@ -19,10

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2013-02-04 Thread Charles-François Natali
Charles-François Natali added the comment: Using handle_accept() in my code and remembering to call listen() in my asyncore.dispatcher server's constructor did the trick. I am not sure if we still have a bug here though, since if the subclass doesn't define a proper handle_accept() we get

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2013-02-04 Thread Benjamin Ash
Benjamin Ash added the comment: Ok, thanks for quick followup. I didn't realize that the patch for Python-3, sorry about that. The issue I had was due to never calling self.listen() in the constructor of my server (asyncore.dispatcher). If this is not done the CPU spikes to 100%. Thanks

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2013-02-03 Thread Charles-François Natali
Charles-François Natali added the comment: I'm unable to reproduce it. Are you using the attached script? Did you apply the patch by hand, or are you using a recent Python version? -- ___ Python tracker rep...@bugs.python.org

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2013-02-01 Thread Benjamin Ash
Benjamin Ash added the comment: Hi, I am still seeing this issue even with the patches applied. I see 100% CPU utilization, and strace shows the process is in same kind of select() loop as msg139899. Any help would be greatly appreciated. Thanks, -ben strace output: select(4, [3], [3],

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-15 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Patch committed, closing. Alexey, thanks for reporting this. (I'll open a separate issue to increase the tests coverage). -- resolution: - fixed stage: - committed/rejected status: open - closed

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- versions: +Python 2.7, Python 3.1, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12502 ___

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12502 ___ ___

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-15 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- Removed message: http://bugs.python.org/msg140388 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12502 ___

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Woops, I don't know how, but I removed a neologix's message: Patch committed, closing. Alexey, thanks for reporting this. (I'll open a separate issue to increase the tests coverage). -- nosy: +haypo

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-14 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 16bc59d37866 by Charles-François Natali in branch '2.7': Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. http://hg.python.org/cpython/rev/16bc59d37866 -- nosy: +python-dev

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-14 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 42ec507815d2 by Charles-François Natali in branch '3.1': Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. http://hg.python.org/cpython/rev/42ec507815d2 -- ___ Python tracker

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-14 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset ed90c1c8ee62 by Charles-François Natali in branch '3.2': Merge - Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. http://hg.python.org/cpython/rev/ed90c1c8ee62 -- ___ Python

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-14 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset ca077f2672e3 by Charles-François Natali in branch 'default': Merge - Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. http://hg.python.org/cpython/rev/ca077f2672e3 -- ___

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-08 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Looks good, the patch seems to fix the problem. Alright. Giampaolo, do you agree? Also, I noticed that test_asyncore currently only tests AF_INET sockets. I'm working a patch to add AF_UNIX (and maybe AF_INET6) tests. --

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-08 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Sorry for delay. Yes, patch looks ok to me and some tests for AF_UNIX sockets would definitively be welcome. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12502

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-05 Thread Алексей Агапитов
New submission from Алексей Агапитов marwinx...@gmail.com: When using asyncore server with UNIX socket, I got 100% CPU usage. I run modified code example from asyncore doc page. This code was tested on two systems: Ubuntu 10.04 2.6.32-32-generic #62-Ubuntu SMP with two versions of Python:

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-05 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12502 ___ ___ Python-bugs-list

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-05 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: It's looping in Lib/asyncore.py:poll select(4, [3], [3], [3], {30, 0}) = 1 (out [3], left {29, 94}) select(4, [3], [3], [3], {30, 0}) = 1 (out [3], left {29, 94}) select(4, [3], [3], [3], {30, 0}) = 1 (out

[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-05 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Looks good, the patch seems to fix the problem. This section of code indicates that the accepting socket shouldn't be in the write set... def handle_write_event(self): if self.accepting: # Accepting sockets shouldn't get a