| Previous | Next |
| KERN_ABORTED | KERN_INVALID_TASK |
KERN_INVALID_NAME
KERN_INVALID_NAME means the supplied Mach port name does not denote a port right in the relevant task's namespace. It is not enough that the number was valid earlier, was printed by another task, or resembles a known service port.
Mach access is capability-based. A task can manipulate a port only through a right that it actually holds in its own namespace. Rights can be transferred, renamed, destroyed, or removed; their numeric names are not stable cross-process handles.
What to investigate
- Whether the right was deallocated or the port was destroyed before this call.
- Whether code accidentally used a port name from another task or process.
- Whether an IPC transfer sent the expected right type and the receiver retained it.
- Whether error cleanup invalidated the local port name but later code continued to use it.
Compare this with KERN_INVALID_RIGHT: KERN_INVALID_NAME says no right is denoted at all, while KERN_INVALID_RIGHT says a right exists but is the wrong kind for the requested operation.
References
- XNU: kern_return.h
- Apple Kernel Programming Guide: Mach ports and rights
- GNU Mach Reference Manual: Port Manipulation Interface
Looking for a different code? Search another status or error code.
