[Python-Dev] "make test" routinely fails to terminate

Skip Montanaro skip.montanaro at gmail.com
Sat May 19 18:41:18 EDT 2018

On the 3.7 branch, "make test" routinely fails to terminate. (Pretty
vanilla Ubuntu 17.10 running on a Dell Laptop. Nothing esoteric at all)
Lately, it's been one of the multiprocessing tests. After a long while
(~2000 seconds), I kill it, then it complains many times about lack of a
valid_signals attribute in the signal module:

ERROR: test_remove_signal_handler_error2
Traceback (most recent call last):
   File "/home/skip/src/python/cpython/Lib/unittest/mock.py", line 1191, in
     return func(*args, **keywargs)
line 219, in test_remove_signal_handler_error2
     m_signal.valid_signals = signal.valid_signals
AttributeError: module 'signal' has no attribute 'valid_signals'

Ran 1967 tests in 36.058s

FAILED (errors=362, skipped=11)
test test_asyncio failed
ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False
closed=False debug=False>
Re-running test 'test_signal' in verbose mode

then reruns test_signal in verbose mode.

Earlier today, a run succeeded, so I'm guessing a race condition exists in
the test system. I recall encountering a similar problem a few weeks ago
and discovered this open ticket:


Should I expect this as the normal behavior?


More information about the Python-Dev mailing list