New submission from Kenneth Chik <tarotc...@gmail.com>:

I am not sure if this is python or OS problem, I just installed Ubuntu 18.04 
LTS which comes with python3 v3.6.4. When I try to unittest code which contains 
multiprocessing.Pool with spawn, the unittest.main() blocks after completing 
all the tests. This problem did not exist on prior versions of Ubuntu/Python. 
Below is the printout after I KeyboardInterrupt the process.


...
----------------------------------------------------------------------
Ran 13 tests in 10.472s

OK
^CException ignored in: <module 'threading' from 
'/usr/lib/python3.6/threading.py'>
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 1294, in _shutdown
    t.join()
  File "/usr/lib/python3.6/threading.py", line 1056, in join
    self._wait_for_tstate_lock()
  File "/usr/lib/python3.6/threading.py", line 1072, in _wait_for_tstate_lock
    elif lock.acquire(block, timeout):
KeyboardInterrupt

The spawned processes have all completed and not visible on the process list, 
but the semaphore_tracker process is still there. This is the same with 
previous working system though. Thanks.

----------
messages: 313648
nosy: Kenneth Chik
priority: normal
severity: normal
status: open
title: unittest blocks when testing function using multiprocessing.Pool with 
state spawn
type: behavior
versions: Python 3.6

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

Reply via email to