stack_limit_014.phpt segfaults on LINUX_X32_RELEASE nightly jobs since 2026-10-22

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
c, github-actions, php
领域
backend, testing

调研方向

Start with Zend/tests/stack_limit/stack_limit_014.phpt and compare its expected errors with the X32 release job logs linked in the issue. Investigate the difference between the failing X32 release jobs and the passing debug, PHP-8.2, and PHP-8.3 jobs, including the bailout change identified as a candidate. The issue is resolved when the test produces an expected error instead of Termsig=11 in the affected nightly jobs.

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

描述

Description

Since the 2026-10-22 nightly, Zend/tests/stack_limit/stack_limit_014.phpt fails every night with Termsig=11 instead of one of the two expected errors, in LINUX_X32_RELEASE_NTS and LINUX_X32_RELEASE_ZTS on PHP-8.4, PHP-8.5, PHP-8.6 and master. The X32 debug jobs and PHP-8.2/8.3 pass, and every X32 job passed up to the 2026-10-21 nightly.

     %S%rMaximum call stack size of [0-9]+ bytes \(zend\.max_allowed_stack_size - zend\.reserved_stack_size\) reached|Allowed memory size of [0-9]+ bytes exhausted%r%s
002+
003+ Termsig=11

Between those two nightlies the job container (ubuntu:22.04, same digest sha256:0a9887…) and the runner image and kernel (ubuntu24/20261018.339, 7.0.0-1017-azure) did not change. On the PHP-8.4 side the relevant change is 3584a98bda ("Avoid state corruption via bailout"), merged in 8a94bb3822. So it is a candidate, but I have not been able to confirm it: PHP-8.3 has the same commit and passes.

I could not reproduce it outside GitHub Actions. In an ubuntu:22.04 container with the CI image digest, the apt-x32 and configure-x32 steps (--disable-debug --disable-zts), make install and the same environment variables, the test passes 5/5 both before and after 8a94bb3822 and on the current PHP-8.4 tip. It also passes with ulimit -s of 8M/64M/256M/unlimited, and within the whole Zend/tests run with -j10.

One difference that may matter: on the runner the test takes about 4.5 s (--show-slow in the logs), while locally it takes 0.08 s (0.5 s with a 256 MB stack). So on the runner it recurses much deeper before stopping, likely because of a larger detected stack or a different 32-bit address space layout under that kernel, and only then reaches the point where it crashes. Printing zend_test_zend_call_stack_get() in the X32 job would probably show this.

cc @arnaud-lb, since 3584a98bda changed how OOM is handled and this test accepts "Allowed memory size exhausted" as an outcome.

PHP Version

PHP-8.4, PHP-8.5, PHP-8.6 and master (nightly CI, X32 release builds)

Operating System

GitHub Actions ubuntu:22.04 container, i386 build (-m32 -msse2)

主要语言
C
星标
41.8k
派生
8.5k
平均合并
2 天 13 小时
30 天内合并 PR
145

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

php/php-src 的其他 Issue

查看 php/php-src 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

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