php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75953 Reload signal should return error code when PHP-FPM init failed
Submitted: 2018-02-12 10:13 UTC Modified: 2022-11-20 13:39 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: pim at lemonbit dot com Assigned: bukka (profile)
Status: Not a bug Package: FPM related
PHP Version: 7.1.14 OS: CentOS 7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pim at lemonbit dot com
New email:
PHP Version: OS:

 

 [2018-02-12 10:13 UTC] pim at lemonbit dot com
Description:
------------
When reloading the php-fpm daemon you would expect it to return an error code when the php-fpm initilization failed. However, we saw that the reload reported OK, but the php-fpm daemon still failed. 

Test script:
---------------
- Use a configuration that results in a failure, i.e. php-fpm pool with socket that is already in use by another instance. 
- Reload the php-fpm daemon with "kill -USR2 <pid>"


Expected result:
----------------
- Error exit code

Actual result:
--------------
- OK exit code

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-02-12 10:18 UTC] pim at lemonbit dot com
Excerpt from log (reload reports OK but php-fpm fails):

NOTICE: Reloading in progress ...
NOTICE: reloading: execvp("/opt/remi/php71/root/usr/sbin/php-fpm", {"/opt/remi/php71/root/usr/sbin/php-fpm", "--nodaemonize"})
ERROR: An another FPM instance seems to already listen on <redacted-path>.sock
ERROR: FPM initialization failed
 [2022-11-20 13:39 UTC] bukka@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: bukka
 [2022-11-20 13:39 UTC] bukka@php.net
Sorry for the late reply but unfortunately there is nothing that can be done about this in FPM as signal is asynchronously sent so FPM cannot change return code of signal call.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jun 03 04:03:39 2023 UTC