web: bound in-flight requests to prevent send-buffer lockup#10615
Conversation
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces flow control and liveness monitoring to the WebSocket connection to prevent request flooding and handle wedged connections. On the server side, it sends a configuration payload specifying the maximum in-flight requests based on CPU cores. On the client side, WebSocketManager is updated to queue excess requests, handle cancellation properly, and monitor socket liveness. Feedback on the changes highlights three key robustness improvements: wrapping server-push JSON parsing in a try-catch block to prevent unhandled exceptions, rejecting cancelled queued requests to avoid leaving their promises pending indefinitely, and storing and clearing the liveness monitor interval timer to prevent timer leaks on shutdown.
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71583ea4fd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
|
@maliberty not sure what is triggering this: https://github.com/The-OpenROAD-Project/OpenROAD/actions/runs/27206602938/job/80323962147 |
"arm" is a blocked keyword. I can add an exception or you can pick a different word. |
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
Summary
Rapidly changing selection/zoom enqueued unbounded tile requests,
flooding the WebSocket send buffer until the connection wedged and the
view froze. Add a client-side scheduler that caps concurrent in-flight
requests and queues the rest (cancellable before they hit the wire;
cancelling an already-sent request no longer frees a slot, so churn
can't re-flood). Add liveness detection to force-close and reconnect a
wedged socket, and have the server announce the in-flight limit (scaled
to machine size) on connect. Includes unit tests for the scheduler,
cancellation, liveness, and the announced limit.
Note: claude debugged this and wrote the solution.
Type of Change
Impact
Fixes random lockup in the web making it hard to use on large designs.
Verification
./etc/Build.sh).