What does macOS kernel return 0x1000000C (MACH_SEND_INVALID_MEMORY) mean?

 
Previous Next
MACH_SEND_INVALID_NOTIFY MACH_SEND_NO_BUFFER

MACH_SEND_INVALID_MEMORY

Out-of-line memory was not usable

MACH_SEND_INVALID_MEMORY occurs when a message body describes out-of-line memory that is not readable by the sender at send time. The address may be invalid, unmapped, protected against the required access, or paired with a size and descriptor combination that does not describe a valid range. It applies to the message body, not merely to the header buffer.

Out-of-line descriptors are attractive because Mach can transfer large regions efficiently through virtual-memory mechanisms. They also make lifetime rules important: the application must keep the memory valid until the send has reached a result that defines ownership. The interface classifies this result among cases where some or all of the message may have been destroyed, so recreating the request is safer than assuming descriptors remain intact.

How to investigate

  • Validate address, length, protection, and allocation lifetime for every out-of-line descriptor.
  • Check whether another thread unmapped, reused, or changed protection on the region while the request was being assembled.
  • Keep data ownership explicit when using the descriptor’s deallocate and copy options.
  • Reduce a failing message to one descriptor at a time and verify the ABI layout before examining kernel-resource hypotheses.

References


Looking for a different code? Search another status or error code.