New submission from Ryan Petrello <r...@ryanpetrello.com>:

It's possible to cause Python child processes to encountered a deadlock and 
hang on fork by:

1) Spawning one or more threads in a parent process
2) Have one of those threads emit log lines
3) Have the main thread use os.fork()
4) In the child, log immediately

The attached Python script can be used to reproduce this issue in Python 2.7.15 
and Python 3.6.5

----------
components: Library (Lib)
files: hang.py
messages: 346732
nosy: ryan.petrello
priority: normal
severity: normal
status: open
title: Python hangs on fork when a logger is in use in a background thread
versions: Python 2.7, Python 3.6
Added file: https://bugs.python.org/file48441/hang.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37429>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to