From 4199b72c50031cf16df476bf29f87c4c751b4770 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sat, 14 Jan 2023 16:55:16 +0000 Subject: [PATCH] Fix GH-10315: FPM unknown child alert not valid This changes the log level for an unknown child during wait as this is not unuasual if FPM master has pid 1 and also possible in some cases for higher pid processes. Based on that and the fact that this is not really a problem, there is just a debug level message emitted for pid 1 and for higher pid a warning is emitted. Closes GH-10319 --- NEWS | 3 +++ sapi/fpm/fpm/fpm_children.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f16e815291a..f13e1646df3 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,9 @@ PHP NEWS - FFI: . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) +- FPM: + . Fixed bug GH-10315 (FPM unknown child alert not valid). (Jakub Zelenka) + - Opcache: . Fix incorrect page_size check. (nielsdos) diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c index 6a5787c7ec8..2f8e3dc4d0a 100644 --- a/sapi/fpm/fpm/fpm_children.c +++ b/sapi/fpm/fpm/fpm_children.c @@ -297,8 +297,10 @@ void fpm_children_bury(void) break; } } + } else if (fpm_globals.parent_pid == 1) { + zlog(ZLOG_DEBUG, "unknown child (%d) exited %s - most likely an orphan process (master process is the init process)", pid, buf); } else { - zlog(ZLOG_ALERT, "oops, unknown child (%d) exited %s. Please open a bug report (https://github.com/php/php-src/issues).", pid, buf); + zlog(ZLOG_WARNING, "unknown child (%d) exited %s - potentially a bug or pre exec child (e.g. s6-notifyoncheck)", pid, buf); } } }