Tracing JIT: intermittent segfault in JIT buffer in long-running CLI command (PHP 8.5.12, opcache.jit=tracing)

Ouverte
#25,551 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
php
Domaine
performance

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Bug Status: Needs Triage
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)

Langage dominant
C
Étoiles
41.8k
Forks
8.6k
Merge moyen
2 j 15 h
PR mergées (30 j)
125

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de php/php-src

Toutes les issues de php/php-src

Issues similaires

Plus d'issues C

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.