python / python/cpython

test_deadlock sometimes causes deadlock

Open
#121,719 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

tests type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

Bug description:

Found at EuroPython 24 sprints.

./python -m test -j4

sometimes ends up hanging on

0:24:44 load avg: 0.80 running (1): test.test_concurrent_futures.test_deadlock (24 min 3 sec)
0:25:14 load avg: 0.56 running (1): test.test_concurrent_futures.test_deadlock (24 min 33 sec)
0:25:44 load avg: 0.47 running (1): test.test_concurrent_futures.test_deadlock (25 min 3 sec)
0:26:14 load avg: 0.35 running (1): test.test_concurrent_futures.test_deadlock (25 min 33 sec)
0:26:44 load avg: 0.45 running (1): test.test_concurrent_futures.test_deadlock (26 min 3 sec)
0:27:14 load avg: 0.54 running (1): test.test_concurrent_futures.test_deadlock (26 min 33 sec)

Also occurs on @stinovlas machine (Debian or Ubuntu). More details when I'll be reproduce deadlock again.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running ./python -m test -j4 and isolate test.test_concurrent_futures.test_deadlock on CPython main under Linux. Read the test and its surrounding concurrent.futures code, then reproduce the intermittent hang reliably. Done means the test suite no longer remains stuck there and the regression is covered by the relevant test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.