Repository navigation
Keep the composed ini when a forked worker ends - #6865
Merged
Merged
Conversation
A PHP process spawned during the run reads its configuration from the composed ini through PHPRC. Once a forked worker deletes it, the spawned process loads neither the ini nor the scan dir, and misses every extension loaded from them. Amp-Thread-ID: https://ampcode.com/threads/T-01a17e3b-9bb8-77b1-a5c1-722d8ade601b
Forked workers inherited the shutdown function deleting the composed ini, so the first one to end deleted it while PHP processes spawned later in the run still read their configuration from it through PHPRC. Amp-Thread-ID: https://ampcode.com/threads/T-01a17e3b-9bb8-77b1-a5c1-722d8ade601b
The step already clears it before the scenario runs. Clearing it again loads the probe through bootstrapFiles in a process that never restarts, after probe.log was reset. Amp-Thread-ID: https://ampcode.com/threads/T-01a17e3b-9bb8-77b1-a5c1-722d8ade601b
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.
After the restart (#6773), every PHP process reads the composed ini through
PHPRC, withPHP_INI_SCAN_DIRemptied. Forked workers inherited the restarted process's shutdown function that deletes the composed ini, so the first worker to end deleted it while the run was still going.A PHP process spawned after that, for example by an extension compiling its own DI container, ran with neither the ini nor the scan dir. It missed every extension loaded from
conf.d, which surfaced as:It only showed up on cold runs, when the spawned process started after a worker had ended.
The first commit adds the tests and is expected to fail:
CollectedDataNoderule spawnsphpin the main process after all workers ended and compares its loaded extensions;RestartManagerTestcase that forks a child which exits normally and checks the ini survives it and is still deleted by its owner.The second commit makes only the process that registered the shutdown function delete the ini.