Closed
Conversation
192f374 to
3998723
Compare
Contributor
|
My manual tests specific to #4460 ("'break' outside of not in the 'loop' or 'switch' contex" and |
bukka
reviewed
Jul 24, 2019
| $write = null; | ||
| $except = null; | ||
| if (stream_select($read, $write, $except, 2 )) { | ||
| if (stream_select($read, $write, $except, 3)) { |
Member
There was a problem hiding this comment.
Why does it need to be increased?
Member
Author
There was a problem hiding this comment.
The test case waits one second after sigquit to send sigterm and another second after that to send sigkill, so we need to wait for two seconds for the reload to occur. So the timeout should be larger than two seconds.
Member
|
I like it from the quick look. Not sure if it can have any side effects atm. I would be fine with this going to 7.4 and if it's all good, we could back-port it eventually. |
Member
Author
plmnikulin
added a commit
to plmnikulin/php-src
that referenced
this pull request
Oct 21, 2019
Postpone signal delivery while spawning children. Prevent the following case: - Reload (reexec) is in progress. - New master is forking to start enough children for pools where `pm` is not `on-demand`. - Another `SIGUSR2` is received by the master process. - Master process switches to reloading state. - Some child has not set its own signal handlers. - `SIGQUIT` and `SIGTERM` sent by master process are caught by signal handler set by master process and so they are ignored. - A child is running, it has no reason to finish Before pull request php#4465 this scenario could cause deadlock, however with 0ed6c37 reload finishes after `SIGKILL`. Use sigprocmask() around fork() to avoid race of delivery signal to children and setting of own signal handlers. Fixes bug #76601
php-pulls
pushed a commit
that referenced
this pull request
Nov 17, 2019
Postpone signal delivery while spawning children. Prevent the following case: - Reload (reexec) is in progress. - New master is forking to start enough children for pools where `pm` is not `on-demand`. - Another `SIGUSR2` is received by the master process. - Master process switches to reloading state. - Some child has not set its own signal handlers. - `SIGQUIT` and `SIGTERM` sent by master process are caught by signal handler set by master process and so they are ignored. - A child is running, it has no reason to finish Before pull request #4465 this scenario could cause deadlock, however with 0ed6c37 reload finishes after `SIGKILL`. Use sigprocmask() around fork() to avoid race of delivery signal to children and setting of own signal handlers. Fixes bug #76601
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make sure that fpm_event_add calls inside a timer callback work by unregistering the event from the queue before invoking its callback.
This is an alternative fix for #4460.