| Previous | Next |
| KERN_LOCK_UNSTABLE | KERN_LOCK_OWNED_SELF |
KERN_LOCK_OWNED
Contention on a valid lock
KERN_LOCK_OWNED means that another thread owns the lock at the time of the request. Unlike KERN_LOCK_UNSTABLE, the reported owner has not disappeared; unlike KERN_LOCK_OWNED_SELF, the caller is not attempting a conflicting operation on its own lock.
The return value is a concurrency observation, not proof of a deadlock. Its significance depends on the expected critical-section duration and on whether the API provides waiting, try-lock, or explicit scheduling behavior.
What to inspect
- Identify the owning thread and the work it is performing.
- Measure the normal critical-section duration under comparable load.
- Defer work or use the API waiting mechanism rather than polling if the contract allows it.
- Check persistent ownership for a cycle with another lock or blocked operation.
References
- Apple XNU: kern_return.h
- Apple Kernel Programming Guide: locks and synchronization
- Apple Kernel Programming Guide: scheduler wait queues
Looking for a different code? Search another status or error code.