Tracing JIT: intermittent segfault in JIT buffer in long-running CLI command (PHP 8.5.12, opcache.jit=tracing)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- php
- 領域
- performance
調査の方向性
The report points to a crash in tracing JIT generated code with CLI Opcache settings, but no core dump, backtrace, or failing command is available yet. Start by reproducing the crash with PHP 8.5.12, opcache.jit=tracing, and the reported 128M buffer, then capture a backtrace and the failing command. Done means identifying a reproducible cause and fixing the intermittent segfault.
索引モデルが issue の本文から書いたものです。
説明
Description
A Laravel scheduled CLI command (php artisan schedule:run, run every minute by cron) intermittently segfaults inside JIT-generated code.
It happens in bursts: once it starts, nearly every hourly run of the same scheduled workload crashes for 1–2 days (36 crashes on one day, 21 the next), then it stops on its own after unrelated code/data changes and does not recur for days.
Kernel log at the time of a crash:
php[3844339]: segfault at 0 ip 00005648b9e003eb sp 00007ffcd6eb38b0 error 4 in zero (deleted)[5648b9e00000+8000000]
The faulting instruction is inside an anonymous 0x8000000 (128M) mapping, which matches opcache.jit_buffer_size=128M, i.e. JIT-generated code.
No core dump or backtrace is available yet (the crashes stopped before one could be captured). I will add a backtrace and the failing command when the next burst happens.
Opcache settings (CLI):
opcache.enable=1
opcache.enable_cli=1
opcache.jit=tracing
opcache.jit_buffer_size=128M
Resulted in this output:
Segmentation fault (exit code 139)
But I expected this output instead:
The command completes normally.
PHP Version
PHP 8.5.12 (cli) (NTS), LiteSpeed lsphp85 build
Operating System
AlmaLinux 9, x86_64 (OpenLiteSpeed)
- 主要言語
- C
- スター
- 41.8k
- フォーク
- 8.6k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 125
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
php/php-src のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
ext/openssl: 8.2.31+/8.3.31+ fail to build against OpenSSL 1.0.2 (ASN1_STRING_get0_data in xp_ssl.c)オープンExtension: openssl Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
php/php-src#25402 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
php/php-src#25397 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
SNMP accepts malformed remote ports対応中かも @somethingwithproof が 21 日前に担当しました。 オープン
難易度 2/5 半日 初心者へのやさしさ 62/100
php/php-src#25137 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
interpreter-core type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
ImageMagick/ImageMagick6#490 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
camera-2018/hdu-cs-wiki#647 ·
-
ZIP/ZIPS decode dereferences NULL when the cached libdeflate decompressor can't be allocated (3.5 regression)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AcademySoftwareFoundation/openexr#2884 ·
メンテナーはふだん 1 日以内に返信