Skip to content

gh-151593: Use timeout on GitHub Action TSan job#151594

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:tsan_timeout
Jun 17, 2026
Merged

gh-151593: Use timeout on GitHub Action TSan job#151594
vstinner merged 1 commit into
python:mainfrom
vstinner:tsan_timeout

Conversation

@vstinner

@vstinner vstinner commented Jun 17, 2026

Copy link
Copy Markdown
Member

Use a timeout of 15 minutes for --tsan command and a timeout of 10 minutes for --tsan-parallel command. Display also the slowest tests to help adjusting these timeouts later if needed.

Use a timeout of 15 minutes for --tsan command and a timeout of 10
minutes for --tsan-parallel command. Display also the slowest tests
to help adjusting these timeouts later if needed.
@vstinner

Copy link
Copy Markdown
Member Author

Example of successful run: https://github.com/python/cpython/actions/runs/27677669151/job/81856939320

  • --tsan: the slowest test test_concurrent_futures.test_process_pool took 8 min 40 sec
  • --tsan-parallel: both tests took less than 30 seconds to complete

@hugovk

hugovk commented Jun 17, 2026

Copy link
Copy Markdown
Member

Currently, from https://github.com/python/cpython/actions/runs/27680332506/job/81865959224?pr=151594#step:9:111:

10 slowest tests:
- test_concurrent_futures.test_process_pool: 8 min 20 sec
- test_concurrent_futures.test_deadlock: 6 min 17 sec
- test_capi: 5 min 40 sec
- test_concurrent_futures.test_shutdown: 4 min 2 sec
- test_free_threading: 3 min 13 sec
- test_embed: 3 min 1 sec
- test_socket: 2 min 55 sec
- test_asyncio.test_tasks: 2 min 35 sec
- test_asyncio.test_events: 2 min 8 sec
- test_threading: 2 min 8 sec

Oh, and parallel hit the 10 minute timeout:

test_abstractmethod_integration (test.test_abc.test_factory.<locals>.TestABC.test_abstractmethod_integration) [threads=4] ... Timeout (0:10:00)!
Thread 0x00007fb4767ff6c0 [test_abstractme] (most recent call first):
  File "/home/runner/work/cpython/cpython/Lib/abc.py", line 102 in __init__
  File "/home/runner/work/cpython/cpython/Lib/test/test_abc.py", line 207 in C
  File "/home/runner/work/cpython/cpython/Lib/test/test_abc.py", line 206 in test_abstractmethod_integration
  File "/home/runner/work/cpython/cpython/Lib/contextlib.py", line 116 in inner
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 637 in _callTestMethod
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 691 in run
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/parallel_case.py", line 23 in run_worker
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1160 in run
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1218 in _bootstrap_inner
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1180 in _bootstrap
Thread 0x00007fb4789ff6c0 [test_abstractme] (most recent call first):
  File "/home/runner/work/cpython/cpython/Lib/abc.py", line 102 in __init__
  File "/home/runner/work/cpython/cpython/Lib/test/test_abc.py", line 207 in C
  File "/home/runner/work/cpython/cpython/Lib/test/test_abc.py", line 206 in test_abstractmethod_integration
  File "/home/runner/work/cpython/cpython/Lib/contextlib.py", line 116 in inner
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 637 in _callTestMethod
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 691 in run
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/parallel_case.py", line 23 in run_worker
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1160 in run
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1218 in _bootstrap_inner
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1180 in _bootstrap
Thread 0x00007fb47adff6c0 [test_abstractme] (most recent call first):
  File "/home/runner/work/cpython/cpython/Lib/abc.py", line 128 in __new__
  File "/home/runner/work/cpython/cpython/Lib/test/test_abc.py", line 223 in test_abstractmethod_integration
  File "/home/runner/work/cpython/cpython/Lib/contextlib.py", line 116 in inner
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 637 in _callTestMethod
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 691 in run
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/parallel_case.py", line 23 in run_worker
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1160 in run
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1218 in _bootstrap_inner
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1180 in _bootstrap
Thread 0x00007fb479dfe6c0 [test_abstractme] (most recent call first):
  File "/home/runner/work/cpython/cpython/Lib/traceback.py", line 316 in clear_frames
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 272 in __exit__
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 244 in handle
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 835 in assertRaises
  File "/home/runner/work/cpython/cpython/Lib/test/test_abc.py", line 227 in test_abstractmethod_integration
  File "/home/runner/work/cpython/cpython/Lib/contextlib.py", line 116 in inner
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 637 in _callTestMethod
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 691 in run
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/parallel_case.py", line 23 in run_worker
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1160 in run
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1218 in _bootstrap_inner
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1180 in _bootstrap
Thread 0x00007fb4d3b58f40 [python] (most recent call first):
  File "/home/runner/work/cpython/cpython/Lib/threading.py", line 1269 in join
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/parallel_case.py", line 54 in run
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 747 in __call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/runner.py", line 256 in run
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/single.py", line 84 in _run_suite
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/single.py", line 42 in run_unittest
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/single.py", line 162 in test_func
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/single.py", line 118 in regrtest_runner
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/single.py", line 165 in _load_run_test
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/single.py", line 210 in _runtest_env_changed_exc
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/single.py", line 319 in _runtest
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/single.py", line 348 in run_single_test
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/worker.py", line 99 in worker_process
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/worker.py", line 137 in main
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/worker.py", line 141 in <module>
  File "/home/runner/work/cpython/cpython/Lib/runpy.py", line 87 in _run_code
  File "/home/runner/work/cpython/cpython/Lib/runpy.py", line 201 in _run_module_as_main
== Tests result: FAILURE ==
10 slowest tests:
- test_hashlib: 12.4 sec
1 test failed:
    test_abc

@vstinner vstinner merged commit 460dec2 into python:main Jun 17, 2026
99 of 101 checks passed
@vstinner vstinner deleted the tsan_timeout branch June 17, 2026 11:02
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jun 17, 2026

Copy link
Copy Markdown

GH-151597 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 17, 2026
@bedevere-app

bedevere-app Bot commented Jun 17, 2026

Copy link
Copy Markdown

GH-151598 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jun 17, 2026
vstinner added a commit that referenced this pull request Jun 17, 2026
…151598)

gh-151593: Use timeout on GitHub Action TSan jobs (GH-151594)

Use a timeout of 15 minutes for --tsan command and a timeout of 10
minutes for --tsan-parallel command. Display also the slowest tests
to help adjusting these timeouts later if needed.
(cherry picked from commit 460dec2)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull request Jun 17, 2026
…151597)

gh-151593: Use timeout on GitHub Action TSan jobs (GH-151594)

Use a timeout of 15 minutes for --tsan command and a timeout of 10
minutes for --tsan-parallel command. Display also the slowest tests
to help adjusting these timeouts later if needed.
(cherry picked from commit 460dec2)

Co-authored-by: Victor Stinner <vstinner@python.org>
philthompson10 pushed a commit to philthompson10/cpython that referenced this pull request Jun 17, 2026
Use a timeout of 15 minutes for --tsan command and a timeout of 10
minutes for --tsan-parallel command. Display also the slowest tests
to help adjusting these timeouts later if needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants