Repository navigation
Conversation
When Bun.serve with http3: true successfully binds the TCP port but the QUIC listener cannot bind the matching UDP port on the final attempt, the error path threw and called deinit() while the TCP listen socket was still linked into the uWS socket group. ~TemplatedApp then hit the head_listen_sockets == NULL assertion in debug builds, and in release builds left the listen socket polling into a freed HttpContext, crashing on the next accept. Close the TCP listener unconditionally when the H3 bind fails, then either retry (port: 0 with attempts remaining) or throw.
|
Warning Review limit reached
More reviews will be available in 4 minutes and 44 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughIn ChangesH3 UDP Bind Failure: TCP Listener Cleanup
Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/js/bun/http/serve-http3.test.ts`:
- Around line 1107-1108: The error assertion on line 1108 uses a broad substring
check for "HTTP/3" which could be satisfied by any early HTTP/3 setup error
instead of specifically testing the UDP bind failure for the port. Replace the
substring check with an assertion that matches the exact error message thrown by
the listen() function when UDP binding fails on the specific port being tested.
This ensures the test actually exercises the intended TCP-success/UDP-failure
code path rather than passing vacuously on unrelated HTTP/3 errors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: f85d20bb-b7f1-4d0c-9f53-631bf900f618
📒 Files selected for processing (2)
src/runtime/server/mod.rstest/js/bun/http/serve-http3.test.ts
|
This PR may be a duplicate of:
🤖 Generated with Claude Code |
|
Closing as a duplicate of #32539, which has the identical source change and was opened first. |
When
Bun.servewithhttp3: truesuccessfully binds the TCP port but the QUIC listener cannot bind the matching UDP port on the final attempt, the error path threw and calleddeinit()while the TCP listen socket was still linked into the uWS socket group.~TemplatedAppthen hit thehead_listen_sockets == NULLassertion in debug builds; in release builds the listen socket kept polling into a freedHttpContextand segfaulted on the next accept.What changed
Close the TCP listener unconditionally when the H3 bind fails, then either retry (
port: 0with attempts remaining) or throw. Previously the close only ran on the retry branch.How to reproduce
Before: debug assertion
group->head_listen_sockets == NULLfailed; release build segfaults if anything connects to the leaked TCP port.After: throws
Failed to listen on UDP port N for HTTP/3and the TCP port is released.Found by Fuzzilli (fingerprint 23068b3612b07851).