This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients Alexey.Agapitov, giampaolo.rodola, neologix
Date 2011-07-05.19:18:53
SpamBayes Score 4.302992e-09
Marked as misclassified No
Message-id <1309893534.88.0.301564052821.issue12502@psf.upfronthosting.co.za>
In-reply-to
Content
It's looping in Lib/asyncore.py:poll

select(4, [3], [3], [3], {30, 0})       = 1 (out [3], left {29, 999994})
select(4, [3], [3], [3], {30, 0})       = 1 (out [3], left {29, 999994})
select(4, [3], [3], [3], {30, 0})       = 1 (out [3], left {29, 999994})

loop sets the Unix domain socket in the writable set, and contrarily to AF_INET/AF_INET6 sockets, bound AF_UNIX SOCK_STREAM sockets are reported as writable before any client connects to them, which triggers the loop.

I've attached a patch which just doesn't add the socket to the writable set if it's in the accepting state.
It fixes the loop, and doesn't seem to cause any regression in test_asyncore, but since it's the first time I'm looking at asyncore's code, I might very well have missed something :-)
History
Date User Action Args
2011-07-05 19:18:54neologixsetrecipients: + neologix, giampaolo.rodola, Alexey.Agapitov
2011-07-05 19:18:54neologixsetmessageid: <1309893534.88.0.301564052821.issue12502@psf.upfronthosting.co.za>
2011-07-05 19:18:54neologixlinkissue12502 messages
2011-07-05 19:18:54neologixcreate