Conversation
Two unrelated failures, both only visible once the functional suite runs on a Mac, which no CI job does yet. awssig.t started a config for a module that is no longer built there. Skip it on Darwin, matching the configure-time condition added in nginx#319. shared_dict.t's check() waits for a second worker pid to prove the value came from shared memory, retrying back to back. Consecutive connections keep landing on the worker that is already awake: 38 of 40 in a plain nginx with two workers, so the loop exhausts and the test fails almost every run. Pausing between retries spreads them, measured 0 failures in 50 runs against 50 in 50 before. The loop still returns as soon as it sees a second pid, so the cost is one pause per check where the first retry already lands elsewhere. Signed-off-by: Y.Horie <u5.horie@gmail.com>
Contributor
Author
|
Folded into #320, which is where both failures surfaced. |
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.
Proposed changes
Two unrelated failures in
examples/t, both only visible once the functionalsuite runs on a Mac, which no CI job does yet. #320 adds such a job and both
turned up there.
awssig.twrites a config using a module that is no longer built onDarwin after #319, so nginx refuses to start. Skip the file there, matching the
configure-time condition.
shared_dict.tfails on itscheck()calls, subtests 3, 4 and 6.check()records the worker pid that answered and retries back to back until a different
one answers, which is what proves the value came from shared memory rather than
worker-local state. Consecutive connections keep landing on the worker that is
already awake, so the loop exhausts without ever seeing a second pid. With
plain nginx and two workers:
Pausing between retries lets the worker that just answered go back to sleep, so
the kernel has a reason to wake the other one.
Testing
macOS 14.6, Apple Silicon, nginx 1.30.4, running
shared_dict.tin a loop:The loop returns as soon as it sees a second pid, so on a platform where the
first retry already lands on the other worker the cost is one pause per
check(). The whole ofexamples/ttakes about 2s here either way.accept_mutex onandlisten ... reuseportwere both tried first; on thisplatform each made the split worse, 40 / 0.
Checklist