python / python/cpython

`test_capi`: `test_threadstate_set_stack_protection` is flaky on Azure CI

未关闭
#154,763 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

tests topic-C-API type-bug
主要语言
Python
星标
77.2k
派生
35.9k
PR 合并指标
PR 指标待抓取

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 test.test_capi.test_misc.Test_testinternalcapi.test_threadstate_set_stack_protection 开始,检查 Modules/_testinternalcapi.c 第 3045 行附近的位置,Azure Windows assertion 在此处失败。在 Azure 环境中复现指定的测试,并跟踪涉及的 stack-limit 值。测试能够在 Azure 上可靠通过且不再出现 assertion failure,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
azure, c, python
领域
ci-cd, operating-systems, testing-qa
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。