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
This commit is contained in:
Jakub Zelenka 2023-01-14 16:55:16 +00:00
parent fe2dc2b481
commit 4199b72c50
No known key found for this signature in database
GPG Key ID: 1C0779DC5C0A9DE4
2 changed files with 6 additions and 1 deletions

3
NEWS
View File

@ -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)

View File

@ -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);
}
}
}