Let the ubuntu static analysis jobs fork their workers on PHP 8.2+ - #6595
Open
SanderMuller wants to merge 1 commit into
Open
SanderMuller wants to merge 1 commit into
SanderMuller wants to merge 1 commit into
Conversation
Member
|
Please start contributing similar things to 2.3.x only. 2.2.x is reserved for recently-broken things that would need an immediate release 😊 Thanks. |
SanderMuller
force-pushed
the
ci-static-analysis-fork-workers
branch
from
September 25, 2026 20:20
511c1c8 to
7852cf4
Compare
The runner's php.ini for PHP 8.2+ lists every pcntl_* function in disable_functions, and the 8.2 runner does not load posix either, so parallel analysis spawned its workers there instead of forking them. In the 7.4-8.1 jobs disable_functions is empty, and they already forked. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
SanderMuller
force-pushed
the
ci-static-analysis-fork-workers
branch
from
September 26, 2026 14:29
7852cf4 to
eef8351
Compare
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.
On ubuntu, the self-analysis jobs for PHP 8.2–8.6 spawned their workers, while the ones for 7.4–8.1 forked them.
bin/phpstan diagnosein those jobs saidReason fork not used: pcntl/posix functions are not available.pcntl is loaded there, but the runner's
/etc/php/8.x/cli/php.inilists everypcntl_*function indisable_functions(422 characters on 8.2, 540 on 8.6). The 8.2 runner also does not load posix: there is no20-posix.iniamong its parsed ini files. Withphp -d disable_functions=,function_exists('pcntl_fork')is true. In the 7.4–8.1 jobs,disable_functionsis empty.The
Install PHPstep now adds pcntl and posix and clearsdisable_functionsfor the ubuntu jobs. Windows has no pcntl, so its jobs keepmbstringonly and spawn as before.Tested in the throwaway draft #6594, with the same step plus a diagnose step (run):
Mechanism: fork, all pass. The main process peaks at 354.5–356.5 MB, against 405–407 MB in the run for 9c49ae3, when they spawned.So these jobs now run the fork path that parallel analysis uses on most Linux machines.
🤖 Generated with Claude Code