| Previous | Next |
| MACH_SEND_INVALID_DEST | MACH_SEND_INVALID_VOUCHER |
MACH_SEND_TIMED_OUT
What the timeout represents
MACH_SEND_TIMED_OUT is normally a back-pressure result. With MACH_SEND_TIMEOUT, a sender waiting for room on a destination port’s queue returns when the configured interval expires. It does not mean a remote network timeout: Mach ports are local kernel IPC endpoints. The service may be alive but not draining its queue quickly enough, blocked behind a dependency, or overloaded by producers.
The Mach interface describes this as a pseudo-receive case: the kernel attempts to return message contents to the caller instead of losing transferred rights or out-of-line memory. After that restoration, names and addresses in a complex message can differ from their pre-send values. A retry should therefore inspect or reconstruct the message rather than blindly reuse stale auxiliary state.
Recovery and diagnosis
- Record the destination port, timeout value, queueing rate, and whether the message contains transferred rights or out-of-line memory.
- Use bounded retry with backoff only for requests that remain safe to issue again.
- Investigate the receiver’s dispatch loop, blocking calls, lock contention, and queue limit before increasing timeouts.
- Apply application-level flow control when producers can outrun the consumer; an ever-growing timeout only hides the backlog.
References
- Mach Kernel Interface Reference: mach_msg
- Apple XNU source: mach_msg implementation
- GNU Mach Reference Manual: interprocess communication
Looking for a different code? Search another status or error code.