{"record":{"id":"a987ce49ec09288b","repo":"vllm-project/vllm","slug":"utility-call-method-closed-unexpectedly-call","errorCode":null,"errorMessage":"utility call `{method}` closed unexpectedly (call_id={call_id})","messagePattern":"utility call `(.+?)` closed unexpectedly \\(call_id=(.+?)\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"rust/src/engine-core-client/src/error.rs","lineNumber":96,"sourceCode":"    #[error(\"engine-core output dispatcher closed: {message}\")]\n    DispatcherClosed { message: String },\n    #[error(\"engine-core client is closed: {message}\")]\n    ClientClosed { message: String },\n    #[error(\"request output stream for `{request_id}` closed unexpectedly\")]\n    RequestStreamClosed { request_id: String },\n    #[error(\"utility call `{method}` failed (call_id={call_id}): {message}\")]\n    UtilityCallFailed {\n        method: String,\n        call_id: UtilityCallId,\n        message: String,\n    },\n    #[error(\"utility call `{method}` returned an invalid result (call_id={call_id}): {message}\")]\n    UtilityResultDecode {\n        method: String,\n        call_id: UtilityCallId,\n        message: String,\n    },\n    #[error(\"utility call `{method}` closed unexpectedly (call_id={call_id})\")]\n    UtilityCallClosed { method: String, call_id: u64 },\n    #[error(\"utility call `{method}` returned inconsistent results across engines: {values}\")]\n    InconsistentUtilityResults { method: String, values: String },\n\n    /// A special variant to allow cloning the same error.\n    #[error(transparent)]\n    Shared(Arc<Self>),\n}\n","sourceCodeStart":78,"sourceCodeEnd":105,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/rust/src/engine-core-client/src/error.rs#L78-L105","documentation":"EngineCoreError::UtilityCallClosed means the utility call's response channel closed before any result arrived — the engine-core (or its dispatcher) dropped the responder for that call_id. The call was accepted but never answered.","triggerScenarios":"Issuing a utility call concurrently with engine-core shutdown; the dispatcher task being torn down while the utility call is pending; engine-core crashing between accepting the call and responding.","commonSituations":"Shutdown races where a monitoring task fires a utility call as the engine closes; engine crash mid-call; testing harnesses that drop the client immediately after issuing a utility call.","solutions":["Ensure utility calls are not issued after/between shutdown initiation — gate them on engine liveness","Retry the utility call once after confirming the engine-core is still running (call_id can be reused safely for a new attempt)","Check engine-core logs for the crash or shutdown that closed the responder"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Skip utility calls during shutdown\nif shutting_down.load(Ordering::Relaxed) { return Ok(None); }\nclient.utility_call(method, payload).await.map(Some)","typeGuard":"pub fn is_utility_closed(e: &vllm_engine_core_client::Error) -> bool {\n    matches!(e, vllm_engine_core_client::Error::UtilityCallClosed { .. })\n}","tryCatchPattern":"for attempt in 0..2 {\n    match client.utility_call(method, payload).await {\n        Err(vllm_engine_core_client::Error::UtilityCallClosed { .. }) if attempt == 0 && engine_alive() => continue,\n        other => break other,\n    }\n}","preventionTips":["Block new utility calls once shutdown begins (shutdown flag / watch channel)","Confirm engine liveness before retrying a closed utility call","Correlate call_id in logs to distinguish races from engine crashes"],"tags":["rpc","shutdown-race","utility-call","rust"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}