What could be the cause of this Chkdsk mid-message deadlock?

What could cause the following chkdsk result:

chkdsk /b /f /v /scan c:

The type of the file system is NTFS.
Cannot lock current drive.

Chkdsk cannot run because the volume is in use by another
process.  Would you like to schedule this volume to be

This is normal when trying to check the system drive (you’re asked to re-schedule it for the next reboot). The message normally continues with

checked the next time the system restarts? (Y/N) Y

but the last line in my case is missing. Chkdsk never prints it and won’t respond to user input, so I can’t schedule the custom scan. Chkdsk appears to be stuck in a deadlock. It’s not waiting on any resources, CPU usage is 0%, memory usage only 920KiB.
Here’s a stack trace for the input thread:

ntoskrnl.exe!KeSynchronizeExecution+0x2106
ntoskrnl.exe!KeWaitForMultipleObjects+0x135e
ntoskrnl.exe!KeWaitForMultipleObjects+0xdd9
ntoskrnl.exe!KeWaitForMutexObject+0x373
ntoskrnl.exe!KeStallWhileFrozen+0x1feb
ntoskrnl.exe!KeIsAttachedProcess+0x229
ntoskrnl.exe!KeWaitForMultipleObjects+0x152f
ntoskrnl.exe!KeWaitForMultipleObjects+0xdd9
ntoskrnl.exe!KeWaitForMutexObject+0x373
ntoskrnl.exe!NtWaitForSingleObject+0xb2
ntoskrnl.exe!setjmpex+0x6553
ntdll.dll!ZwWaitForSingleObject+0xa
ifsutil.dll!BLOCK_CACHE::Initialize+0x2fe
KERNEL32.DLL!BaseThreadInitThunk+0x22
ntdll.dll!RtlUserThreadStart+0x34

And here’s one for the main thread:

ntoskrnl.exe!KeSynchronizeExecution+0x2106
ntoskrnl.exe!KeWaitForMultipleObjects+0x135e
ntoskrnl.exe!KeWaitForMultipleObjects+0xdd9
ntoskrnl.exe!KeWaitForMutexObject+0x373
ntoskrnl.exe!FsRtlInitializeOplock+0x3d1
ntoskrnl.exe!NtReadFile+0x664
ntoskrnl.exe!setjmpex+0x6553
ntdll.dll!ZwReadFile+0xa
KERNELBASE.dll!ReadFile+0x78
ulib.dll!KEYBOARD::EnableLineMode+0xc8
ulib.dll!PROGRAM::GetStandardOutput+0x18e
ulib.dll!STREAM::ReadLine+0x13d
ulib.dll!CHKDSK_MESSAGE::IsYesResponse+0x232
ulib.dll!CHKDSK_MESSAGE::IsYesResponse+0xbd
UNTFS.DLL!ChkdskEx+0x61e
chkdsk.exe+0x2c4f
chkdsk.exe+0x3e6c
KERNEL32.DLL!BaseThreadInitThunk+0x22
ntdll.dll!RtlUserThreadStart+0x34

Answer

Attribution
Source : Link , Question Author : aphid , Answer Author : Community

Leave a Comment