test_multiprocessing_forkserver.py, test_multiprocessing_fork.py and test_multiprocessing_spawn.py gives tracebacks

未關閉
#96,026 9 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
python

研究方向

在回報的 Python 3.11 Linux 環境中,使用 test_multiprocessing_forkserver.py、test_multiprocessing_fork.py 和 test_multiprocessing_spawn.py 重現失敗。閱讀第 209 行附近的 multiprocessing/resource_tracker.py,並比較 pull request 95396 中提到的 KeyError 情況。確定這些 traceback 是否為預期結果;如果不是,則讓受影響的測試在沒有這些 traceback 的情況下完成,即視為完成。

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

描述

tests topic-multiprocessing type-bug

Bug report

During build RPM for python3.11rc1 I've found tracebacks for tests from test suite test_multiprocessing_forkserver.py, test_multiprocessing_fork.py, and test_multiprocessing_spawn.py :

[root@xxx test]# python3.11 test_multiprocessing_forkserver.py
............s..................................................s...............................s.s.s.....s...s...........ss.....s......................................................................................................................................Traceback (most recent call last):
  File "/opt/rh/rh-python311/root/usr/lib64/python3.11/multiprocessing/resource_tracker.py", line 209, in main
.    cache[rtype].remove(name)
KeyError: '/psm_8714e59f'
..............................ssss...............................s.........ss.ss..sss.sss.s.ssss......ss....s.
----------------------------------------------------------------------
Ran 374 tests in 75.001s

OK (skipped=33)
[root@xxx test]# python3.11 test_multiprocessing_spawn.py
............s..............s...................................s...............................s.s.s.....s...s...........ss.....s...............................................................................................ss.....................................Traceback (most recent call last):
  File "/opt/rh/rh-python311/root/usr/lib64/python3.11/multiprocessing/resource_tracker.py", line 209, in main
.    cache[rtype].remove(name)
KeyError: '/psm_e93c9b17'
..............................ssss...............................s.........ss.ss..sss.sss.s.ssss......ss....s.
----------------------------------------------------------------------
Ran 374 tests in 118.379s

OK (skipped=36)

[root@xxx test]# python3.11 test_multiprocessing_fork.py
............s..............s...................................s...............................s.s.s.....s...s...........ss.....s........................................................................................s......ss.....................................Traceback (most recent call last):
  File "/opt/rh/rh-python311/root/usr/lib64/python3.11/multiprocessing/resource_tracker.py", line 209, in main
.    cache[rtype].remove(name)
KeyError: '/psm_1324c68a'
..............................ssss...............................s.........ss.ss..sss.sss.s.ssss......ss....s.
----------------------------------------------------------------------
Ran 374 tests in 67.935s

OK (skipped=37)

I suppose, that tracebacks are not ok during test. Or close the bug, if it normal.
Some KeyError are present in https://github.com/python/cpython/pull/95396.

Your environment

Python 3.11.0rc1 (main, Aug 13 2022, 18:23:13) [GCC 9.3.1 20200408 (Red Hat 9.3.1-2)] on linux
Centos7 x86_64, python 3.11rc1

主要語言
Python
星號
77.2k
分支
36k
平均合併
1 天 9 小時
30 天內合併 PR
558

貢獻指南

開啟貢獻指南

從這裡開始

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

python/cpython 的其他 Issue

查看 python/cpython 的全部 Issue

相似的 Issue

更多 Python Issue

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

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