`test_capi`: `test_threadstate_set_stack_protection` is flaky on Azure CI
Open
Nobody has claimed this yet.
tests
topic-C-API
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
test.test_capi.test_misc.Test_testinternalcapi.test_threadstate_set_stack_protection fails on Azure Pipeline.
For example in this run https://dev.azure.com/Python/cpython/_build/results?buildId=173303:
test_threadstate_set_stack_protection (test.test_capi.test_misc.Test_testinternalcapi.test_threadstate_set_stack_protection) ... Assertion failed: ts->c_stack_soft_limit < ts->c_stack_top, file D:\a\1\s\Modules\_testinternalcapi.c, line 3045
Fatal Python error: Aborted
Current thread 0x000011f0 (most recent call first):
File "D:\a\1\s\Lib\unittest\case.py", line 637 in _callTestMethod
File "D:\a\1\s\Lib\unittest\suite.py", line 122 in run
File "D:\a\1\s\Lib\unittest\suite.py", line 84 in __call__
File "D:\a\1\s\Lib\unittest\runner.py", line 256 in run
File "D:\a\1\s\Lib\test\libregrtest\single.py", line 84 in _run_suite
File "D:\a\1\s\Lib\test\libregrtest\single.py", line 42 in run_unittest
File "D:\a\1\s\Lib\test\libregrtest\single.py", line 162 in test_func
File "D:\a\1\s\Lib\test\libregrtest\single.py", line 118 in regrtest_runner
File "D:\a\1\s\Lib\test\libregrtest\single.py", line 165 in _load_run_test
File "D:\a\1\s\Lib\test\libregrtest\single.py", line 210 in _runtest_env_changed_exc
File "D:\a\1\s\Lib\test\libregrtest\single.py", line 319 in _runtest
File "D:\a\1\s\Lib\test\libregrtest\single.py", line 348 in run_single_test
File "D:\a\1\s\Lib\test\libregrtest\worker.py", line 99 in worker_process
File "D:\a\1\s\Lib\test\libregrtest\worker.py", line 137 in main
File "D:\a\1\s\Lib\test\libregrtest\worker.py", line 141 in <module>
File "<frozen runpy>", line 87 in _run_code
File "<frozen runpy>", line 201 in _run_module_as_main
Current thread's C stack trace (most recent call first):
<cannot get C stack on this system>
Extension modules: _testcapi, _testlimitedcapi, _testinternalcapi, _testmultiphase, _testsinglephase, _testbuffer (total: 6)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
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
Start with test.test_capi.test_misc.Test_testinternalcapi.test_threadstate_set_stack_protection and inspect Modules/_testinternalcapi.c around line 3045, where the Azure Windows assertion fails. Reproduce the named test in the Azure environment and trace the stack-limit values involved. Done means the test passes reliably on Azure without the assertion failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, c, python
- Domain
- ci-cd, operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100