Raise the HTTP server’s listen backlog to 128 - #1
Open
sideshowbarker wants to merge 1 commit into
Open
sideshowbarker wants to merge 1 commit into
sideshowbarker wants to merge 1 commit into
Conversation
Problem: In a macOS 27 environment, Speedometer 2/3 wedged partway through, with every browser process idle, after 45/48 and 6/58 tests. StyleBenchConservative never reached its first test — so three of the ten suites couldn’t be run in that environment at all. Cause: The benchmark server is a single-threaded HTTPServer with the default listen backlog of 5, and it accepts connections one at a time. Speedometer burst opens 7–8 connections in 1ms (TodoMVC-WebComponents fetches 20 files in two such waves). So the queue overflows at the edge. Linux then queues the overflow, and the client retransmits 1s later; but macOS aborts it with a reset — which RequestServer reports as curl error 56, and LibWeb as a failed script load. Which fetch loses is a race: a lost speculative preload is harmless, since the script element fetches again on its own — but a lost script fetch leaves the app under test un- initialized. A test step throws, the runner’s promise never resolves, and nothing’s left pending — hence the idle browser. One Speedometer 2 run on this server had 14 fetches reset yet still completed, others never got Flight-TodoMVC up at all, and StyleBenchConservative lost its own runner scripts, tests.js and style-bench.js, and never started. Fix: Give the server a backlog of 128, which is the most macOS allows and more than any suite opens at once. With that one change, and none to the browser, Speedometer 2/3, and StyleBenchConservative all run to completion in the tested environment — without a single failed load.
|
Warning Review limit reachedNext included review available in 23 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Problem: In a macOS 27 environment, Speedometer 2/3 wedged partway through, with every browser process idle, after 45/48 and 6/58 tests. StyleBenchConservative never reached its first test — so three of the ten suites couldn’t be run in that environment at all.
Cause: The benchmark server is a single-threaded
HTTPServerwith the default listen backlog of 5, and it accepts connections one at a time. Speedometer burst opens 7–8 connections in 1ms (TodoMVC-WebComponents fetches 20 files in two such waves). So the queue overflows at the edge. Linux then queues the overflow, and the client retransmits 1s later; but macOS aborts it with a reset — which RequestServer reports as curl error 56, and LibWeb as a failed script load. Which fetch loses is a race: a lost speculative preload is harmless, since the script element fetches again on its own — but a lost script fetch leaves the app under test uninitialized. A test step throws, the runner’s promise never resolves, and nothing’s left pending — hence the idle browser. One Speedometer 2 run on this server had 14 fetches reset yet still completed, others never got Flight-TodoMVC up at all, and StyleBenchConservative lost its own runner scripts,tests.jsandstyle-bench.js, and never started.Fix: Give the server a backlog of 128, which is the most macOS allows and more than any suite opens at once. With that one change, and none to the browser, Speedometer 2/3, and StyleBenchConservative all run to completion in the tested environment — without a single failed load.