String corruption on deployments with php-fpm 8.1.6
Personne n'a encore pris cette issue.
- Langage dominant
- C
- Étoiles
- 40.4k
- Forks
- 8.2k
- Merge moyen
- 2 j 13 h
- PR mergées (30 j)
- 96
Description
Description
Hello,
We experience seemingly random in-memory corruption of code when deploying new versions of our PHP app on php-fpm 8.1.6 on Linux. Here is a sample error message:
include(/space/www/api2019/data/releases/20220607140425/vendor/la�R�F): Failed to open stream: No such file or directory
This example happens in the class loader from composer. The beginning of the file name is correct, the end is obviously not.
Another example (another release on another server):
Call to undefined function Symfony\Component\HttpFoundation\implode()
This bug is not easily reproducible, it happens in random-looking places in the code, sometimes but not always, on some servers but not others (we have 10 app servers, the bug appears on one server at a time, very rarely two, not on every release but more than half of them).
When it happens, it looks like there is only one corrupted chunk of data; depending on the affected data, it may only cause a few real errors or basically prevent the code from working on the server at all. It generates errors for a few minutes. Restarting the fpm daemon fixes it; reloading it or running opcache_reset() does not.
We will try to reproduce it on a staging server; at the moment I can only say it appears under load and not under light testing.
It may or may not be related to #8731 (same app, same servers, seemingly fixed by downgrading to 8.0.19).
I know this report is not really helpful, but I'm at a loss how to make it more useful.
Downgrading to PHP 8.0.19 seems to fix the issue.
PHP Version
PHP 8.1.6 (cli) (built: May 17 2022 16:49:19) (NTS)
Operating System
Debian 10
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par tenter de reproduire la corruption sur un serveur de staging exécutant PHP-FPM 8.1.6 sur Debian 10 et soumis à une charge, en comparant avec PHP 8.0.19. Observez si le redémarrage de FPM, son rechargement ou l’exécution de opcache_reset() modifie le résultat, et vérifiez l’échec de Composer ClassLoader ainsi que le lien possible avec #8731. Le travail est terminé lorsqu’une cause reproductible et une correction vérifiée ont été identifiées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- php
- Domaine
- backend
- Type d'issue
- Bug
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100