| Previous | Next |
| MACH_SEND_TOO_LARGE | MACH_SEND_INVALID_HEADER |
MACH_SEND_INVALID_TYPE
Descriptor metadata is part of the protocol
MACH_SEND_INVALID_TYPE means the kernel rejected descriptor metadata in a complex message. The descriptor type determines whether the body element represents a port, out-of-line memory, an array of ports, or another supported form; the disposition tells Mach what right or copy action to apply. A message can have a valid-looking byte buffer while still being invalid because these metadata fields do not describe a supported transfer.
Do not diagnose this solely as a peer-version mismatch. It can also result from using a descriptor structure with the wrong ABI layout, forgetting the complex-message bit, leaving padding or type fields uninitialized, or mixing generated definitions from different interface versions. The kernel may have processed some body elements before identifying the invalid one.
Practical checks
- Construct complex messages from zero-initialized typed structures, not hand-written byte offsets.
- Verify
MACH_MSGH_BITS_COMPLEX, descriptor count, and every descriptortypeand disposition. - Keep sender and receiver code generated from compatible MIG definitions where MIG is used.
- Discard and rebuild a failed complex message before retrying.
References
- Apple XNU source: mach/message.h
- Mach Kernel Interface Reference: mach_msg
- GNU Mach Reference Manual: interprocess communication
Looking for a different code? Search another status or error code.