| Previous | Next |
| kIOReturn???Error | kIOReturnNotOpen |
kIOReturnCannotLock
A failed lock acquisition
kIOReturnCannotLock means that the required lock could not be acquired. The public common-error definition does not identify the protected object, lock owner, or locking policy, so it should not be read as a guaranteed “another process owns the device” result. The context of the IOKit family or driver determines what is locked.
It differs from kIOReturnLockedRead and kIOReturnLockedWrite, which describe locked device read or write paths. Here the meaningful evidence is the operation that attempted the acquisition and the lifecycle or concurrency state around it. A forced reopen can increase contention or invalidate state rather than releasing the underlying lock.
What to collect
- Record the service, method, current state transition, callers, and outstanding operations for the target object.
- Check lock ordering and cancellation paths in the relevant driver or user-client implementation when source is available.
- Use completion events or documented serialization instead of aggressive retries.
- Investigate persistent failures as a possible cleanup, deadlock, or ownership-protocol problem.
References
- Apple XNU source: IOReturn.h
- Apple: Introduction to IOKit Fundamentals
- Apple: IOKit architectural overview
Looking for a different code? Search another status or error code.