[php-src] Issue #10315: FPM unknown child alert not valid

From: Date: Sat, 14 Jan 2023 14:03:14 +0000
Subject: [php-src] Issue #10315: FPM unknown child alert not valid
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243446@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10315 Author: bukka ### Description When FPM master process waits for its children and the resulted pid is not found between its children, it triggers following alert: https://github.com/php/php-src/blob/9788244a42305596d33ea1c5024772c08264ad04/sapi/fpm/fpm/fpm_children.c#L301 Usually this would make sense to consider this as a bug except there are some valid use case when this can happen. It means a PID that is not an FPM child can be returned and it is not a problem. Here are two examples of such valid use cases. 1. The most usual case is that FPM runs in a container (e.g. Docker) where its PID is 1. It means it's the init process and every background process becomes its child. For example it means, this error gets triggered just by running exec('sleep 1 &');. T 2. Another use case is that process forks and parent immediately exec to run FPM. This for example happens with [s6-notifyoncheck](https://skarnet.org/software/s6/s6-notifyoncheck.html) (in this case it can be prevented by running the program with -d option). The solution should be to reduce the logging level and log different message. In the first case (if master pid is 1) just debug message should suffice. Otherwise triggering warning should be more appropriate as it might still make sense to let user know about this. ### PHP Version Any with FPM ### Operating System Linux

« previous php.bugs (#243446) next »