STINNER Victor added the comment:
The initial issue (RuntimeError messages) has been fixed, I'm closing the issue.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19565
Roundup Robot added the comment:
New changeset da10196b94f4 by Richard Oudkerk in branch 'default':
Issue #19565: Prevent warnings at shutdown about pending overlapped ops.
http://hg.python.org/cpython/rev/da10196b94f4
--
nosy: +python-dev
___
Python
Richard Oudkerk added the comment:
If you have a pending overlapped operation then the associated buffer should
not be deallocated until that operation is complete, or else you are liable to
get a crash or memory corruption.
Unfortunately WinXP provides no reliable way to cancel a pending
STINNER Victor added the comment:
For Vista and later versions of Windows these warnings are presumably
unnecessary since CancelIoEx() is used.
As close() on regular files, I would prefer to call explicitly cancel() to
control exactly when the overlapped operation is cancelled. Can't you fix
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().
Richard Oudkerk added the comment:
I think the attached patch should fix it. Note that with the patch the
RuntimeError can probably only occur on Windows XP.
Shall I apply it?
--
keywords: +patch
Added file: http://bugs.python.org/file32597/dealloc-runtimeerror.patch
STINNER Victor added the comment:
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.
I don't understand. The
Richard Oudkerk added the comment:
On 13/11/2013 3:07pm, STINNER Victor wrote:
On Vista and later, yes, this is done in the deallocator using
CancelIoEx(), although there is still a warning.
I don't understand. The warning is emitted because an operating is not done
nor cancelled. Why not
New submission from STINNER Victor:
Since the changeset c2a13acd5e2b24560419b93180ee49d1a4839b92 (Close #19466:
Clear the frames of daemon threads earlier during the Python shutdown to call
objects destructors), test_multiprocessing_spawn now show RuntimeError and a
child process crashs with
STINNER Victor added the comment:
I'm able to reproduce the RuntimeError on Windows 7, it comes from a pipe. The
message is probably written by a child process, not by the main process. I
suppose that Richard knows better than me how to fix this warning, so I don't
want to investigate it :-)
Changes by Guido van Rossum gu...@python.org:
--
nosy: -gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19565
___
___
Python-bugs-list
11 matches
Mail list logo