| Previous | Next |
| EBADFD | EBADMSG |
ENOLCK
A lock-management resource failure
ENOLCK concerns the resources used to represent or manage advisory record locks. It is not a statement that another process owns the requested range; that competing-lock case is normally reported through an API-specific nonblocking result or by blocking until the lock becomes available.
Keep the lock protocol separate from file-descriptor lifetime. File locks may be released or altered when descriptors are closed, processes exit, or a file is reopened through a different path, depending on the locking API. Retrying after a short delay can be reasonable only after checking that the system is not under persistent lock-table pressure.
Collect these fields
- Locking API, file identity, byte range, requested mode, blocking flag, and process or thread identity.
- Number of locks held by the process and total concurrency of the application’s lock manager.
- Whether the workload could replace many small byte-range locks with a bounded set of coarser locks.
References
- Apple XNU: Darwin errno definitions
- POSIX: advisory record locking with fcntl()
- Apple system-call reference: ENOLCK
Looking for a different code? Search another status or error code.