[pypy-dev] Dead loop occurs when using python-daemon and multiprocessing together in PyPy 4.0.1
Vincent Legoll
vincent.legoll at gmail.com
Tue Jan 5 05:10:07 EST 2016
Hello and happy new pypyear to all pypyers !
On Tue, Jan 5, 2016 at 10:13 AM, Armin Rigo <arigo at tunes.org> wrote:
>> So to stay on the safe side, you prefer to keep reopening every time ?
>> https://bitbucket.org/vincentlegoll/pypy/commits/branch/fix-urandom-closed
>
> I'm not against a proper fix :-) The problem is that for the fix to
> be proper, it needs a bit more work than what you did. The problem is
> that the calls to os.fstat() in your code can each release the GIL; in
> CPython, the corresponding calls to fstat() are done without the GIL
> released, and I believe it is important.
OK for a proper fix, how can we write a test that will check for that ?
Is there a doc for pypy's way to grab the GIL ?
BTW, in the always open()ing, isn't the race still there, because the GIL is
released between open() and read(), no ? So the fd can be closed here too...
That could certainly be a smaller gap, but still...
--
Vincent Legoll
More information about the pypy-dev
mailing list