[issue23060] Assert fails in multiprocessing.heap.Arena.__setstate__ on Windows

Steve Dower report at bugs.python.org
Tue Dec 16 19:39:08 CET 2014


Steve Dower added the comment:

That was actually my first hack and it also works. The fundamental problem here is that GetLastError() is not actually meant to indicate *whether* an error has occurred, but when one has occurred it describes what it was.

Indeed, in this case no error has occurred - CreateFileMapping was called and there is a file mapping available. OpenFileMapping is provided if an error is required when the mapping does not already exist.

The best option is definitely a separate method (or parameter) on mmap to open/raise rather than open/create. I may just comment out the assertion with a reference to this bug in the meantime, so that the buildbots aren't getting stuck every time.

----------

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


More information about the Python-bugs-list mailing list