-
Notifications
You must be signed in to change notification settings - Fork 186
security(acp): bound frame size and throttle concurrent request handlers #944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hazyhaar
wants to merge
14
commits into
Gitlawb:main
Choose a base branch
from
hazyhaar:fix/acp-frame-goroutine-limits
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
bc5dbaa
security(acp): bound frame size and throttle concurrent request handl…
747f73a
fix(acp): unthrottle cancel notifications and isolate request semaphore
9d0e16f
security(acp): bound request admission with immediate -32000 Server B…
501a709
fix(acp): skip oversized frames and write busy replies off the read loop
hazyhaar 22fcb46
fix(acp): drop unused acquireSem after non-blocking busy admission
hazyhaar c0e48c7
fix(acp): bound busy replies with a single writer and drop the sessio…
hazyhaar c97ce96
fix(acp): let Call drop writeMu wait when its context is cancelled
hazyhaar f1a4f5f
fix(acp): keep in-flight replies after Serve reaches EOF
hazyhaar 30beba7
fix(acp): cancel stalled writers and bound notification dispatch
hazyhaar 8d02150
fix(acp): key cancels by session, bound notify workers, drain Serve o…
hazyhaar b321355
fix(acp): keep session/update ordered and bound admitted request bytes
hazyhaar 882eafc
fix(acp): drain update FIFO, bound special notifies, cap Serve wait
hazyhaar d3d6d51
fix(acp): wait for replies on clean Serve exit, persist overload writes
hazyhaar a945140
fix(acp): close the writer on overload and drop leftover busy debt
hazyhaar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Do not mutate
conn.notifiersafterServestarts.newHarnessstartsagentConn.Serveat Line 105.HandleNotifyperforms an unsynchronized map write (c.notifiers[method] = fn), anddispatchNotifyreads the same map from theServegoroutine. This test writes the map whileServeruns, so a concurrent notification produces a Go map race.go test -racecan report it, and the runtime can panic with "concurrent map read and map write".Register the interceptor before
Servestarts. Pass a hook throughnewHarness, or build theAgentand connection in the test and startServeafter the override.♻️ Option: install the override before Serve
🤖 Prompt for AI Agents