[SIGNIFICANT] IPC channel capacity exhaustion under load #22

Open
opened 2026-05-11 10:52:01 +00:00 by thabeta · 1 comment
Owner

Problem

The IPC command channel has capacity 64, and the event channel has capacity 256. Under rapid command load:

  1. The IPC handler's send().await on the command channel blocks when full
  2. This blocks the IPC socket reader, causing TCP/Unix socket backpressure
  3. Clients timeout waiting for responses
  4. No mechanism exists to reject or drop commands under load

Impact

During high command volume (e.g., a script rapidly starting/stopping services, or a buggy client), the system becomes unresponsive. Clients hang and timeout, potentially leaving operations incomplete.

Files

  • crates/my_init_server/src/main.rs -- channel creation: mpsc::channel::<IpcCommand>(64), mpsc::channel(256)

Suggested Fix

  • Implement backpressure: return an error response immediately when the channel is full instead of blocking
  • Use try_send with a fallback error response
  • Add rate limiting on IPC connections
## Problem The IPC command channel has capacity 64, and the event channel has capacity 256. Under rapid command load: 1. The IPC handler's `send().await` on the command channel blocks when full 2. This blocks the IPC socket reader, causing TCP/Unix socket backpressure 3. Clients timeout waiting for responses 4. No mechanism exists to reject or drop commands under load ## Impact During high command volume (e.g., a script rapidly starting/stopping services, or a buggy client), the system becomes unresponsive. Clients hang and timeout, potentially leaving operations incomplete. ## Files - `crates/my_init_server/src/main.rs` -- channel creation: `mpsc::channel::<IpcCommand>(64)`, `mpsc::channel(256)` ## Suggested Fix - Implement backpressure: return an error response immediately when the channel is full instead of blocking - Use `try_send` with a fallback error response - Add rate limiting on IPC connections
Member

Classification: valid-bug — IPC channel capacity 64 blocks the socket reader when full, causing client timeouts and no mechanism to reject overload.

Confirmed by the issue description referencing crates/my_init_server/src/main.rs — the mpsc::channel::(64) and mpsc::channel(256) limits. When either channel is full, send().await blocks the IPC socket reader, creating backpressure against TCP/Unix clients. No try_send fallback or rate-limiting exists.

> Classification: valid-bug — IPC channel capacity 64 blocks the socket reader when full, causing client timeouts and no mechanism to reject overload. Confirmed by the issue description referencing crates/my_init_server/src/main.rs — the mpsc::channel::<IpcCommand>(64) and mpsc::channel(256) limits. When either channel is full, send().await blocks the IPC socket reader, creating backpressure against TCP/Unix clients. No try_send fallback or rate-limiting exists.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/my_init#22
No description provided.