test_io failed with ASAN failures (heap-use-after-free) on AMD64 Arch Linux Asan 3.13
未關閉
還沒有人認領這個 Issue。
tests
topic-IO
type-bug
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 35.9k
- PR 合併指標
- PR 指標待擷取
描述
AMD64 Arch Linux Asan 3.13: https://buildbot.python.org/#/builders/1464/builds/1125
== CPython 3.13.14+ (heads/3.13:303d0acfcdcc, Jul 19 2026, 12:37:17) [GCC 16.1.1 20260625]
== Linux-7.0.14-arch1-1-x86_64-with-glibc2.43 little-endian
== Python build: release ASAN
== cwd: /buildbot/buildarea/3.13.pablogsal-arch-x86_64.asan/build/build/test_python_worker_1123020æ
== CPU count: 2
== encodings: locale=UTF-8 FS=utf-8
== resources: all,-network,-urlfetch
== sanitizers: address
== ASAN_OPTIONS='detect_leaks=0:allocator_may_return_null=1:handle_segv=0'
(...)
FAIL: test_daemon_threads_shutdown_stderr_deadlock (test.test_io.CMiscIOTest.test_daemon_threads_shutdown_stderr_deadlock)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/buildarea/3.13.pablogsal-arch-x86_64.asan/build/Lib/test/test_io.py", line 4755, in test_daemon_threads_shutdown_stderr_deadlock
self.check_daemon_threads_shutdown_deadlock('stderr')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/buildbot/buildarea/3.13.pablogsal-arch-x86_64.asan/build/Lib/test/test_io.py", line 4745, in check_daemon_threads_shutdown_deadlock
self.assertFalse(err.strip('.!'))
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
AssertionError: '=================================================================\n
==1136209==ERROR: AddressSanitizer: heap-use-after-free on address 0x7c9453c52a58 at pc 0x555f594278c6 bp 0x7b64519fe080 sp 0x7b64519fe070\n
READ of size 8 at 0x7c9453c52a58 thread T1\n
' is not false
It seems like the test fails randomly since July 14.
Linked PRs
- gh-157013
- gh-157019
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Lib/test/test_io.py 開始,特別檢查 check_daemon_threads_shutdown_deadlock 和 test_daemon_threads_shutdown_stderr_deadlock,接著檢查連結的 buildbot 執行結果和 ASAN trace。在進一步調查之前,先查看 gh-157013 和 gh-157019;當間歇性的 ASAN heap-use-after-free 不再導致測試失敗時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- testing-qa
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100