Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


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

Paul_JacksonPaul_Jackson Member Posts: 32

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.

Comments

  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,362

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

    -scott
    OSR

  • Paul_JacksonPaul_Jackson Member Posts: 32

    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).

  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,362

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

    -scott
    OSR

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters 8 March 2021 LIVE ONLINE