python-trio / python-trio/trio
non-deterministic deadlock in test_subprocess::test_warn_on_failed_cancel_terminate
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
See https://github.com/python-trio/trio/runs/756580934?check_suite_focus=true. I was able to retrieve the test name thanks to the traceback. The test timed out on an acquire() call.
2020-06-10T05:22:22.9465010Z Timeout (0:01:00)!
2020-06-10T05:22:22.9465567Z Thread 0x00007feaed267700 (most recent call first):
2020-06-10T05:22:22.9466805Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/jedi/inference/compiled/subprocess/__init__.py", line 37 in _enqueue_output
2020-06-10T05:22:22.9467371Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/threading.py", line 864 in run
2020-06-10T05:22:22.9467782Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/threading.py", line 916 in _bootstrap_inner
2020-06-10T05:22:22.9468195Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/threading.py", line 884 in _bootstrap
2020-06-10T05:22:22.9468437Z
2020-06-10T05:22:22.9468695Z Thread 0x00007feaef1be700 (most recent call first):
2020-06-10T05:22:22.9469487Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/trio/_core/tests/test_thread_cache.py", line 102 in acquire
2020-06-10T05:22:22.9470319Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/trio/_core/_thread_cache.py", line 62 in _work
2020-06-10T05:22:22.9470793Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/threading.py", line 864 in run
2020-06-10T05:22:22.9471195Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/threading.py", line 916 in _bootstrap_inner
2020-06-10T05:22:22.9471607Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/threading.py", line 884 in _bootstrap
2020-06-10T05:22:22.9471852Z
2020-06-10T05:22:22.9472088Z Thread 0x00007feb08802680 (most recent call first):
2020-06-10T05:22:22.9472826Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/trio/_core/_io_epoll.py", line 223 in get_events
2020-06-10T05:22:22.9473561Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/trio/_core/_run.py", line 1890 in run
2020-06-10T05:22:22.9474782Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/trio/testing/_trio_test.py", line 27 in wrapper
2020-06-10T05:22:22.9475534Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/python.py", line 182 in pytest_pyfunc_call
2020-06-10T05:22:22.9476332Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
2020-06-10T05:22:22.9477195Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/manager.py", line 87 in <lambda>
2020-06-10T05:22:22.9478034Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/manager.py", line 93 in _hookexec
2020-06-10T05:22:22.9478759Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
2020-06-10T05:22:22.9479528Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/python.py", line 1477 in runtest
2020-06-10T05:22:22.9480285Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/runner.py", line 135 in pytest_runtest_call
2020-06-10T05:22:22.9481053Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
2020-06-10T05:22:22.9481766Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/manager.py", line 87 in <lambda>
2020-06-10T05:22:22.9482536Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/manager.py", line 93 in _hookexec
2020-06-10T05:22:22.9483258Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
2020-06-10T05:22:22.9484024Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/runner.py", line 217 in <lambda>
2020-06-10T05:22:22.9484897Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/runner.py", line 244 in from_call
2020-06-10T05:22:22.9485766Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/runner.py", line 217 in call_runtest_hook
2020-06-10T05:22:22.9486511Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/runner.py", line 186 in call_and_report
2020-06-10T05:22:22.9487294Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/runner.py", line 100 in runtestprotocol
2020-06-10T05:22:22.9488044Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/runner.py", line 85 in pytest_runtest_protocol
2020-06-10T05:22:22.9488841Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
2020-06-10T05:22:22.9489558Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/manager.py", line 87 in <lambda>
2020-06-10T05:22:22.9490321Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/manager.py", line 93 in _hookexec
2020-06-10T05:22:22.9491048Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
2020-06-10T05:22:22.9491830Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/main.py", line 272 in pytest_runtestloop
2020-06-10T05:22:22.9492548Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
2020-06-10T05:22:22.9493315Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/manager.py", line 87 in <lambda>
2020-06-10T05:22:22.9494033Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/manager.py", line 93 in _hookexec
2020-06-10T05:22:22.9494796Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
2020-06-10T05:22:22.9495505Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/main.py", line 247 in _main
2020-06-10T05:22:22.9496435Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/main.py", line 191 in wrap_session
2020-06-10T05:22:22.9497225Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/main.py", line 240 in pytest_cmdline_main
2020-06-10T05:22:22.9497954Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
2020-06-10T05:22:22.9498777Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/manager.py", line 87 in <lambda>
2020-06-10T05:22:22.9499607Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/manager.py", line 93 in _hookexec
2020-06-10T05:22:22.9500722Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
2020-06-10T05:22:22.9501514Z File "/opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages/_pytest/config/__init__.py", line 125 in main
2020-06-10T05:22:22.9501986Z File "/opt/hostedtoolcache/Python/3.6.10/x64/bin/pytest", line 8 in <module>
2020-06-10T05:30:20.1060105Z ##[error]The operation was canceled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report points to test_subprocess::test_warn_on_failed_cancel_terminate and shows waits in trio/_core/tests/test_thread_cache.py:102 and trio/_core/_thread_cache.py:62. Start by running that test and tracing the acquire() timeout alongside the linked CI log. Done means the test no longer deadlocks or times out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100