mirror of
https://github.com/openai/codex.git
synced 2026-11-24 15:21:20 +00:00
Bound exec-server pending RPCs (#31578)
## Why An untrusted exec-server can stop reading requests, never answer them, or send guessed responses before queued requests are written. Without client-side admission, the orchestrator can retain unbounded RPC call futures and request payloads. We need a hard bound without adding a blanket timeout, because individual operations already own their timeout and cleanup semantics. ## What changed - hold one of 64 shared admission permits for the full lifetime of each regular RPC call, so an early response cannot free capacity while the call remains queued - allow `process/terminate` and `fs/close` to use one additional cleanup permit - close the transport and fail pending calls if the cleanup permit is also stuck, allowing teardown or recovery to release remote resources - leave the wire format and existing timeout behavior unchanged ## Tests - `rpc_client_call_has_no_implicit_deadline` verifies that ordinary calls remain untimed - `rpc_client_bounds_in_flight_calls_and_preserves_cleanup` covers the regular-call cap, guessed early responses, cleanup admission, and the cleanup circuit breaker
This commit is contained in:
3 files changed
+216
-3
No files matched your search
@@ -445,7 +445,7 @@ impl Inner {
|
||||
Ok(false) => {}
|
||||
Err(error) => {
|
||||
let terminated: Result<TerminateResponse, ExecServerError> = rpc_client
|
||||
.call(
|
||||
.call_for_cleanup(
|
||||
EXEC_TERMINATE_METHOD,
|
||||
&TerminateParams {
|
||||
process_id: process_id.clone(),
|
||||
|
||||
Reference in new issue
Block a user