What does macOS kernel return 21 (KERN_RIGHT_EXISTS) mean?

 
Could be also:
ConstantTypeOS
ERROR_NOT_READYWin32 errorWindows
ippStsCpuMismatchIntel Ipp StatusAny
EISDIRerrnoAny
LAST_CHANCE_CALLED_FROM_KMODEBugCheck CodeWindows
Previous Next
KERN_INVALID_CAPABILITY KERN_INVALID_HOST

KERN_RIGHT_EXISTS

KERN_RIGHT_EXISTS says the task already has a send or receive right for the port, but under a different local name. It is a namespace and ownership result, not a claim that the remote object itself is missing or unavailable.

This condition often appears while importing, inserting, or naming rights. Because port names are local to each task, code that tries to force a second local name may discover that the task already holds the relevant capability. The correct next step depends on whether the existing right is intentional, stale, or a sign that two components are trying to manage the same resource.

How to use the result

  • Locate the existing local name and determine its right type.
  • Reuse the existing capability when that matches the ownership model.
  • Review duplicate import, reconnect, and cleanup logic when the duplicate is unexpected.
  • Do not confuse it with KERN_NAME_EXISTS, which concerns a requested name already denoting some right.

Clear logging should identify the target task, requested name, existing name, and right type. That turns an opaque Mach error into evidence about the task's actual port-right namespace.

References


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