tests testoutput.py::OutputJSONsuite can be flaky on high-core-count systems
まだ誰も着手していません。
評価
調査の方向性
testoutput.py::OutputJSONsuite と、test-data/unit/outputjson.test の46行目および62行目にあるケースから始めてください。コア数の多いシステム上で Python 3.13 または 3.14 を使い、並列ワーカーで失敗を再現してから、報告された subprocess と build-worker のエラーを追跡してください。これらのテストが ResourceWarning、CompileError、またはワーカー接続の失敗なしに安定してパスすれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Now that Debian is testing mypy with native parsing (via ast-serialize) we resumed running the entire test suite.
With mypy 2.2.0 we see random failures of testoutput.py::OutputJSONsuite::outputjson.test::* on high-core count systems.
Mostly due to ResourceWarning: subprocess 21441 is still running being turned into pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function Popen.__del__ at 0x7f30bbe13ed0>: None
But also other errors: mypy.errors.CompileError: {"file": "tmp/main", "line": 2, "column": 0, "end_line": 2, "end_column": 5, "message": "\"break\" outside loop", "hint": null, "code": null, "severity": "error"} and OSError: Cannot connect to build worker(s): 0
Details
Here we had test failures under Python 3.13 and 3.14 https://ci.debian.net/packages/m/mypy/testing/ppc64el/74734444/
2227s =================================== FAILURES ===================================
2227s ____________________________ testOutputJsonParallel ____________________________
2227s [gw10] linux -- Python 3.13.15 /usr/bin/python3.13
2227s data: /tmp/autopkgtest.EyGnnA/build.z2o/src/test-data/unit/outputjson.test:46:
2227s /usr/lib/python3.13/subprocess.py:1140: in __del__
2227s _warn("subprocess %s is still running" % self.pid,
2227s E ResourceWarning: subprocess 6479 is still running
2227s
2227s The above exception was the direct cause of the following exception:
2227s /usr/lib/python3/dist-packages/pluggy/_hooks.py:512: in __call__
2227s return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
2227s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2227s /usr/lib/python3/dist-packages/pluggy/_manager.py:120: in _hookexec
2227s return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
2227s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2227s /usr/lib/python3/dist-packages/_pytest/logging.py:865: in pytest_runtest_call
2227s yield
2227s /usr/lib/python3/dist-packages/_pytest/capture.py:900: in pytest_runtest_call
2227s return (yield)
2227s ^^^^^
2227s /usr/lib/python3/dist-packages/_pytest/skipping.py:268: in pytest_runtest_call
2227s return (yield)
2227s ^^^^^
2227s /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:183: in pytest_runtest_call
2227s collect_unraisable(item.config)
2227s /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:79: in collect_unraisable
2227s raise errors[0]
2227s /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:67: in collect_unraisable
2227s warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
2227s E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function Popen.__del__ at 0x3fff82b01300>
2227s E Enable tracemalloc to get traceback where the object was allocated.
2227s E See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
2227s ______________________ testOutputJsonSyntaxErrorParallel _______________________
2227s [gw10] linux -- Python 3.13.15 /usr/bin/python3.13
2227s data: /tmp/autopkgtest.EyGnnA/build.z2o/src/test-data/unit/outputjson.test:62:
2227s mypy/main.py:244: in run_build
2227s ???
2227s mypy/build.py:422: in build
2227s result = build_inner(
2227s mypy/build.py:537: in build_inner
2227s graph = dispatch(sources, manager, stdout, connect_threads)
2227s mypy/build.py:4146: in dispatch
2227s process_graph(graph, manager)
2227s mypy/build.py:4614: in process_graph
2227s done, still_working, results = manager.wait_for_done(graph)
2227s mypy/build.py:1480: in wait_for_done
2227s return self.wait_for_done_workers(graph)
2227s mypy/build.py:1506: in wait_for_done_workers
2227s raise data.blocker
2227s E mypy.errors.CompileError: {"file": "tmp/main", "line": 2, "column": 0, "end_line": 2, "end_column": 5, "message": "\"break\" outside loop", "hint": null, "code": null, "severity": "error"}
2227s
2227s During handling of the above exception, another exception occurred:
2227s /usr/lib/python3.13/subprocess.py:1140: in __del__
2227s _warn("subprocess %s is still running" % self.pid,
2227s E ResourceWarning: subprocess 6518 is still running
2227s
2227s The above exception was the direct cause of the following exception:
2227s /usr/lib/python3/dist-packages/pluggy/_hooks.py:512: in __call__
2227s return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
2227s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2227s /usr/lib/python3/dist-packages/pluggy/_manager.py:120: in _hookexec
2227s return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
2227s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2227s /usr/lib/python3/dist-packages/_pytest/logging.py:865: in pytest_runtest_call
2227s yield
2227s /usr/lib/python3/dist-packages/_pytest/capture.py:900: in pytest_runtest_call
2227s return (yield)
2227s ^^^^^
2227s /usr/lib/python3/dist-packages/_pytest/skipping.py:268: in pytest_runtest_call
2227s return (yield)
2227s ^^^^^
2227s /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:183: in pytest_runtest_call
2227s collect_unraisable(item.config)
2227s /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:79: in collect_unraisable
2227s raise errors[0]
2227s /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:67: in collect_unraisable
2227s warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
2227s E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function Popen.__del__ at 0x3fff82b01300>
2227s E Enable tracemalloc to get traceback where the object was allocated.
2227s E See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
More examples:
- ppc64el just with Python 3.13: https://ci.debian.net/packages/m/mypy/testing/ppc64el/74815096/
- amd64 failures with Python 3.13 & 3.14 (48 workers) https://ci.debian.net/packages/m/mypy/testing/amd64/74733699/ ; but passed just fine on a retry: https://ci.debian.net/packages/m/mypy/testing/amd64/74785836/
- arm64 different errors, same test cases: https://ci.debian.net/packages/m/mypy/testing/arm64/74734176 (linked to from the test error summary at the top)
- 主要言語
- Python
- スター
- 20.6k
- フォーク
- 3.3k
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 58
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python/mypy のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug topic-configuration topic-error-reporting
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug topic-attrs
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
似ている issue
-
essnmx good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
[Feature] 奇物选择添加优先级 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
syfoud/Simulated_Scepter#174 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Giskard-AI/giskard-oss#2840 · コメント 1 件 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success オープンarea: repo bug perceived difficulty: 2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yeti-platform/yeti#1380 ·