[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
Ryan Petrello added the comment: Actually, I think I *am* seeing this on 3.7: (gdb) bt #0 0x7f130d530adb in futex_abstimed_wait (cancel=true, private=, abstime=0x0, expected=0, futex=0x142c6d0) at ../nptl/sysdeps/unix/sysv/linux/sem_waitcommon.c:43 #1 do_futex_wait

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
Ryan Petrello added the comment: Also, for what it's worth, I'm *not* able to reproduce this hang in Python 3.7.0. -- ___ Python tracker ___

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue36533 -- nosy: +vinay.sajip, xtreak ___ Python tracker ___

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
Ryan Petrello added the comment: Here's the stack of one the hung child processes under py2.7: (gdb) py-bt #4 Waiting for a lock (e.g. GIL) #5 Waiting for a lock (e.g. GIL) #7 Frame 0x7f346a925430, for file /usr/lib64/python2.7/Queue.py, line 118, in put (self=, maxsize=0,

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
Ryan Petrello added the comment: This issue seems _very_ similar to https://bugs.python.org/issue6721, but I wasn't able to encounter the exact stack I've been seeing on my end. Specifically, when I run the reproducer script in this issue (hang.py) for a few minutes, hung child processes

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
New submission from Ryan Petrello : 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