What does errno 39 (ENOLCK) mean?

 
Could be also:
ConstantTypeOS
ERROR_HANDLE_DISK_FULLWin32 errorWindows
KERN_LOCK_UNSTABLEKern returnMac
ippStsEvenMedianWeightIntel Ipp StatusAny
ENOTEMPTYerrnoLinux
EDESTADDRREQerrnoMac
EL3HLTerrnoSolaris
RDR_FILE_SYSTEMBugCheck CodeWindows
Previous Next
EL3HLT ELOOP

ENOLCK

ENOLCK is the portable error name for a failure to provide record-lock resources. It should not be read as proof that another process simply owns the desired range. Contention, lock-manager availability, the underlying file or remote server, and the limits of the locking implementation are distinct failure modes.

On Windows, do not replace the original result with an assumed POSIX interpretation. Native file-locking APIs return their own documented statuses; this macro is relevant when a CRT-compatible or portability abstraction exposes it. The useful diagnostic record includes both the abstract file descriptor and the native file or server object behind it.

Diagnose the lock request, not only the file

  • Record the byte range, shared or exclusive mode, blocking policy, process and thread identity, and whether the file is local or remote.
  • Separate a resource shortage from a conflicting owner. A conflict normally requires inspecting holders; a shortage may require inspecting lock-manager or server limits.
  • Keep lock lifetime tied to a clear ownership scope. Leaked handles and forgotten unlock paths can imitate a capacity problem.
  • For distributed storage, collect server-side lock or lease events together with client timestamps.

References


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