Site icon EfmSoft

What does NTSTATUS 0xC0000264 (STATUS_RESOURCE_NOT_OWNED) mean?

 
Previous Next
STATUS_DRIVER_ENTRYPOINT_NOT_FOUND STATUS_TOO_MANY_LINKS

STATUS_RESOURCE_NOT_OWNED

Match every ownership acquisition with release on the same ownership path

STATUS_RESOURCE_NOT_OWNED is an ownership error. A concrete Windows example is a mutex: ReleaseMutex fails when the calling thread does not own the mutex. Windows mutexes also allow recursive acquisition by the owning thread, but ownership is not fully released until the thread calls ReleaseMutex once for each successful ownership acquisition.

This makes simple “locked/unlocked” logging insufficient. Record thread identity and acquisition depth for ownership-based primitives. A timeout path that never acquired the mutex must not execute unconditional release cleanup, and a handoff to another worker thread cannot transfer Windows mutex ownership merely by passing the handle. Compare that behavior with other primitives such as semaphores, which do not enforce the same thread ownership rule.

The NTSTATUS name is broader than the Win32 mutex API, so first identify the resource type that reported it. Then inspect every acquire, recursive acquire, wait failure, cancellation, exception, and cleanup branch. Do not add a catch-all ignore for release errors; ownership mismatches often indicate that protected state can also be accessed under the wrong synchronization assumptions.

What to inspect

References


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

Exit mobile version