Kunal <[email protected]> added the comment:
I was trying to reproduce the problem and can get the core dump to happen with
a smaller program as well -- it doesn't seem related to asyncio specifically
but seems to be a bug with multiprocessing.Event (or probably the primitives
inside it).
```
#!/usr/bin/env python
import time
import multiprocessing
def master_func(event) -> None:
print(f"Child: {event = }")
print(f"Child: {event.is_set() = }") # Crashes here with SIGSEGV in
sem_trywait
print("Completed")
if __name__ == "__main__":
event = multiprocessing.Event()
context_spawn = multiprocessing.get_context("spawn")
proc = context_spawn.Process(target=master_func, args=(event, ))
proc.start()
print(f"Parent: {event = }")
print(f"Parent: {event.is_set() = }")
proc.join()
```
Switching to fork instead of spawn bypasses the issue. Trying to dig into this
a little bit more.
----------
nosy: +knl
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43832>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com