| Previous | Next |
| MACH_SEND_TIMED_OUT | MACH_SEND_INTERRUPTED |
MACH_SEND_INVALID_VOUCHER
The voucher field did not identify an acceptable Mach voucher
MACH_SEND_INVALID_VOUCHER concerns msgh_voucher_port and the voucher disposition encoded in msgh_bits. XNU documents that this field is handled as a port name but must resolve to a send right for a kernel-implemented Mach voucher object, subject to the permitted null or dead values. A regular port name, a dead right, or a mismatched disposition is not interchangeable with a voucher.
Vouchers carry kernel-managed execution or resource context; they are not an application-defined side channel. The error therefore identifies a capability/type mismatch in the message header, not a failure of the service receiving the request. Replacing the destination port or retrying the same header normally preserves the defect.
What to inspect
- Check the value and lifetime of
msgh_voucher_portat the actualmach_msgcall. - Build the voucher portion of
msgh_bitswith the documented macros instead of hard-coded bit values. - Confirm that code transferring or deallocating port rights has not consumed the only usable voucher right.
- When using a framework that adds vouchers automatically, capture its generated header rather than reconstructing a value from a raw port name.
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.