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

2014-12-17 Thread Steve Dower
Steve Dower added the comment: I've commented out the assertion for now with a comment pointing to this issue, so that'll keep the buildbots running while we figure out how to deal with this properly. -- ___ Python tracker

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

2014-12-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1794d754ff3c by Steve Dower in branch 'default': Issue #23060: Suppresses a multiprocessing assert that fails incorrectly https://hg.python.org/cpython/rev/1794d754ff3c -- nosy: +python-dev ___ Python tra

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

2014-12-16 Thread Steve Dower
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 occurre

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

2014-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Or perhaps: buffer = mmap.mmap(-1, self.size, tagname=self.name) assert _winapi.GetLastError() == _winapi.ERROR_ALREADY_EXISTS self.buffer = buffer ? -- nosy: +pitrou ___ Python tracker

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

2014-12-16 Thread Tim Golden
Tim Golden added the comment: I agree that this is a fragile assertion; it's too far removed from the CreateFileMapping call which can generate it and almost impossible to work around (in calling code) if it should fail in the way we're seeing in the buildbot. I think we're better off relying on

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

2014-12-15 Thread Steve Dower
Steve Dower added the comment: A buildbot failure due to this can be seen here: http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/183/steps/test/logs/stdio -- ___ Python tracker ___

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

2014-12-15 Thread Steve Dower
New submission from Steve Dower: Currently, the implementation of __setstate__ at Lib/multiprocessing/heap.py:54 looks like this: def __setstate__(self, state): self.size, self.name = self._state = state self.buffer = mmap.mmap(-1, self.size, tagname=self.name) assert _winapi.GetLas