Re: [Python-Dev] Sporadic failures of test_subprocess and test_multiprocessing_spawn

2015年3月29日 17:28:04 -0700

Hi,
2015年03月28日 12:26 GMT+01:00 Chris Angelico <[email protected]>:
> It seems to be stalling out. I'm not sure exactly what's happening
> here. Running just that one file doesn't do it, but running the full
> test suite results in a stall.
Ok, I reproduced the issue on David's buildbot. A (child) process was
stuck in _Py_open(), function called from _close_open_fds_safe() which
is called to run a child process.
Calling _Py_open() is not safe here because the GIL may or may not be
held. After fork, the status of the GIL is unclear.
I fixed the issue by replacing _Py_open() with _Py_open_noraise(),
this version doesn't use the GIL (it doesn't release the GIL to call
open() and it doesn't raise an exception).
https://hg.python.org/cpython/rev/2e1234208bab
Thanks David for the buildbot.
Victor
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to