[issue33196] SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched

Arcadiy Ivanov report at bugs.python.org
Wed Nov 14 09:08:05 EST 2018


Arcadiy Ivanov <arcadiy at ivanov.biz> added the comment:

@vstinner

> I'm not sure that I understand the bug.

The bug is, if a user makes an error and passes a Queue from context 'fork' to a child that is spawned using 'spawn', the passed Queue is, for obvious reasons, broken. 

The 'print("Child r_q: %r, %r, %r" % (r_q._rlock, r_q._wlock, r_q._sem), flush=True)' is simply a demonstration of a broken state of the SemLock observed in the child. 

The expected fix would be to stop the mixed context use of MP objects on the API level (ValueError?) or at least prevent a segfault.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33196>
_______________________________________


More information about the Python-bugs-list mailing list