| Previous | Next |
| MACH_RCV_IN_SET | MACH_RCV_BODY_ERROR |
MACH_RCV_HEADER_ERROR
A message arrived, but its header transfer was incomplete
MACH_RCV_HEADER_ERROR is not the same as “no message.” The kernel has dequeued a message, but a resource shortage prevented it from transferring port rights carried in the header to the receiving task. The interface documents extra status bits that identify whether the shortage was IPC name-space space, virtual-address space, kernel IPC resources, or kernel virtual-memory resources.
This matters because an RPC server can receive a request whose header is only partially usable. The reply port or other rights expected by higher-level code may be absent or invalid. Continuing as though the request were normal can leak resources, reply to the wrong endpoint, or misclassify a system-pressure event as a client protocol error.
How to respond safely
- Decode and log the additional
MACH_MSG_IPC_SPACE,MACH_MSG_VM_SPACE,MACH_MSG_IPC_KERNEL, orMACH_MSG_VM_KERNELbits. - Do not dispatch the request to ordinary application logic until required header rights are validated.
- Apply memory and port-right pressure controls; a retry alone cannot create task name-space capacity.
- Use cleanup that understands the message may already have been dequeued and partially transferred.
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.
