[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2020-07-19 Thread Greg Lindahl
Change by Greg Lindahl : -- nosy: +wumpus ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2020-05-06 Thread Michael
Michael added the comment: Attached working patch. Tested with signal handler set in Lib/test/_test_multiprocessing.py: 2329a2330,2331 > def signal_handler(signum, frame): > pass 2335a2338 > cls.old_handler = signal.signal(signal.SIGTERM, signal_handler) 2342a2346 >

[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2020-05-06 Thread Michael
Michael added the comment: Reproducing issue with attached test (Python 3.8.2 on Ubuntu 16.04). -- Added file: https://bugs.python.org/file49130/mp-signal-bug-python3.8.py ___ Python tracker

[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2020-05-06 Thread Michael
Michael added the comment: Looks like a duplicate of my previous issue https://bugs.python.org/issue29759 Unfortunately some frameworks like Gunicorn are extensively using signal handlers for their internal purposes. -- nosy: +mapozyan ___

[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2019-10-04 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: atexit proved time and time again to be unreliable, not really an option. Not all programs shutdown nicely enough for atexit. Should I tell users "use forkserver on 3.8 because broken stuff"? -- ___ Python

[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2019-10-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Several things here: - you can perform critical cleanup with the atexit module; using a signal handler for that is extremely low-level and error-prone - you can also try to switch to the "forkserver" method of multiprocessing, perhaps that will fix your

[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2019-10-01 Thread Ionel Cristian Mărieș
Change by Ionel Cristian Mărieș : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2019-09-19 Thread Ionel Cristian Mărieș
New submission from Ionel Cristian Mărieș : Running `python3.8 mp-bug-python2.8.py` usually gets stuck after a dozen iterations or so. It appears that if I stop setting that signal handler it doesn't get stuck. Unfortunately I need it to perform critical cleanup. This is what I got from gdb: