This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Mark.Shannon, davin, pitrou, serhiy.storchaka
Date 2018-05-23.07:17:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za>
In-reply-to
Content
I got the following output when run tests in the huntrleaks mode.

$ ./python -We -m test -R 3:3 -x test_builtin -x test_urlparse
...
1:24:54 load avg: 2.48 [225/414] test_multiprocessing_fork
beginning 6 repetitions
123456
..python: Python/pystate.c:589: PyThreadState_Clear: Assertion `tstate->exc_info->previous_item == NULL' failed.
Fatal Python error: Aborted

Current thread 0x00007fdd3e07e700 (most recent call first):
  File "/home/serhiy/py/cpython/Lib/multiprocessing/popen_fork.py", line 70 in _launch
  File "/home/serhiy/py/cpython/Lib/multiprocessing/popen_fork.py", line 20 in __init__
  File "/home/serhiy/py/cpython/Lib/multiprocessing/context.py", line 277 in _Popen
  File "/home/serhiy/py/cpython/Lib/multiprocessing/process.py", line 112 in start
  File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 241 in _repopulate_pool
  File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 248 in _maintain_pool
  File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 412 in _handle_workers
  File "/home/serhiy/py/cpython/Lib/threading.py", line 865 in run
  File "/home/serhiy/py/cpython/Lib/threading.py", line 917 in _bootstrap_inner
  File "/home/serhiy/py/cpython/Lib/threading.py", line 885 in _bootstrap
..python: Python/pystate.c:589: PyThreadState_Clear: Assertion `tstate->exc_info->previous_item == NULL' failed.
Fatal Python error: Aborted

Current thread 0x00007fdd6cb6c700 (most recent call first):
  File "/home/serhiy/py/cpython/Lib/multiprocessing/popen_fork.py", line 70 in _launch
  File "/home/serhiy/py/cpython/Lib/multiprocessing/popen_fork.py", line 20 in __init__
  File "/home/serhiy/py/cpython/Lib/multiprocessing/context.py", line 277 in _Popen
  File "/home/serhiy/py/cpython/Lib/multiprocessing/process.py", line 112 in start
  File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 241 in _repopulate_pool
  File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 248 in _maintain_pool
  File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 412 in _handle_workers
  File "/home/serhiy/py/cpython/Lib/threading.py", line 865 in run
  File "/home/serhiy/py/cpython/Lib/threading.py", line 917 in _bootstrap_inner
  File "/home/serhiy/py/cpython/Lib/threading.py", line 885 in _bootstrap
..
1:34:07 load avg: 1.01 [226/414] test_multiprocessing_forkserver -- test_multiprocessing_fork passed in 9 min 13 sec
...

It happens after 1.5 hours of running tests. Running the test_multiprocessing_fork test only doesn't expose it. Likely there are already opened related issues, but the assertion failure in PyThreadState_Clear is new, it was added in 3.7. It may help to identify the problem.
History
Date User Action Args
2018-05-23 07:17:40serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, Mark.Shannon, davin
2018-05-23 07:17:40serhiy.storchakasetmessageid: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za>
2018-05-23 07:17:40serhiy.storchakalinkissue33612 messages
2018-05-23 07:17:40serhiy.storchakacreate