-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP-FPM 8.2 SIGSEGV #16432
Comments
Hi and thanks for your report, would you be able to provide a backtrace ? e.g. attaching gdb to the relevant process then typing $ gdb -p <fpm process id>
<requests>
(gdb) <crash>
(gdb) bt full |
@devnexen I finally have the backtrace. I had to wait for it to occur again. You can find it below: Program terminated with signal SIGSEGV, Segmentation fault. |
Thanks. Is there a possibility to share some relevant parts of your FPM configuration eventually ? |
@devnexen I am happy to share whatever you need in the configuration :) |
Anything regarding the pool(s) (e.g. max children and related). asking because something like this scoreboard = {{lock = 1, dummy = "\001", '\000' <repeats 14 times>}, pool = "www", '\000' <repeats 28 times>, pm = 1, start_epoch = 1729283343, idle = 11600, then, to clarify, we do this struct fpm_scoreboard_s procs[scoreboard.nprocs]; |
@devnexen Most of the PHP-FPM config is just the default values for PHP 8.2 except for things such as max children: pm = static These values are very high because this is a very high traffic server which is prone to huge, short bursts of traffic. The performance is excellent, except for when this occasional SIGSEGV occurs which breaks it all. I can identify no pattern of when it occurs. It seems to happen with both high traffic and reasonably low traffic. Sometimes it happens every few days, but sometimes it only happens once per month. |
Thanks for confirming, wonder if some threshold should be put or allocating the variable on the heap instead ... Let's see what @bukka thinks. |
This is a bug indeed. Yeah it needs to go on heap as stack is too small when number of children is that high. Fix in #16564 . The reason why it freezes everything is because the lock is set and there is currently no unlocking mechanism if child crashes before unlocking. This is problem on its own and I have got an initial fix for that in #15805 but it needs more work and mainly testing to be stable. I plan to look into it more in the coming weeks. This is a bit separate thing and to resolve this particular issue, the fix in #16564 should be enough. In addition, it might be worth for you to check why |
Description
I am encountering an issue where very rarely, one of the child processes of PHP-FPM crashes like this:
[13-Oct-2024 21:37:31] WARNING: [pool www] child 3668047 exited on signal 11 (SIGSEGV) after 6678.827466 seconds from start
When this happens, not only does the child process exit, but PHP-FPM stops responding to all requests completely. This creates a massive server load as the requests are queued indefinitely, and is only resolved by restarting the PHP-FPM service.
I have periodically experienced this in various versions of PHP 8.2, including in the current 8.2.24.
PHP Version
PHP 8.2.24
Operating System
AlmaLinux 8.9
The text was updated successfully, but these errors were encountered: