python / python/cpython

test_asyncio.test_subprocess fails with "env changed" on "AMD64 Debian root 3.x" buildbot: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>

未關閉
#150,714 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

tests
主要語言
Python
星號
77.2k
分支
35.9k
PR 合併指標
PR 指標待擷取

描述

Time to time, test_asyncio.test_subprocess fails with "env changed" on "AMD64 Debian root 3.x" buildbot.

Example: https://buildbot.python.org/#/builders/2019/builds/114

0:15:58 load avg: 1.70 [450/505/1] test.test_asyncio.test_subprocess failed (env changed)
test_cancel_make_subprocess_transport_exec (test.test_asyncio.test_subprocess.SubprocessPidfdWatcherTests.test_cancel_make_subprocess_transport_exec) ... ok
(...)
test_subprocess_repr (test.test_asyncio.test_subprocess.SubprocessTransportTests.test_subprocess_repr) ... ok

----------------------------------------------------------------------
Ran 81 tests in 10.074s

OK
Warning -- Unraisable exception
Exception ignored while finalizing file <_io.FileIO name=11 mode='wb' closefd=True>:
Traceback (most recent call last):
  File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 948, in gc_collect
    gc.collect()
    ~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 test/test_asyncio/test_subprocess.py 以及 AMD64 Debian buildbot log 中顯示的 test_asyncio.test_subprocess 失敗開始。執行相關測試,並檢查在失敗測試附近 subprocess 資源是如何被最終處理的。當間歇性的 "env changed" 失敗和 unclosed FileIO ResourceWarning 不再出現時,即視為完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
testing-qa
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。