AssertionError in multiprocessing/heap.py

Issue #2658 resolved
Mitchell Harding
created an issue

I am observing an AssertionError when attempting to start a multiprocessing.Process that has a multiprocessing.Value or multiprocessing.Array passed to it as an argument.

I observed this problem on Windows 7 64-bit, PyPy 5.8.0 with MSC v.1500 32 bit. It reproduces both with and without the "--jit off" option. I have not been able to reproduce it using CPython on Windows, nor using CPython or PyPy on Ubuntu.

Full details and scripts to reproduce the problem are included in the attachment.

Comments (5)

  1. Armin Rigo

    After investigation, I think that the line with the failing assert works a bit by chance on CPython. I'm minded to kill the _multiprocessing.GetLastError() function and comment out the two asserts using it. Can you check that if you comment out the failing assert, everything works for you afterwards? Thanks!

    (An example of why it is very fragile: if you are running that code under a line-by-line debugger or tracer, it will likely fail, because the Windows notion of GetLastError() will be overwritten by the extra prints, for example.)

  2. Mitchell Harding reporter

    Commenting out the failing assert resolves the issue in the test scripts I provided, and in a (slightly) more complex test scenario. I'll do more extensive testing over the next few days and let you know if I run into any issues. Beyond that, if there's anything else I can do from my end to help, please let me know. Thanks for your quick response on this!

  3. Log in to comment