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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 21:01:29 2024 UTC