Error 158 - ERROR_NOT_LOCKED
The segment is already unlocked.
Symptoms
- The segment is already unlocked.
- System error 158 (ERROR_NOT_LOCKED)
Troubleshooting steps
- Note the exact error 158 (ERROR_NOT_LOCKED) and which operation failed.
- Check the Windows Event Viewer and the relevant application/service logs for related entries.
- Apply the fix documented by Microsoft for error ERROR_NOT_LOCKED (see the reference URL).
- Retry the operation after applying the fix and confirm the error no longer appears.
Reference: learn.microsoft.com