| Previous | Next |
| MACH_RCV_INVALID_DATA | MACH_RCV_IN_SET |
MACH_RCV_PORT_DIED
The receive endpoint changed lifetime
MACH_RCV_PORT_DIED means the right identified by receive_name was lost while the thread was waiting. The port or port set may have been destroyed, a receive right may have been moved away, or concurrent cleanup may have invalidated the local receive endpoint. It is more specific than a timeout: the wait target’s lifecycle changed.
The right response depends on ownership. A server intentionally shutting down should stop its loop and release related state. A client or dispatcher that did not expect this outcome should locate the concurrent owner, teardown path, or service restart that removed the right. Reusing the previous numeric name is unsafe because Mach names are task-local and can later be reused for something else.
Investigation checklist
- Trace port allocation, insertion into port sets, movement, and deallocation with a single ownership model.
- Correlate the event with service shutdown, task exit, launchd/XPC reconnection, or cancellation activity.
- Invalidate cached receive endpoints after teardown and reacquire them through the designated initialization path.
- Separate expected shutdown from unexpected endpoint loss in telemetry.
References
- Mach Kernel Interface Reference: mach_msg
- Apple Kernel Programming Guide: Mach overview
- Apple XNU source: mach/message.h
Looking for a different code? Search another status or error code.