classification
Title: test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest fails intermittently on Travis and passes in verbose mode
Type: Stage:
Components: Tests Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: bquinlan, pablogsal, pitrou, vstinner, xtreak
Priority: normal Keywords:

Created on 2019-01-23 13:48 by xtreak, last changed 2019-01-23 13:59 by vstinner.

Messages (2)
msg334255 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python triager) Date: 2019-01-23 13:48
I can see this test failing intermittently many times on Travis during the first run and to pass later during a verbose run hence the failure is not visible. I don't know the exact cause and haven't checked the buildbots. Search also didn't bring up anything so I thought to file a new issue for this.

Stack trace : 

======================================================================
FAIL: test_crash (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) [crash at task unpickle]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_concurrent_futures.py", line 958, in test_crash
    res.result(timeout=self.TIMEOUT)
  File "/home/travis/build/python/cpython/Lib/concurrent/futures/_base.py", line 438, in result
    raise TimeoutError()
concurrent.futures._base.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_concurrent_futures.py", line 962, in test_crash
    self._fail_on_deadlock(executor)
  File "/home/travis/build/python/cpython/Lib/test/test_concurrent_futures.py", line 910, in _fail_on_deadlock
    self.fail(f"Executor deadlock:\n\n{tb}")
AssertionError: Executor deadlock:
Thread 0x00002b5105ca3700 (most recent call first):
  File "/home/travis/build/python/cpython/Lib/threading.py", line 296 in wait
  File "/home/travis/build/python/cpython/Lib/multiprocessing/queues.py", line 227 in _feed
  File "/home/travis/build/python/cpython/Lib/threading.py", line 865 in run
  File "/home/travis/build/python/cpython/Lib/threading.py", line 917 in _bootstrap_inner
  File "/home/travis/build/python/cpython/Lib/threading.py", line 885 in _bootstrap
Thread 0x00002b510584c700 (most recent call first):
  File "/home/travis/build/python/cpython/Lib/selectors.py", line 415 in select
  File "/home/travis/build/python/cpython/Lib/multiprocessing/connection.py", line 930 in wait
  File "/home/travis/build/python/cpython/Lib/concurrent/futures/process.py", line 354 in _queue_management_worker
  File "/home/travis/build/python/cpython/Lib/threading.py", line 865 in run
  File "/home/travis/build/python/cpython/Lib/threading.py", line 917 in _bootstrap_inner
  File "/home/travis/build/python/cpython/Lib/threading.py", line 885 in _bootstrap
Current thread 0x00002b50fe39c9c0 (most recent call first):
  File "/home/travis/build/python/cpython/Lib/test/test_concurrent_futures.py", line 901 in _fail_on_deadlock
  File "/home/travis/build/python/cpython/Lib/test/test_concurrent_futures.py", line 962 in test_crash
  File "/home/travis/build/python/cpython/Lib/unittest/case.py", line 642 in run
  File "/home/travis/build/python/cpython/Lib/unittest/case.py", line 702 in __call__
  File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/travis/build/python/cpython/Lib/unittest/runner.py", line 176 in run
  File "/home/travis/build/python/cpython/Lib/test/support/__init__.py", line 1935 in _run_suite
  File "/home/travis/build/python/cpython/Lib/test/support/__init__.py", line 2031 in run_unittest
  File "/home/travis/build/python/cpython/Lib/test/test_concurrent_futures.py", line 1241 in test_main
  File "/home/travis/build/python/cpython/Lib/test/support/__init__.py", line 2163 in decorator
  File "/home/travis/build/python/cpython/Lib/test/libregrtest/runtest.py", line 182 in runtest_inner
  File "/home/travis/build/python/cpython/Lib/test/libregrtest/runtest.py", line 127 in runtest
  File "/home/travis/build/python/cpython/Lib/test/libregrtest/runtest_mp.py", line 68 in run_tests_worker
  File "/home/travis/build/python/cpython/Lib/test/libregrtest/main.py", line 600 in _main
  File "/home/travis/build/python/cpython/Lib/test/libregrtest/main.py", line 586 in main
  File "/home/travis/build/python/cpython/Lib/test/libregrtest/main.py", line 640 in main
  File "/home/travis/build/python/cpython/Lib/test/regrtest.py", line 46 in _main
  File "/home/travis/build/python/cpython/Lib/test/regrtest.py", line 50 in <module>
  File "/home/travis/build/python/cpython/Lib/runpy.py", line 85 in _run_code
  File "/home/travis/build/python/cpython/Lib/runpy.py", line 192 in _run_module_as_main


Sample crash : https://travis-ci.org/python/cpython/jobs/483394585#L2781
msg334256 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-01-23 13:59
> Sample crash : https://travis-ci.org/python/cpython/jobs/483394585#L2781

Some info from pythoninfo, not sure if they are relevant:

CC.version: clang version 5.0.0 (tags/RELEASE_500/final)
platform.libc_ver: glibc 2.19
platform.platform: Linux-4.4.0-104-generic-x86_64-with-glibc2.17
sys.thread_info: sys.thread_info(name='pthread', lock='semaphore', version='NPTL 2.19')
sys.version: 3.8.0a0 (heads/master-2-g5b3e8e9:5b3e8e9, Jan 23 2019, 13:18:30)  [Clang 5.0.0 (tags/RELEASE_500/final)]
History
Date User Action Args
2019-01-23 13:59:22vstinnersetmessages: + msg334256
2019-01-23 13:48:21xtreakcreate