Skip to content

Fix flaky FPM test for bug #77023 - #24999

Merged
bukka merged 1 commit into
php:PHP-8.2from
bukka:fpm-bug77023-test-flakiness
Oct 29, 2026
Merged

bukka merged 1 commit into
php:PHP-8.2from
bukka:fpm-bug77023-test-flakiness

Conversation

@bukka

@bukka bukka commented Oct 28, 2026

Copy link
Copy Markdown
Member

The test sent two parallel requests to a pool with a single child and expected the dynamic process manager to spawn a second child. That only happens when the idle server maintenance heartbeat (1s) fires while the child is busy, but the scripts kept it busy for just 300ms each, so the spawn was a matter of luck and the total processes check failed on slow machines.

Use a single request that blocks the child for longer than the heartbeat so the spare child is always spawned, and rely on the fact that the blocked child is the oldest idle one and is therefore quit first. One blocked child is enough to verify the SIGKILL fallback. Replace the fixed sleep with log timeouts and poll the status until the spare child is quit.

@bukka
bukka changed the base branch from master to PHP-8.2 October 28, 2026 13:10
The test sent two parallel requests to a pool with a single child and
expected the dynamic process manager to spawn a second child. That only
happens when the idle server maintenance heartbeat (1s) fires while the
child is busy, but the scripts kept it busy for just 300ms each, so the
spawn was a matter of luck and the total processes check failed on slow
machines.

Use a single request that blocks the child for longer than the heartbeat
so the spare child is always spawned, and rely on the fact that the
blocked child is the oldest idle one and is therefore quit first. One
blocked child is enough to verify the SIGKILL fallback. Replace the fixed
sleep with log timeouts and poll the status until the spare child is quit.
@bukka
bukka force-pushed the fpm-bug77023-test-flakiness branch from 35ddc2a to 5f1bcca Compare October 28, 2026 13:10
@bukka

bukka commented Oct 28, 2026 •

Copy link
Copy Markdown
Member Author

I double checked that it still fails with the original fix reverted and it does so the test still testing the issue.

@bukka

bukka commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Just to note that this was causing most failures in our security repo so it should make the CI green there more often hopefully.

@bukka
bukka merged commit 084271b into php:PHP-8.2 Oct 29, 2026
18 checks passed
bukka added a commit that referenced this pull request Oct 29, 2026
* PHP-8.2:
  Fix flaky FPM test for bug #77023 (#24999)
bukka added a commit that referenced this pull request Oct 29, 2026
* PHP-8.3:
  Fix flaky FPM test for bug #77023 (#24999)
bukka added a commit that referenced this pull request Oct 29, 2026
* PHP-8.4:
  Fix flaky FPM test for bug #77023 (#24999)
bukka added a commit that referenced this pull request Oct 29, 2026
* PHP-8.5:
  Fix flaky FPM test for bug #77023 (#24999)
bukka added a commit that referenced this pull request Oct 29, 2026
* PHP-8.6:
  Fix flaky FPM test for bug #77023 (#24999)
arnaud-lb added a commit to lazerg/php-src that referenced this pull request Oct 29, 2026
* up/PHP-8.6:
  Fix json_encode() reporting false "Recursion detected" after OOM for hooked-property objects (php#24992)
  Fix phpGH-25023: ZEND_CONTAINER_OF() fails to compile with -std=c11 (php#25027)
  Fix flaky FPM test for bug #77023 (php#24999)
  Update GitHub Action workflows to `actions/checkout@v7` (8.6)
  Update GitHub Action workflows to `actions/checkout@v7` (8.5)
  Update GitHub Action workflows to `actions/checkout@v7` (8.4)
  Update GitHub Action workflows to `actions/checkout@v7`
  Fix phpGH-23626: OPcache: orphaned temporaries cause leaks and assertions
  [ci skip] Fix comment
  Fix block pass dropping ZEND_FAST_CALL OP2 definition
  Fix phpGH-23572: JIT calls wrong static method from trait clones
  Fix phpGH-24784: Preserve certificates when reading PKCS7/CMS CRLs (php#24785)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant