[issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot

Richard Oudkerk report at bugs.python.org
Wed Nov 13 11:55:46 CET 2013


Richard Oudkerk added the comment:

> As close() on regular files, I would prefer to call explicitly cancel() 
> to control exactly when the overlapped operation is cancelled.

If you use daemon threads then you have no guarantee that the thread will ever get a chance to explicitly call cancel().

> Can't you fix multiprocessing and/or the unit test to ensure that all 
> overlapped operations are completed or cancelled?

On Vista and later, yes, this is done in the deallocator using CancelIoEx(), although there is still a warning.  On XP it is not possible because CancelIo() has to be called from the same thread which started the operation.

I think these warnings come from daemon threads used by "manager" processes.  When the manager process exits some background threads may be blocked doing an overlapped read.

(It might be possible to wake up blocked threads by setting the event handle returned by _PyOS_SigintEvent().  That might allow the use of non-daemon threads.)

----------

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


More information about the Python-bugs-list mailing list