[docs] [issue8865] select.poll is not thread safe

Christian Schubert report at bugs.python.org
Tue Jun 1 08:35:23 CEST 2010


Christian Schubert <bugs at apexo.de> added the comment:

okay, I've managed to put together a script that fairly consistently reproduces the problem on my (core2 duo 2,something GHz) machine

some parameters (sleep times) are randomized in each iteration, the script runs for 30 iterations, each for 1 second, and counts the number of events where the fd looks bogus (max 1 per iteration); some other events (fd correct, revents bogus are also reported, but not counted)

example output:
poll returned [(-3, 65535)], we were looking for fd 3
poll returned [(-3, 65535)], we were looking for fd 3
poll returned [(-3, 65535)], we were looking for fd 3
poll returned [(-3, 65535)], we were looking for fd 3
poll returned [(-3, 65535)], we were looking for fd 3
poll returned [(-1, 65535)], we were looking for fd 3
poll returned [(-1, 65535)], we were looking for fd 3
poll returned [(-1627358347, 60497)], we were looking for fd 3
should not get here; poll returned [(3, 0)]
poll returned [(-3, 65535)], we were looking for fd 3
9 events in 30 iterations

----------
Added file: http://bugs.python.org/file17510/select_threads.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8865>
_______________________________________


More information about the docs mailing list