[CI] MakeMaker dependency inspection exceeds Unix timeout

未关闭 适合新手
#2,230 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, java, perl
领域
testing

调研方向

从 src/main/perl/lib/CPAN/FindDependencies/MakeMaker.pm 开始,检查 $process_timeout 是如何选择并传递给 PerlOnJava::Process::run_process 的。阅读 unit/zz_perlonjava_process.t,尤其是测试 11,并在 Ubuntu 和 Windows 上运行 MakeMaker 提取测试。完成标准是:有上限的超时允许在负载较高的 Linux CI 上正常启动,同时真正挂起的子进程仍会超时。

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

描述

area:cpan-port area:performance bug

Summary

The Ubuntu CI run for PR #2229 failed unit/zz_perlonjava_process.t test 11, MakeMaker dependency extraction uses the shared process service. The test's CPAN::FindDependencies::MakeMaker::getreqs_from_mm child exceeded its deadline while running a generated Makefile.PL.

Root cause

src/main/perl/lib/CPAN/FindDependencies/MakeMaker.pm sets $process_timeout to 10 seconds on non-Windows platforms and 60 seconds on Windows. It invokes [ $^X, 'Makefile.PL' ] through PerlOnJava::Process::run_process. Under PerlOnJava, $^X starts another JVM; cold startup and ExtUtils::MakeMaker initialization can exceed the 10-second Unix deadline on a loaded CI runner. The test then receives the string Makefile.PL didn't finish in a reasonable time instead of the expected prerequisite hash.

Evidence

  • Ubuntu CI for PR #2229, run 46352999616, job 141630544101: unit/zz_perlonjava_process.t failed after 31.446 seconds; TAP tests 1–10 passed and test 11 failed. The failure output identifies Makefile.PL didn't finish in a reasonable time.
  • The CI job took 40m17s overall, while nice -n 19 make passed locally on the same PR commit.
  • The current master implementation still has the 10-second non-Windows timeout.
  • Commit 4990f9b74 on perf/issue-1846-method-parity changed this timeout to 120 seconds after a CI report that the child JVM exceeded the former 10-second deadline. That change is not present on master.

Follow-up

Choose and document a bounded startup allowance that works on loaded Linux CI runners, retain timeout coverage for genuinely hung children, and validate the MakeMaker extraction test on Ubuntu and Windows. Do not skip the test or remove its timeout.

主要语言
Perl
星标
67
派生
9
平均合并
6 小时 45 分钟
30 天内合并 PR
104

环境准备

从这里开始

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

fglock/PerlOnJava 的其他 Issue

查看 fglock/PerlOnJava 的全部 Issue

相似的 Issue

更多 Perl Issue

把新 issue 发到你的邮箱

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