none
WHCK Test of "PC/SC Smartcard Reader Driver" always cause an BlueScreen issue when Run the "Surprise Removal test ". RRS feed

  • 问题

  • Hi All,

    I am now developping a "Smartcard Reader Driver". the reader is PC/SC Reader by PNP-SerialExternal,support T0/T1 ISO card.
    and i am doing the WHCK Test.
    Now except the "Surprise Removal test", all of the other test cases are passed.

    when Run the "Surprise Removal test ", it is always failed because of the blue screen issue.

    According the description of the test case below:
    ------------------
    This test uninstalls the test filter driver (msdmfilt.sys) as an upper filter on devices specified using the DQ parameter. 
    This test filter gets installed as part of running tests in this test category
    ------------------
    The Surprise Removal test encompasses IRP_MN_SURPRISE_REMOVAL followed by IRP_MN_REMOVE_DEVICE.
    As with the previous tests, the test application will attempt to add an upper filter to the target device stack and then restart the stack. 
    If this attempt is not successful, the test restarts the computer.
    When triggered by the test application, the filter driver will cause the system to send an IRP_MN_SURPRISE_REMOVAL to the device stack, 
    followed by an IRP_MN_REMOVE_DEVICE. The filter driver will assert that both of these IRPs are completed successfully by lower drivers.
    After the surprise removal test is complete, the device will be uninstalled and reenumerated, also removing the filter driver from the stack.
    -----------------

    I noticed that the WHCK  test app first run the uninstall(or disable?) my reader driver without reboot Client, 
    but in fact in the device manager i only see the Smart card is uninstalled but out reader is still show.

    I am sure the WHCK  test app has add the msdmfilt.sys as an upper filter to my reader driver device stack, and start the stack successful.
    the device stack is below:
    "
    DriverVerify
    SCFilter
    DriverVerify
    msdmfilt.sys
    DriverVerify
    MyReaderDriver
    DriverVerify
    SERENUM
    DriverVerify
    "
    Secondly the WHCK reload my driver.(My log showed : "Driver Verifier: Enabled for MyReaderDriver.sys, flags 0x209bb, build 9600, key enexYrARonnOk93lXJ69HG")
    and after a while(it run the smard card reader call back of below:RDF_CARD_POWER, RDF_TRANSMIT,RDF_SET_PROTOCOL,and so on) 
    the bule screen issue showed. 

    I got the MEMORY.DMP file and use the Windbg, got below details:

    RetAddr           : Args to Child                                                           : Call Site
    fffff803`c71634e9 : 00000000`0000000a ffffcf80`9c9e2b18 00000000`00000002 00000000`00000000 : nt!KeBugCheckEx
    fffff803`c7161d3a : 00000000`00000000 ffffcf80`9ae72c20 ffffd000`2128e100 fffff800`c22d37ce : nt!setjmpex+0x37d9
    fffff800`c2470ce1 : 00000000`00000000 ffffcf80`9ae72c20 ffffd000`2128e299 fffff803`c769cec9 : nt!setjmpex+0x202a
    *** ERROR: Module load completed but symbols could not be loaded for Wdf01000.sys
    fffff800`c2434a18 : 00000000`00000000 ffffe001`1da5bf20 00000000`00000000 fffff803`c7241cd0 : Wdf01000+0x42ce1
    *** ERROR: Module load completed but symbols could not be loaded for VerifierExt.sys
    fffff800`c22cc45a : 00000000`00020000 ffffd000`2128e410 ffffcf80`9cd8aa60 fffff800`c2434240 : Wdf01000+0x6a18
    fffff803`c7680911 : ffffcf80`9cd8aa60 00000000`00000002 ffffe001`1f025d70 00000000`00000001 : VerifierExt+0xb45a
    fffff803`c769cec9 : ffffcf80`9cd8aa60 ffffe001`1f236040 00000000`00000002 ffffe001`1d2d1930 : nt!MmIsDriverSuspectForVerifier+0x26c5
    fffff803`c7680911 : ffffe001`1f236190 ffffcf80`9cd8aa60 fffff803`c7127af8 00000000`00080000 : nt!IoIsValidIrpStatus+0x199dd
    fffff800`c22c7989 : ffffcf80`9cd8aa60 fffff800`c49a3781 fffff803`c7127af8 ffffe001`1d4b7800 : nt!MmIsDriverSuspectForVerifier+0x26c5
    *** ERROR: Module load completed but symbols could not be loaded for MSDMFilt.sys
    fffff800`c49a3781 : ffffcf80`9cd8aa60 ffffe001`1ebd7040 00000000`00000000 ffffe001`1ebd7190 : VerifierExt+0x6989
    fffff800`c22cc45a : ffffe001`1ebd7040 ffffd000`2128e5d0 ffffcf80`9cd8aa60 fffff800`c49a3624 : MSDMFilt+0x3781
    fffff803`c7680911 : ffffcf80`9cd8aa60 00000000`00000002 ffffe001`1d3541d0 fffff800`c22d37ce : VerifierExt+0xb45a
    fffff803`c769cec9 : ffffcf80`9cd8aa60 ffffe001`1f9976b0 00000000`00000002 ffffe001`1d898e70 : nt!MmIsDriverSuspectForVerifier+0x26c5
    fffff803`c7680911 : ffffe001`1f997800 ffffcf80`9cd8aa60 fffff803`c7127af8 fffff803`c70e0d10 : nt!IoIsValidIrpStatus+0x199dd
    fffff800`c22c7989 : ffffcf80`9cd8aa60 fffff800`c24388fa fffff803`c7127af8 ffffe001`1f512f40 : nt!MmIsDriverSuspectForVerifier+0x26c5
    fffff800`c24388fa : 00000000`00000000 ffffd000`2128e7c9 ffffcf80`9bb40f30 fffff803`c70b733f : VerifierExt+0x6989
    fffff800`c2434a18 : fffff803`00000000 ffffe001`1da5bf20 00000000`00000000 fffff803`c7241cd0 : Wdf01000+0xa8fa
    fffff800`c22cc45a : 00000000`00020000 ffffd000`2128e940 ffffcf80`9cd8aa60 fffff800`c2434240 : Wdf01000+0x6a18
    fffff803`c7680911 : ffffcf80`9cd8aa60 00000000`00000002 ffffe001`1ef97260 fffff803`c74462d5 : VerifierExt+0xb45a
    fffff803`c769cec9 : ffffcf80`9cd8aa60 ffffe001`1d277040 00000000`00000002 ffffe001`1d87fb90 : nt!MmIsDriverSuspectForVerifier+0x26c5
    fffff803`c7680911 : ffffe001`1d277190 ffffcf80`9cd8aa60 ffffe001`1da5bf20 fffff803`c705dd29 : nt!IoIsValidIrpStatus+0x199dd
    fffff803`c7446349 : ffffcf80`9cd8aa60 ffffe001`1f6b1900 00000000`00000000 ffffe001`1d8aacb0 : nt!MmIsDriverSuspectForVerifier+0x26c5
    fffff803`c74453a3 : ffffe001`1bee37a0 ffffd000`2128eb99 00000000`00000000 00000000`00000000 : nt!NtClose+0x1169
    fffff803`c71631b3 : ffffe001`1f6b2080 0000000f`b6da8ee0 00000000`00000000 0000000f`b6f32710 : nt!NtClose+0x1c3
    00007ff9`0f4d0d3a : 00007ff9`0c8f14db 00000000`00000000 0000000f`b6da8ee0 00007ff9`01be32b0 : nt!setjmpex+0x34a3
    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for KERNELBASE.dll - 
    00007ff9`0c8f14db : 00000000`00000000 0000000f`b6da8ee0 00007ff9`01be32b0 0000000f`b6da8ee0 : ntdll!NtClose+0xa
    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for scardsvr.dll - 
    00007ff9`01be332b : 0000000f`b6e3f9b0 0000000f`00000001 00000000`00000001 0000000f`b6da8f18 : KERNELBASE!CloseHandle+0x1b
    00007ff9`01bdd6bb : 0000000f`b6da8f18 00000000`00000000 00000000`000003c4 00007ff9`01bd7850 : scardsvr!CalaisMain+0xb4db
    00007ff9`01bd87d1 : 00007ff9`01bfb068 0000000f`b6da89e0 0000000f`b6e3fb99 00000000`00000000 : scardsvr!CalaisMain+0x586b
    00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : scardsvr!CalaisMain+0x981

    now I was puzzled about this issue, because it is out of MyReaderDriver.sys.
    I need pass the WHCK Test.

    Anyone can give me any help?

    Thanks,
    Thanks,
    Thanks!

    2015-12-11 ShangHai.

    2015年12月11日 2:57

答案

全部回复