Get the thread/context of the exception/bugcheck/BSOD

Hello guys,

I have a BSOD with the following bugcheck:

DRIVER_POWER_STATE_FAILURE (9f)
A driver has failed to complete a power IRP within a specific time.
Arguments:
Arg1: 0000000000000004, The power transition timed out waiting to synchronize with the Pnp
	subsystem.
Arg2: 000000000000012c, Timeout in seconds.
Arg3: ffff94083ac95080, The thread currently holding on to the Pnp lock.
Arg4: ffffed066102f7e0, nt!TRIAGE_9F_PNP on Win7 and higher

If I use .thread/!thread in WinDbg after loading the dump, it shows thread ffff94083ac95080, which is the thread holding the lock.
On the other hand, if I use k, it shows the stack of the faulting thread:

 # Child-SP          RetAddr               Call Site
00 ffffed06`6102f7a8 fffff800`70e9ead6     nt!KeBugCheckEx
01 ffffed06`6102f7b0 fffff800`711ad946     nt!PnpBugcheckPowerTimeout+0x76
02 ffffed06`6102f810 fffff800`70c512f9     nt!PopBuildDeviceNotifyListWatchdog+0x16
03 ffffed06`6102f840 fffff800`70c50059     nt!KiProcessExpiredTimerList+0x169
04 ffffed06`6102f930 fffff800`70dc64be     nt!KiRetireDpcList+0x4e9
05 ffffed06`6102fb60 00000000`00000000     nt!KiIdleLoop+0x7e

Is it possible to switch to the faulting thread (and not the one holding the lock) so that .thread/!thread show info about it?

Thanks.

With 9F you need to find the thread blocking the power state change. Try !poaction and !powertriage.

Thanks. I guess that it doesn’t work with a minidump?
I have a 2 MB file, here’s what I get:

1: kd>  !poaction
Error reading PopAction

Allocated power irps (PopIrpList - fffff800710436d0)
Error resolving nt!_LIST_ENTRY...

Irp worker threads (PopIrpThreadList - fffff80071038cd0)
Error resolving nt!_LIST_ENTRY...

Error resolving nt!_POP_CURRENT_BROADCAST...

1: kd> !powertriage

System Capabilities :
GetByteFromAddress: unable to read from fffff8007106bb78
  Machine is not AOAC capable.

Power Capabilities:
Could not read PopCapabilities at fffff80071043b40

Power Action:

Error reading PopAction

Error reading value of IopRootDeviceNode (0xfffff800710609c8)
Devices with allocated Power IRPs:

***Error in InitTypeRead for Device Node

Device Tree Info: 

    !devpowerstate

    !devpowerstate Complete

Links:
!poaction
!cstriage
!pdctriage
!pdcclients
!fxdevice
!pnptriage

Perhaps I just don’t have enough information in the dump. !process 0 1 doesn’t work as well (TYPE mismatch for process object at ffff940828de5040).

Yeah, not going to work in a minidump. There’s basically nothing you can do with a minidump to debug a 9F.

1 Like