python / python/cpython

test_sampling_profiler: test_run_failed_script_live() failed on s390x LTO+PGO build: "Failed to find the PyRuntime section"

未关闭
#155,488 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

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

描述

s390x Fedora Stable LTO + PGO 3.x: https://buildbot.python.org/#/builders/1627/builds/3165

Previous builds are fine, the error may depend on how PGO decides to optimize the code. I bet that the test will pass on the next build.

Logs:

ERROR: test_run_failed_script_live (test.test_profiling.test_sampling_profiler.test_live_collector_ui.TestLiveModeErrors.test_run_failed_script_live)
Test that running a failing script exits with clean error.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.lto-pgo/build/Lib/profiling/sampling/sample.py", line 87, in __init__
    self.unwinder = self._new_unwinder(native, gc, opcodes, skip_non_matching_threads)
                    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.lto-pgo/build/Lib/profiling/sampling/sample.py", line 102, in _new_unwinder
    return _remote_debugging.RemoteUnwinder(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.pid,
        ^^^^^^^^^
    ...<7 lines>...
        **kwargs
        ^^^^^^^^
    )
    ^
RuntimeError: Failed to find the PyRuntime section in process 149156 on Linux platform

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.lto-pgo/build/Lib/test/test_profiling/test_sampling_profiler/test_live_collector_ui.py", line 900, in test_run_failed_script_live
    main()
    ~~~~^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.lto-pgo/build/Lib/profiling/sampling/cli.py", line 989, in main
    _main()
    ~~~~~^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.lto-pgo/build/Lib/profiling/sampling/cli.py", line 1145, in _main
    handler(args)
    ~~~~~~~^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.lto-pgo/build/Lib/profiling/sampling/cli.py", line 1251, in _handle_run
    _handle_live_run(args)
    ~~~~~~~~~~~~~~~~^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.lto-pgo/build/Lib/profiling/sampling/cli.py", line 1386, in _handle_live_run
    sample_live(
    ~~~~~~~~~~~^
        process.pid,
        ^^^^^^^^^^^^
    ...<9 lines>...
        blocking=args.blocking,
        ^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.lto-pgo/build/Lib/profiling/sampling/sample.py", line 610, in sample_live
    profiler = SampleProfiler(
        pid,
    ...<8 lines>...
        blocking=blocking,
    )
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.lto-pgo/build/Lib/profiling/sampling/sample.py", line 89, in __init__
    raise SystemExit(err) from err
SystemExit: Failed to find the PyRuntime section in process 149156 on Linux platform

cc @stratakis

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先在 s390x Fedora Stable LTO+PGO 构建上运行 test/test_profiling/test_sampling_profiler/test_live_collector_ui.py 中的 test_run_failed_script_live()。以链接的构建日志为上下文,跟踪 Lib/profiling/sampling/sample.py 中的 SampleProfiler 初始化和 _new_unwinder()。当测试能够可靠地处理该进程,并且不再因“Failed to find the PyRuntime section”而失败时,即表示完成。

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

评估

技术栈
fedora, linux, python
领域
build-system, performance, testing-qa
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

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