Debugging a deadlock in ntoskrnl

Hello,
I’m trying to iscsi boot Windows 2016 in a HyperV virtual machine, I can get it working under ESX but not under hyperv.

It seems there is a deadlock being caused (the boot process is stuck - no network traffic, no BSOD just stuck).

Using the “debug-vm “XXX” -InjectNonMaskableInterrupt -Force” command I can force a break into windbg, and it seems the main thread is stuck with the following stack:

ffff83000abbf0e0 fffff80071c7cf5c nt!KiSwapContext+0x76
ffff83000abbf220 fffff80071c7c9ff nt!KiSwapThread+0x17c
ffff83000abbf2d0 fffff80071c7e7c7 nt!KiCommitThreadWait+0x14f
ffff83000abbf370 fffff80071d35868 nt!KeWaitForSingleObject+0x377
ffff83000abbf420 fffff80072113ef4 nt!PnpDeviceCompletionQueueGetCompletedRequest+0x20
ffff83000abbf460 fffff80072113d27 nt!PnpDeviceCompletionProcessCompletedRequests+0x6c
ffff83000abbf490 fffff80071c5488e nt!PipProcessDevNodeTree+0x48b
ffff83000abbf710 fffff80071d0e77f nt!PnpDeviceActionWorker+0x2ea
ffff83000abbf7e0 fffff800723ae788 nt!PnpRequestDeviceAction+0x29b
ffff83000abbf860 fffff800723b2496 nt!IopInitializeBootDrivers+0x70c
ffff83000abbfaa0 fffff800723bf641 nt!IoInitSystemPreDrivers+0xa4a
ffff83000abbfbb0 fffff80072160f5c nt!IoInitSystem+0x9
ffff83000abbfbe0 fffff80071c19729 nt!Phase1Initialization+0x3c
ffff83000abbfc10 fffff80071d66bb6 nt!PspSystemThreadStartup+0x41
ffff83000abbfc60 0000000000000000 nt!KiStartSystemThread+0x16

Anyone have any ideas how to continue?

PS - this worked find with Windows 2012R2

!irpfind to find IRPs that were not completed
!locks if you are lucky to deadlock with ERESOURCES held

Try “!stacks 2” and look at the threads in the System process. Some driver
is not responding to a PnP event, looking at the active threads should
(hopefully) at least point you the offending driver.

-scott
OSR
@OSRDrivers

wrote in message news:xxxxx@ntdev…

Hello,
I’m trying to iscsi boot Windows 2016 in a HyperV virtual machine, I can get
it working under ESX but not under hyperv.

It seems there is a deadlock being caused (the boot process is stuck - no
network traffic, no BSOD just stuck).

Using the “debug-vm “XXX” -InjectNonMaskableInterrupt -Force” command I can
force a break into windbg, and it seems the main thread is stuck with the
following stack:

ffff83000abbf0e0 fffff80071c7cf5c nt!KiSwapContext+0x76
ffff83000abbf220 fffff80071c7c9ff nt!KiSwapThread+0x17c
ffff83000abbf2d0 fffff80071c7e7c7 nt!KiCommitThreadWait+0x14f
ffff83000abbf370 fffff80071d35868 nt!KeWaitForSingleObject+0x377
ffff83000abbf420 fffff80072113ef4
nt!PnpDeviceCompletionQueueGetCompletedRequest+0x20
ffff83000abbf460 fffff80072113d27
nt!PnpDeviceCompletionProcessCompletedRequests+0x6c
ffff83000abbf490 fffff80071c5488e nt!PipProcessDevNodeTree+0x48b
ffff83000abbf710 fffff80071d0e77f nt!PnpDeviceActionWorker+0x2ea
ffff83000abbf7e0 fffff800723ae788 nt!PnpRequestDeviceAction+0x29b
ffff83000abbf860 fffff800723b2496
nt!IopInitializeBootDrivers+0x70c
ffff83000abbfaa0 fffff800723bf641 nt!IoInitSystemPreDrivers+0xa4a
ffff83000abbfbb0 fffff80072160f5c nt!IoInitSystem+0x9
ffff83000abbfbe0 fffff80071c19729 nt!Phase1Initialization+0x3c
ffff83000abbfc10 fffff80071d66bb6 nt!PspSystemThreadStartup+0x41
ffff83000abbfc60 0000000000000000 nt!KiStartSystemThread+0x16

Anyone have any ideas how to continue?

PS - this worked find with Windows 2012R2