none
Bugcheck in WDI RRS feed

  • Question

  • Hi,

    I'm trying to write a simple WDI skeleton driver when I encountered a bugcheck:

    BugCheck DEADDEAD, {0, 0, 0, 0}
    
    Probably caused by : wdiwifi.sys ( wdiwifi!EvtDriverUnload+3d )

    The log shows the following message before crash.

    WDIWiFi: DriverEntry being unloaded earlier than expected

    The stack:

    STACK_TEXT:  
    ffffd001`511235b8 fffff802`c0035962 : 00000000`00000000 00000000`deaddead ffffd001`51123720 fffff802`bff509ec : nt!DbgBreakPointWithStatus
    ffffd001`511235c0 fffff802`c0035333 : 00000000`00000003 ffffd001`51123720 fffff802`bffc3400 00000000`deaddead : nt!KiBugCheckDebugBreak+0x12
    ffffd001`51123620 fffff802`bffb6884 : 00001ffe`03ffdd38 ffffe001`fc1b44a0 00001ffe`03ffdd38 fffff802`bfeeda81 : nt!KeBugCheck2+0x893
    ffffd001`51123d30 fffff800`4a1c89cd : 00000000`deaddead 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KeBugCheckEx+0x104
    ffffd001`51123d70 fffff800`450c43cd : ffffe001`fc1b44a0 ffffe001`f577b040 00000000`00000000 fffff802`bfeeda81 : wdiwifi!EvtDriverUnload+0x3d
    ffffd001`51123db0 fffff800`4a1e24ce : ffffe001`fc1b44a0 ffffd001`51123fe0 fffff800`465c5d78 00000000`c0000001 : Wdf01000!FxDriver::Unload+0x2142d [d:\th\minkernel\wdf\framework\shared\core\fxdriver.cpp @ 164]
    ffffd001`51123e00 fffff802`c030afc4 : ffffe001`fc1b44a0 ffffd001`51123fe0 fffff800`465c5d78 00000000`00000000 : wdiwifi!FxStubDriverUnload+0x1e
    ffffd001`51123e30 fffff802`bffc0fa3 : ffffe001`f577b040 fffff800`467ee598 00000000`00000201 ffffe001`fc1b44a0 : nt!IopUnloadDriver+0x1f8
    ffffd001`51123f60 fffff802`bffb9670 : fffff800`4662daf6 ffffe001`00000000 ffffe001`fade0180 fffff800`467ee598 : nt!KiSystemServiceCopyEnd+0x13
    ffffd001`511240f8 fffff800`4662daf6 : ffffe001`00000000 ffffe001`fade0180 fffff800`467ee598 ffffd001`51124210 : nt!KiServiceLinkage
    ffffd001`51124100 fffff800`4662de9e : ffffe001`fade0180 ffffd001`51124280 fffff800`467ee598 fffff802`00000213 : ndis!DereferenceWdi+0x82
    ffffd001`51124150 fffff800`467f2135 : 00000000`00000000 00000000`00000000 ffffe001`f80f9000 ffffd001`51124280 : ndis!NdisMRegisterWdiMiniportDriver+0x10e
    ffffd001`511241d0 fffff800`467e91a9 : ffffe001`f834d850 ffffe001`f80f9000 00000000`00000000 ffffe001`fafebe20 : tcud!DriverEntry+0x135 [c:\users\max\documents\visual studio 2015\projects\tcud\tcud\driver.c @ 41]
    ffffd001`51124330 fffff802`c02e2e03 : 00000000`00000000 ffffd001`51124460 ffffe001`f834d850 fffff802`000001c8 : tcud!FxDriverEntryWorker+0xb9 [d:\th\minkernel\wdf\framework\kmdf\src\dynamic\stub\stub.cpp @ 325]
    ffffd001`51124360 fffff802`c036d882 : 00000000`00000000 00000000`00000000 00000000`00000004 ffffc001`00000004 : nt!IopLoadDriver+0x51f
    ffffd001`51124530 fffff802`c0355d59 : ffffd001`51124a01 ffffd001`511246b8 00000000`c0000000 ffffd001`511246a4 : nt!PipCallDriverAddDeviceQueryRoutine+0x1b6
    ffffd001`511245d0 fffff802`c03557bb : 00000000`00000000 00000000`0000000a 00000000`c0000034 ffffe001`fc1b7010 : nt!PnpCallDriverQueryServiceHelper+0x9d
    ffffd001`51124640 fffff802`c02d92f9 : ffffe001`fc1b7010 ffffd001`511248e0 ffffe001`fc1b7010 00000000`00000000 : nt!PipCallDriverAddDevice+0x31f
    ffffd001`511247e0 fffff802`c0488e4e : ffffe001`fc1b7010 00000000`00000001 ffffd001`51124b19 fffff802`c02d8173 : nt!PipProcessDevNodeTree+0x1cd
    ffffd001`51124a60 fffff802`bffffc30 : 00000001`00000003 00000000`00000000 ffffe001`f7ec9648 ffffe001`f4048180 : nt!PiRestartDevice+0xba
    ffffd001`51124ab0 fffff802`bfeb6c59 : ffffe001`f577b040 fffff802`c0169ee0 fffff802`c0207340 fffff802`c0207340 : nt! ?? ::FNODOBFM::`string'+0x3ab30
    ffffd001`51124b80 fffff802`bff61b65 : 00000005`b59bbfff 00000000`00000080 ffffe001`f40a9040 ffffe001`f577b040 : nt!ExpWorkerThread+0xe9
    ffffd001`51124c10 fffff802`bffbb926 : fffff802`c0191180 ffffe001`f577b040 fffff802`bff61b24 ffffc001`0cf4dc70 : nt!PspSystemThreadStartup+0x41
    ffffd001`51124c60 00000000`00000000 : ffffd001`51125000 ffffd001`5111f000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x16

    Is there a way I can further debug this problem and get more information?

    Thanks,

    Max



    Friday, June 10, 2016 9:29 PM

Answers

  • From the all stack it looks like your driver was loaded and its DriverEntry called. Then your driver called NdisMRegisterWdiMiniportDriver and it failed, so initialization sequence of your device terminated before registering the device. The WDI framework (wdifiwi) was unhappy with that. Hope this is enough data for you to start digging.

    -- pa


    • Edited by Pavel A Friday, June 10, 2016 10:39 PM
    • Marked as answer by Meixuan Shi Friday, June 10, 2016 11:26 PM
    Friday, June 10, 2016 10:38 PM

All replies

  • From the all stack it looks like your driver was loaded and its DriverEntry called. Then your driver called NdisMRegisterWdiMiniportDriver and it failed, so initialization sequence of your device terminated before registering the device. The WDI framework (wdifiwi) was unhappy with that. Hope this is enough data for you to start digging.

    -- pa


    • Edited by Pavel A Friday, June 10, 2016 10:39 PM
    • Marked as answer by Meixuan Shi Friday, June 10, 2016 11:26 PM
    Friday, June 10, 2016 10:38 PM
  • looking at the code, this specific bugcheck occurs when wdiwfi unloads without the associated WDI unregister call being made. I don't know if ndis manages this for you or if it is your driver

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, June 10, 2016 10:52 PM
  • Thanks guys! I've located the problem.

    I had a stupid typo in the miniport characteristics initialization that assigns an incorrect ndis minor number.

    Sometimes I just wish I can get a more precise error message from a proprietary framework : )

    Thanks for the help!

    Max

    Friday, June 10, 2016 11:25 PM