-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugExisting functionality isn't behaving as expectedExisting functionality isn't behaving as expected
Description
Typical memory exhaustion errors are causing PHP to segfault, instead of fatal errorring. This kills the worker (and any shared memory it may be storing) and causes un-traceable user errors, significantly complicating debugging.
I also believe that this is the root cause of the problems with load-scripts.php we were seeing which we attributed to the JIT - they are actually out-of-memory issues which then become segfaults due to this bug as well as WordPress/gutenberg#54294
I've traced this down specifically to our use of Excimer, likely in X-Ray.
Minimal reproduction:
- Run local server the usual way
- Save the following into a PHP file in
content/mu-plugins/:
<?php
function foo() {
foo();
}
foo();
- View the site in the browser and observe it crashes with a 502 from nginx
- Observe
composer server logs phpcontains a segfault
Note, if you save the same file to the root and load it directly, it fatals with the memory exhaustion
To check Excimer:
- Use
docker exec -it -u root {id} /bin/bashto set up a root shell apt-get install procps vim- installspsandvimvim /usr/local/etc/php/conf.d/docker-php-ext-excimer.ini- comment (#) the line which loads Excimer and save itps aux- get the PID of PHPkill -s USR2 {pid}- reload php-fpm configuration- View the site in the browser and observe it fatal errors, but from PHP rather than nginx
- Observe
composer server logs phpcontains the (correct) memory exhaustion error
Acceptance criteria:
- ...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugExisting functionality isn't behaving as expectedExisting functionality isn't behaving as expected