Repository navigation
[6.x] Fork workers with the StreamSelectDriver event loop - #14750
Merged
Merged
Conversation
Contributor
|
| Project | Memory (MB) | Wall (s) | Issues | Weighted |
|---|---|---|---|---|
| – | – | – | – | |
| ✅ laravel | 1 006 | 81.7 |
25 554 | 51 698 |
| ✅ symfony | 1 512 | 67.1 |
44 001 | 89 327 |
| ✅ doctrine-orm | 260 | 11.3 |
3 538 | 5 602 |
| ✅ psl | 570 | 16.9 |
1 583 | 6 572 |
| ✅ phpunit | 340 | 12.1 |
1 628 | 1 351 |
| ✅ php-parser | 199 | 13.0 |
17 186 | 20 675 |
| ✅ amphp-amp | 52 |
1.8 |
32 | 79 |
| ✅ webmozarts-assert | 213 | 3.7 | 577 | 2 705 |
| ✅ guzzle-promises | 47 |
1.8 |
164 | 405 |
| Total | 4 200 | 209.5 |
94 263 | 178 414 |
How to read this table
-
Memory: Psalm's own peak figure,
threads=1. More than +5 % fails, unless the PR changescomposer.json. - Wall: base and head run on the same runner; ±10 % is noise. Above +20 % warns, never fails. re-run: a reversed second run was taken and the faster kept.
-
Issues: head count, then
$\color{red}{\textsf{+added}}$ $\color{green}{\textsf{-removed}}$ against base. - Weighted: issues weighted by error level (levels 1–8 as is, always-errors 10, feature-specific and purity suggestions 0). The projects' own code is pinned and their dependencies resolve identically for base and head, so a change means Psalm reports more, fewer or differently serious issues. A rise is not necessarily a regression.
- Total: sum over the projects compared on both sides. Thresholds apply per project, not to the total.
-
Colors:
$\color{red}{\textsf{red}}$ past a fail or warn threshold (or more issues),$\color{green}{\textsf{green}}$ an improvement past noise (or fewer issues),$\color{gray}{\textsf{gray}}$ noise. -
Performance: regressed if a head run crashed or timed out or a memory or wall delta is red, else improved if one is green, else unchanged. Its icon is the check result: ❌ fail ·
⚠️ warn · ✅ pass; the icon next to each project is that project's result, 💥 = not comparable: base crashed or timed out (counts as⚠️ ). - Issues (heading): the total weighted change, increased · decreased · unchanged. Informational, never fails the check.
head 090055a · base 9fbfcc1 (merge-base) · workflow run
Collaborator
|
Thanks! |
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.
Backports #14238 from
masterto6.x.On PHP 8.6 with
revolt/event-loop1.1.0,EventLoopdefaults toIoPollDriver(Io\Poll, epoll on Linux / kqueue on macOS). WhenPoolforks workers viapcntl_fork(), the parent and workers end up sharing/inheriting a kernel poller handle (causing segfaults on Linux epoll, or hangs /Io\Poll\FailedPollWaitExceptionon macOS kqueue because kqueue descriptors are not inherited acrossfork()).This switches the event loop driver to
StreamSelectDriverbefore forking when the active driver holds a kernel handle ($driver->getHandle() !== null), and fails with a clear message suggestingREVOLT_DRIVERor--threads=1if the loop is already running.The unit test in
tests/Internal/Fork/PoolEventLoopDriverTest.phpwrapsStreamSelectDriverto simulate a non-null kernel handle rather than referencingIoPollDriverdirectly, so it runs across all PHP versions (8.1–8.6) and bothrevolt/event-loop1.0.x and 1.1.x without skipping or triggeringUndefinedClasswhenrevolt/event-loop1.0.x is installed.