Skip to content

[do not merge] Print worker-mechanism diagnostics in the static analysis jobs - #6594

Closed
SanderMuller wants to merge 4 commits into
phpstan:2.2.xfrom
SanderMuller:ci-diagnose-fork-mechanism
Closed

SanderMuller wants to merge 4 commits into
phpstan:2.2.xfrom
SanderMuller:ci-diagnose-fork-mechanism

Conversation

@SanderMuller

Copy link
Copy Markdown
Contributor

Throwaway, not for merging. I will close it once the jobs have run.

On ubuntu, the self-analysis jobs for PHP 7.4, 8.0 and 8.1 fork their workers. The jobs for 8.2–8.6 spawn them: the run for 9c49ae3 prints largest of 4 spawned workers there. A source checkout should fork. pcntl is available, it is not a phar, and setup-php does not set opcache.enable_cli, so JIT should not be live either.

It matters for memory too. In that run the 7.4 and 8.0 main process is 162–164 MB on ubuntu, where it forks, and 210–212 MB on Windows, where it spawns. On 8.2+, where both spawn, the two differ by only 5–7 MB.

This adds one step before PHPStan. It prints bin/phpstan diagnose (its Reason fork not used line), php --ini, and the pcntl and OPcache state that the fork check depends on.

🤖 Generated with Claude Code

SanderMuller and others added 4 commits September 25, 2026 21:27
Temporary, for a throwaway draft PR: on ubuntu the PHP 8.2+ jobs spawn
their workers while 7.4-8.1 fork them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
On ubuntu the PHP 8.2+ jobs have neither extension, so parallel
analysis spawns its workers there instead of forking them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The runner's php.ini for PHP 8.2+ disables the pcntl_* functions, so
parallel analysis spawned its workers there even with pcntl loaded.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@SanderMuller

Copy link
Copy Markdown
Contributor Author

Closing: the diagnostics found the cause, and #6595 has the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant