Hi,

In one of our regression test, application calls the library for sendEvent,
library calls the DeviceIoControl of the driver, in some cases, it is
observed that, WDF framework is not returning to the dll.
Driver retunrs from DeviceIoControl, but the control will never come to dll.
Here is the process/thread trace from the test program after the test fails.
You can see that thread 85e009f8 has not returned from the call to
RFM2gSendEvent which called DeviceIoControl but has not returned.

--------------------------------------------------------------------------------
**** NT ACTIVE PROCESS DUMP ****
PROCESS 8629a020 SessionId: 0 Cid: 046c Peb: 7ffd8000 ParentCid: 05d4
DirBase: 233f6000 ObjectTable: e1536ce8 HandleCount: 98.
Image: ifthost32.exe
VadRoot 85f25cd0 Vads 51 Clone 0 Private 181. Modified 0. Locked 0.
DeviceMap e1637ca0
Token e1554030
ElapsedTime 00:00:36.187
UserTime 00:00:01.500
KernelTime 00:00:34.562
QuotaPoolUsage[PagedPool] 18200
QuotaPoolUsage[NonPagedPool] 18520
Working Set Sizes (now,min,max) (532, 50, 345) (2128KB, 200KB, 1380KB)
PeakWorkingSetSize 532
VirtualSize 20 Mb
PeakVirtualSize 20 Mb
PageFaultCount 529
MemoryPriority BACKGROUND
BasePriority 8
CommitCharge 231

THREAD 85e4e020 Cid 046c.0470 Teb: 7ffdf000 Win32Thread: e1830670
RUNNING on processor 2
Not impersonating
DeviceMap e1637ca0
Owning Process 8629a020 Image: ifthost32.exe
Wait Start TickCount 5972 Ticks: 0
Context Switch Count 229 LargeStack
UserTime 00:00:01.484
KernelTime 00:00:34.546
Loading symbols for 00400000 ifthost32.exe -> ifthost32.exe
*** WARNING: Unable to verify checksum for ifthost32.exe
*** ERROR: Module load completed but symbols could not be loaded for
ifthost32.exe
Win32 Start Address ifthost32 (0x00414875)
Loading symbols for 7c800000 kernel32.dll -> kernel32.dll
Start Address kernel32!BaseProcessStartThunk (0x7c810867)
Stack Init f560b000 Current f560ab3c Base f560b000 Limit f5607000
Call 0
Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
Loading symbols for 7c900000 ntdll.dll -> ntdll.dll
Loading symbols for 10000000 rfm2gdll_stdc.dll -> rfm2gdll_stdc.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for
rfm2gdll_stdc.dll -
ChildEBP RetAddr
WARNING: Frame IP not in any known module. Following frames may be wrong.
f560abe0 f71b451a 0xf71b4377
f560ac58 804e19ee 0xf71b451a
f560ac68 80674145 nt!IopfCallDriver+0x31 (FPO: [0,0,0])
f560ac28 f71b0e67 nt!IovCallDriver+0xa0 (FPO: [Non-Fpo])
f560ac58 804e19ee 0xf71b0e67
f560ac68 80674145 nt!IopfCallDriver+0x31 (FPO: [0,0,0])
f560ac58 804e19ee nt!IovCallDriver+0xa0 (FPO: [Non-Fpo])
f560ac68 80674145 nt!IopfCallDriver+0x31 (FPO: [0,0,0])
f560ac8c 8057184c nt!IovCallDriver+0xa0 (FPO: [Non-Fpo])
f560aca0 805810c7 nt!IopSynchronousServiceTail+0x60 (FPO: [Non-Fpo])
f560ad38 804ddf0f nt!NtReadFile+0x55d (FPO: [Non-Fpo])
f560ad38 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
f560ad64)
0012fda0 7c90e288 ntdll!KiFastSystemCallRet (FPO: [0,0,0])
0012fda4 7c801999 ntdll!NtReadFile+0xc (FPO: [9,0,0])
0012fe0c 10003e3e kernel32!ReadFile+0x10d (FPO: [Non-Fpo])
0012fe54 00418528 rfm2gdll_stdc!RFM2gRead+0x17e
0012ff78 0041c83d ifthost32+0x18528
0012ffc0 7c816d4f ifthost32+0x1c83d
0012fff0 00000000 kernel32!BaseProcessStart+0x23 (FPO: [Non-Fpo])

THREAD 85dfbd40 Cid 046c.0480 Teb: 7ffde000 Win32Thread: 00000000
WAIT: (UserRequest) UserMode Non-Alertable
86206160 NotificationEvent
85e4d2d8 NotificationEvent
IRP List:
8760af48: (0006,00b8) Flags: 40000070 Mdl: 00000000
Not impersonating
DeviceMap e1637ca0
Owning Process 8629a020 Image: ifthost32.exe
Wait Start TickCount 3668 Ticks: 2304 (0:00:00:36.000)
Context Switch Count 3
UserTime 00:00:00.000
KernelTime 00:00:00.000
Loading symbols for 10200000 MSVCR90D.dll -> MSVCR90D.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for
MSVCR90D.dll -
Win32 Start Address MSVCR90D!beginthreadex (0x1023dee0)
Start Address kernel32!BaseThreadStartThunk (0x7c810856)
Stack Init f57df000 Current f57de960 Base f57df000 Limit f57dc000
Call 0
Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
ChildEBP RetAddr
f57de978 804e21f3 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
f57de984 804e21a4 nt!KiSwapThread+0x6b (FPO: [0,0,0])
f57de9bc 805701b5 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
f57ded48 804ddf0f nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
f57ded48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
f57ded64)
00a3fe00 7c90e9ab ntdll!KiFastSystemCallRet (FPO: [0,0,0])
00a3fe04 7c8094f2 ntdll!ZwWaitForMultipleObjects+0xc (FPO: [5,0,0])
00a3fea0 7c809c86 kernel32!WaitForMultipleObjectsEx+0x12c (FPO:
[Non-Fpo])
00a3febc 10003080 kernel32!WaitForMultipleObjects+0x18 (FPO:
[Non-Fpo])
WARNING: Stack unwind information not available. Following frames may be
wrong.
00a3ff24 10003a7b rfm2gdll_stdc!RFM2gWaitForEvent+0x290
00a3ff6c 1023dfd3 rfm2gdll_stdc!RFM2gEnableEventCallback+0x2db
00a3ffa8 1023df69 MSVCR90D!beginthreadex+0x243
00a3ffb4 7c80b50b MSVCR90D!beginthreadex+0x1d9
00a3ffec 00000000 kernel32!BaseThreadStart+0x37 (FPO: [Non-Fpo])

THREAD 85dd48d8 Cid 046c.0484 Teb: 7ffdd000 Win32Thread: 00000000
WAIT: (UserRequest) UserMode Non-Alertable
85f310d0 NotificationEvent
85f3e828 NotificationEvent
IRP List:
86f8ef48: (0006,00b8) Flags: 40000070 Mdl: 00000000
Not impersonating
DeviceMap e1637ca0
Owning Process 8629a020 Image: ifthost32.exe
Wait Start TickCount 4533 Ticks: 1439 (0:00:00:22.484)
Context Switch Count 95
UserTime 00:00:00.000
KernelTime 00:00:00.000
Win32 Start Address MSVCR90D!beginthreadex (0x1023dee0)
Start Address kernel32!BaseThreadStartThunk (0x7c810856)
Stack Init f58ff000 Current f58fe960 Base f58ff000 Limit f58fc000
Call 0
Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
ChildEBP RetAddr
f58fe978 804e21f3 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
f58fe984 804e21a4 nt!KiSwapThread+0x6b (FPO: [0,0,0])
f58fe9bc 805701b5 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
f58fed48 804ddf0f nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
f58fed48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
f58fed64)
00b3fe00 7c90e9ab ntdll!KiFastSystemCallRet (FPO: [0,0,0])
00b3fe04 7c8094f2 ntdll!ZwWaitForMultipleObjects+0xc (FPO: [5,0,0])
00b3fea0 7c809c86 kernel32!WaitForMultipleObjectsEx+0x12c (FPO:
[Non-Fpo])
00b3febc 10003080 kernel32!WaitForMultipleObjects+0x18 (FPO:
[Non-Fpo])
WARNING: Stack unwind information not available. Following frames may be
wrong.
00b3ff24 10003a7b rfm2gdll_stdc!RFM2gWaitForEvent+0x290
00b3ff6c 1023dfd3 rfm2gdll_stdc!RFM2gEnableEventCallback+0x2db
00b3ffa8 1023df69 MSVCR90D!beginthreadex+0x243
00b3ffb4 7c80b50b MSVCR90D!beginthreadex+0x1d9
00b3ffec 00000000 kernel32!BaseThreadStart+0x37 (FPO: [Non-Fpo])

THREAD 85dd4660 Cid 046c.0498 Teb: 7ffdc000 Win32Thread: 00000000
WAIT: (UserRequest) UserMode Non-Alertable
85f310a0 NotificationEvent
861ed0b0 NotificationEvent
IRP List:
86c92f48: (0006,00b8) Flags: 40000070 Mdl: 00000000
Not impersonating
DeviceMap e1637ca0
Owning Process 8629a020 Image: ifthost32.exe
Wait Start TickCount 4544 Ticks: 1428 (0:00:00:22.312)
Context Switch Count 87
UserTime 00:00:00.000
KernelTime 00:00:00.000
Win32 Start Address MSVCR90D!beginthreadex (0x1023dee0)
Start Address kernel32!BaseThreadStartThunk (0x7c810856)
Stack Init f55d3000 Current f55d2960 Base f55d3000 Limit f55d0000
Call 0
Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
ChildEBP RetAddr
f55d2978 804e21f3 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
f55d2984 804e21a4 nt!KiSwapThread+0x6b (FPO: [0,0,0])
f55d29bc 805701b5 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
f55d2d48 804ddf0f nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
f55d2d48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
f55d2d64)
00c3fe00 7c90e9ab ntdll!KiFastSystemCallRet (FPO: [0,0,0])
00c3fe04 7c8094f2 ntdll!ZwWaitForMultipleObjects+0xc (FPO: [5,0,0])
00c3fea0 7c809c86 kernel32!WaitForMultipleObjectsEx+0x12c (FPO:
[Non-Fpo])
00c3febc 10003080 kernel32!WaitForMultipleObjects+0x18 (FPO:
[Non-Fpo])
WARNING: Stack unwind information not available. Following frames may be
wrong.
00c3ff24 10003a7b rfm2gdll_stdc!RFM2gWaitForEvent+0x290
00c3ff6c 1023dfd3 rfm2gdll_stdc!RFM2gEnableEventCallback+0x2db
00c3ffa8 1023df69 MSVCR90D!beginthreadex+0x243
00c3ffb4 7c80b50b MSVCR90D!beginthreadex+0x1d9
00c3ffec 00000000 kernel32!BaseThreadStart+0x37 (FPO: [Non-Fpo])

THREAD 85e009f8 Cid 046c.049c Teb: 7ffdb000 Win32Thread: 00000000
WAIT: (UserRequest) UserMode Non-Alertable
86202a2c NotificationEvent
Not impersonating
DeviceMap e1637ca0
Owning Process 8629a020 Image: ifthost32.exe
Wait Start TickCount 4544 Ticks: 1428 (0:00:00:22.312)
Context Switch Count 82
UserTime 00:00:00.000
KernelTime 00:00:00.000
Win32 Start Address MSVCR90D!beginthreadex (0x1023dee0)
Start Address kernel32!BaseThreadStartThunk (0x7c810856)
Stack Init f5207000 Current f5206ca0 Base f5207000 Limit f5204000
Call 0
Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
ChildEBP RetAddr
f5206cb8 804e21f3 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
f5206cc4 804e223f nt!KiSwapThread+0x6b (FPO: [0,0,0])
f5206cec 8056f2fa nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
f5206d50 804ddf0f nt!NtWaitForSingleObject+0x9a (FPO: [Non-Fpo])
f5206d50 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
f5206d64)
00d3fd80 7c90e9c0 ntdll!KiFastSystemCallRet (FPO: [0,0,0])
00d3fd84 7c801737 ntdll!ZwWaitForSingleObject+0xc (FPO: [3,0,0])
00d3fdc8 10003604 kernel32!DeviceIoControl+0xef (FPO: [Non-Fpo])
WARNING: Stack unwind information not available. Following frames may be
wrong.
00d3fe20 0041928b rfm2gdll_stdc!RFM2gSendEvent+0x104
00d3ff28 10003a9e ifthost32+0x1928b
00d3ff6c 1023dfd3 rfm2gdll_stdc!RFM2gEnableEventCallback+0x2fe
00d3ffa8 1023df69 MSVCR90D!beginthreadex+0x243
00d3ffb4 7c80b50b MSVCR90D!beginthreadex+0x1d9
00d3ffec 00000000 kernel32!BaseThreadStart+0x37 (FPO: [Non-Fpo])

THREAD 85e00780 Cid 046c.04a0 Teb: 7ffda000 Win32Thread: 00000000
WAIT: (UserRequest) UserMode Non-Alertable
85f24bd8 NotificationEvent
86377158 NotificationEvent
IRP List:
870d2f48: (0006,00b8) Flags: 40000070 Mdl: 00000000
Not impersonating
DeviceMap e1637ca0
Owning Process 8629a020 Image: ifthost32.exe
Wait Start TickCount 4476 Ticks: 1496 (0:00:00:23.375)
Context Switch Count 92
UserTime 00:00:00.000
KernelTime 00:00:00.000
Win32 Start Address MSVCR90D!beginthreadex (0x1023dee0)
Start Address kernel32!BaseThreadStartThunk (0x7c810856)
Stack Init f51ff000 Current f51fe960 Base f51ff000 Limit f51fc000
Call 0
Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
ChildEBP RetAddr
f51fe978 804e21f3 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
f51fe984 804e21a4 nt!KiSwapThread+0x6b (FPO: [0,0,0])
f51fe9bc 805701b5 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
f51fed48 804ddf0f nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
f51fed48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
f51fed64)
00e3fe00 7c90e9ab ntdll!KiFastSystemCallRet (FPO: [0,0,0])
00e3fe04 7c8094f2 ntdll!ZwWaitForMultipleObjects+0xc (FPO: [5,0,0])
00e3fea0 7c809c86 kernel32!WaitForMultipleObjectsEx+0x12c (FPO:
[Non-Fpo])
00e3febc 10003080 kernel32!WaitForMultipleObjects+0x18 (FPO:
[Non-Fpo])
WARNING: Stack unwind information not available. Following frames may be
wrong.
00e3ff24 10003a7b rfm2gdll_stdc!RFM2gWaitForEvent+0x290
00e3ff6c 1023dfd3 rfm2gdll_stdc!RFM2gEnableEventCallback+0x2db
00e3ffa8 1023df69 MSVCR90D!beginthreadex+0x243
00e3ffb4 7c80b50b MSVCR90D!beginthreadex+0x1d9
00e3ffec 00000000 kernel32!BaseThreadStart+0x37 (FPO: [Non-Fpo])

Thanks,
Kota

Re: WDF framework DeviceIoControl is not returning to user application by Pavel

Pavel
Wed Jul 30 02:58:11 CDT 2008

Congratulations, another bug caught [in your driver, not in WDF].
Now fix it :)

--PA


kota wrote:
> Hi,
>
> In one of our regression test, application calls the library for sendEvent,
> library calls the DeviceIoControl of the driver, in some cases, it is
> observed that, WDF framework is not returning to the dll.
> Driver retunrs from DeviceIoControl, but the control will never come to dll.
> Here is the process/thread trace from the test program after the test fails.
> You can see that thread 85e009f8 has not returned from the call to
> RFM2gSendEvent which called DeviceIoControl but has not returned.
>
> --------------------------------------------------------------------------------
> **** NT ACTIVE PROCESS DUMP ****
> PROCESS 8629a020 SessionId: 0 Cid: 046c Peb: 7ffd8000 ParentCid: 05d4
> DirBase: 233f6000 ObjectTable: e1536ce8 HandleCount: 98.
> Image: ifthost32.exe
> VadRoot 85f25cd0 Vads 51 Clone 0 Private 181. Modified 0. Locked 0.
> DeviceMap e1637ca0
> Token e1554030
> ElapsedTime 00:00:36.187
> UserTime 00:00:01.500
> KernelTime 00:00:34.562
> QuotaPoolUsage[PagedPool] 18200
> QuotaPoolUsage[NonPagedPool] 18520
> Working Set Sizes (now,min,max) (532, 50, 345) (2128KB, 200KB, 1380KB)
> PeakWorkingSetSize 532
> VirtualSize 20 Mb
> PeakVirtualSize 20 Mb
> PageFaultCount 529
> MemoryPriority BACKGROUND
> BasePriority 8
> CommitCharge 231
>
> THREAD 85e4e020 Cid 046c.0470 Teb: 7ffdf000 Win32Thread: e1830670
> RUNNING on processor 2
> Not impersonating
> DeviceMap e1637ca0
> Owning Process 8629a020 Image: ifthost32.exe
> Wait Start TickCount 5972 Ticks: 0
> Context Switch Count 229 LargeStack
> UserTime 00:00:01.484
> KernelTime 00:00:34.546
> Loading symbols for 00400000 ifthost32.exe -> ifthost32.exe
> *** WARNING: Unable to verify checksum for ifthost32.exe
> *** ERROR: Module load completed but symbols could not be loaded for
> ifthost32.exe
> Win32 Start Address ifthost32 (0x00414875)
> Loading symbols for 7c800000 kernel32.dll -> kernel32.dll
> Start Address kernel32!BaseProcessStartThunk (0x7c810867)
> Stack Init f560b000 Current f560ab3c Base f560b000 Limit f5607000
> Call 0
> Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
> Loading symbols for 7c900000 ntdll.dll -> ntdll.dll
> Loading symbols for 10000000 rfm2gdll_stdc.dll -> rfm2gdll_stdc.dll
> *** ERROR: Symbol file could not be found. Defaulted to export symbols for
> rfm2gdll_stdc.dll -
> ChildEBP RetAddr
> WARNING: Frame IP not in any known module. Following frames may be wrong.
> f560abe0 f71b451a 0xf71b4377
> f560ac58 804e19ee 0xf71b451a
> f560ac68 80674145 nt!IopfCallDriver+0x31 (FPO: [0,0,0])
> f560ac28 f71b0e67 nt!IovCallDriver+0xa0 (FPO: [Non-Fpo])
> f560ac58 804e19ee 0xf71b0e67
> f560ac68 80674145 nt!IopfCallDriver+0x31 (FPO: [0,0,0])
> f560ac58 804e19ee nt!IovCallDriver+0xa0 (FPO: [Non-Fpo])
> f560ac68 80674145 nt!IopfCallDriver+0x31 (FPO: [0,0,0])
> f560ac8c 8057184c nt!IovCallDriver+0xa0 (FPO: [Non-Fpo])
> f560aca0 805810c7 nt!IopSynchronousServiceTail+0x60 (FPO: [Non-Fpo])
> f560ad38 804ddf0f nt!NtReadFile+0x55d (FPO: [Non-Fpo])
> f560ad38 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
> f560ad64)
> 0012fda0 7c90e288 ntdll!KiFastSystemCallRet (FPO: [0,0,0])
> 0012fda4 7c801999 ntdll!NtReadFile+0xc (FPO: [9,0,0])
> 0012fe0c 10003e3e kernel32!ReadFile+0x10d (FPO: [Non-Fpo])
> 0012fe54 00418528 rfm2gdll_stdc!RFM2gRead+0x17e
> 0012ff78 0041c83d ifthost32+0x18528
> 0012ffc0 7c816d4f ifthost32+0x1c83d
> 0012fff0 00000000 kernel32!BaseProcessStart+0x23 (FPO: [Non-Fpo])
>
> THREAD 85dfbd40 Cid 046c.0480 Teb: 7ffde000 Win32Thread: 00000000
> WAIT: (UserRequest) UserMode Non-Alertable
> 86206160 NotificationEvent
> 85e4d2d8 NotificationEvent
> IRP List:
> 8760af48: (0006,00b8) Flags: 40000070 Mdl: 00000000
> Not impersonating
> DeviceMap e1637ca0
> Owning Process 8629a020 Image: ifthost32.exe
> Wait Start TickCount 3668 Ticks: 2304 (0:00:00:36.000)
> Context Switch Count 3
> UserTime 00:00:00.000
> KernelTime 00:00:00.000
> Loading symbols for 10200000 MSVCR90D.dll -> MSVCR90D.dll
> *** ERROR: Symbol file could not be found. Defaulted to export symbols for
> MSVCR90D.dll -
> Win32 Start Address MSVCR90D!beginthreadex (0x1023dee0)
> Start Address kernel32!BaseThreadStartThunk (0x7c810856)
> Stack Init f57df000 Current f57de960 Base f57df000 Limit f57dc000
> Call 0
> Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
> ChildEBP RetAddr
> f57de978 804e21f3 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
> f57de984 804e21a4 nt!KiSwapThread+0x6b (FPO: [0,0,0])
> f57de9bc 805701b5 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
> f57ded48 804ddf0f nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
> f57ded48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
> f57ded64)
> 00a3fe00 7c90e9ab ntdll!KiFastSystemCallRet (FPO: [0,0,0])
> 00a3fe04 7c8094f2 ntdll!ZwWaitForMultipleObjects+0xc (FPO: [5,0,0])
> 00a3fea0 7c809c86 kernel32!WaitForMultipleObjectsEx+0x12c (FPO:
> [Non-Fpo])
> 00a3febc 10003080 kernel32!WaitForMultipleObjects+0x18 (FPO:
> [Non-Fpo])
> WARNING: Stack unwind information not available. Following frames may be
> wrong.
> 00a3ff24 10003a7b rfm2gdll_stdc!RFM2gWaitForEvent+0x290
> 00a3ff6c 1023dfd3 rfm2gdll_stdc!RFM2gEnableEventCallback+0x2db
> 00a3ffa8 1023df69 MSVCR90D!beginthreadex+0x243
> 00a3ffb4 7c80b50b MSVCR90D!beginthreadex+0x1d9
> 00a3ffec 00000000 kernel32!BaseThreadStart+0x37 (FPO: [Non-Fpo])
>
> THREAD 85dd48d8 Cid 046c.0484 Teb: 7ffdd000 Win32Thread: 00000000
> WAIT: (UserRequest) UserMode Non-Alertable
> 85f310d0 NotificationEvent
> 85f3e828 NotificationEvent
> IRP List:
> 86f8ef48: (0006,00b8) Flags: 40000070 Mdl: 00000000
> Not impersonating
> DeviceMap e1637ca0
> Owning Process 8629a020 Image: ifthost32.exe
> Wait Start TickCount 4533 Ticks: 1439 (0:00:00:22.484)
> Context Switch Count 95
> UserTime 00:00:00.000
> KernelTime 00:00:00.000
> Win32 Start Address MSVCR90D!beginthreadex (0x1023dee0)
> Start Address kernel32!BaseThreadStartThunk (0x7c810856)
> Stack Init f58ff000 Current f58fe960 Base f58ff000 Limit f58fc000
> Call 0
> Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
> ChildEBP RetAddr
> f58fe978 804e21f3 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
> f58fe984 804e21a4 nt!KiSwapThread+0x6b (FPO: [0,0,0])
> f58fe9bc 805701b5 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
> f58fed48 804ddf0f nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
> f58fed48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
> f58fed64)
> 00b3fe00 7c90e9ab ntdll!KiFastSystemCallRet (FPO: [0,0,0])
> 00b3fe04 7c8094f2 ntdll!ZwWaitForMultipleObjects+0xc (FPO: [5,0,0])
> 00b3fea0 7c809c86 kernel32!WaitForMultipleObjectsEx+0x12c (FPO:
> [Non-Fpo])
> 00b3febc 10003080 kernel32!WaitForMultipleObjects+0x18 (FPO:
> [Non-Fpo])
> WARNING: Stack unwind information not available. Following frames may be
> wrong.
> 00b3ff24 10003a7b rfm2gdll_stdc!RFM2gWaitForEvent+0x290
> 00b3ff6c 1023dfd3 rfm2gdll_stdc!RFM2gEnableEventCallback+0x2db
> 00b3ffa8 1023df69 MSVCR90D!beginthreadex+0x243
> 00b3ffb4 7c80b50b MSVCR90D!beginthreadex+0x1d9
> 00b3ffec 00000000 kernel32!BaseThreadStart+0x37 (FPO: [Non-Fpo])
>
> THREAD 85dd4660 Cid 046c.0498 Teb: 7ffdc000 Win32Thread: 00000000
> WAIT: (UserRequest) UserMode Non-Alertable
> 85f310a0 NotificationEvent
> 861ed0b0 NotificationEvent
> IRP List:
> 86c92f48: (0006,00b8) Flags: 40000070 Mdl: 00000000
> Not impersonating
> DeviceMap e1637ca0
> Owning Process 8629a020 Image: ifthost32.exe
> Wait Start TickCount 4544 Ticks: 1428 (0:00:00:22.312)
> Context Switch Count 87
> UserTime 00:00:00.000
> KernelTime 00:00:00.000
> Win32 Start Address MSVCR90D!beginthreadex (0x1023dee0)
> Start Address kernel32!BaseThreadStartThunk (0x7c810856)
> Stack Init f55d3000 Current f55d2960 Base f55d3000 Limit f55d0000
> Call 0
> Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
> ChildEBP RetAddr
> f55d2978 804e21f3 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
> f55d2984 804e21a4 nt!KiSwapThread+0x6b (FPO: [0,0,0])
> f55d29bc 805701b5 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
> f55d2d48 804ddf0f nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
> f55d2d48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
> f55d2d64)
> 00c3fe00 7c90e9ab ntdll!KiFastSystemCallRet (FPO: [0,0,0])
> 00c3fe04 7c8094f2 ntdll!ZwWaitForMultipleObjects+0xc (FPO: [5,0,0])
> 00c3fea0 7c809c86 kernel32!WaitForMultipleObjectsEx+0x12c (FPO:
> [Non-Fpo])
> 00c3febc 10003080 kernel32!WaitForMultipleObjects+0x18 (FPO:
> [Non-Fpo])
> WARNING: Stack unwind information not available. Following frames may be
> wrong.
> 00c3ff24 10003a7b rfm2gdll_stdc!RFM2gWaitForEvent+0x290
> 00c3ff6c 1023dfd3 rfm2gdll_stdc!RFM2gEnableEventCallback+0x2db
> 00c3ffa8 1023df69 MSVCR90D!beginthreadex+0x243
> 00c3ffb4 7c80b50b MSVCR90D!beginthreadex+0x1d9
> 00c3ffec 00000000 kernel32!BaseThreadStart+0x37 (FPO: [Non-Fpo])
>
> THREAD 85e009f8 Cid 046c.049c Teb: 7ffdb000 Win32Thread: 00000000
> WAIT: (UserRequest) UserMode Non-Alertable
> 86202a2c NotificationEvent
> Not impersonating
> DeviceMap e1637ca0
> Owning Process 8629a020 Image: ifthost32.exe
> Wait Start TickCount 4544 Ticks: 1428 (0:00:00:22.312)
> Context Switch Count 82
> UserTime 00:00:00.000
> KernelTime 00:00:00.000
> Win32 Start Address MSVCR90D!beginthreadex (0x1023dee0)
> Start Address kernel32!BaseThreadStartThunk (0x7c810856)
> Stack Init f5207000 Current f5206ca0 Base f5207000 Limit f5204000
> Call 0
> Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
> ChildEBP RetAddr
> f5206cb8 804e21f3 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
> f5206cc4 804e223f nt!KiSwapThread+0x6b (FPO: [0,0,0])
> f5206cec 8056f2fa nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
> f5206d50 804ddf0f nt!NtWaitForSingleObject+0x9a (FPO: [Non-Fpo])
> f5206d50 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
> f5206d64)
> 00d3fd80 7c90e9c0 ntdll!KiFastSystemCallRet (FPO: [0,0,0])
> 00d3fd84 7c801737 ntdll!ZwWaitForSingleObject+0xc (FPO: [3,0,0])
> 00d3fdc8 10003604 kernel32!DeviceIoControl+0xef (FPO: [Non-Fpo])
> WARNING: Stack unwind information not available. Following frames may be
> wrong.
> 00d3fe20 0041928b rfm2gdll_stdc!RFM2gSendEvent+0x104
> 00d3ff28 10003a9e ifthost32+0x1928b
> 00d3ff6c 1023dfd3 rfm2gdll_stdc!RFM2gEnableEventCallback+0x2fe
> 00d3ffa8 1023df69 MSVCR90D!beginthreadex+0x243
> 00d3ffb4 7c80b50b MSVCR90D!beginthreadex+0x1d9
> 00d3ffec 00000000 kernel32!BaseThreadStart+0x37 (FPO: [Non-Fpo])
>
> THREAD 85e00780 Cid 046c.04a0 Teb: 7ffda000 Win32Thread: 00000000
> WAIT: (UserRequest) UserMode Non-Alertable
> 85f24bd8 NotificationEvent
> 86377158 NotificationEvent
> IRP List:
> 870d2f48: (0006,00b8) Flags: 40000070 Mdl: 00000000
> Not impersonating
> DeviceMap e1637ca0
> Owning Process 8629a020 Image: ifthost32.exe
> Wait Start TickCount 4476 Ticks: 1496 (0:00:00:23.375)
> Context Switch Count 92
> UserTime 00:00:00.000
> KernelTime 00:00:00.000
> Win32 Start Address MSVCR90D!beginthreadex (0x1023dee0)
> Start Address kernel32!BaseThreadStartThunk (0x7c810856)
> Stack Init f51ff000 Current f51fe960 Base f51ff000 Limit f51fc000
> Call 0
> Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 16
> ChildEBP RetAddr
> f51fe978 804e21f3 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
> f51fe984 804e21a4 nt!KiSwapThread+0x6b (FPO: [0,0,0])
> f51fe9bc 805701b5 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
> f51fed48 804ddf0f nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
> f51fed48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @
> f51fed64)
> 00e3fe00 7c90e9ab ntdll!KiFastSystemCallRet (FPO: [0,0,0])
> 00e3fe04 7c8094f2 ntdll!ZwWaitForMultipleObjects+0xc (FPO: [5,0,0])
> 00e3fea0 7c809c86 kernel32!WaitForMultipleObjectsEx+0x12c (FPO:
> [Non-Fpo])
> 00e3febc 10003080 kernel32!WaitForMultipleObjects+0x18 (FPO:
> [Non-Fpo])
> WARNING: Stack unwind information not available. Following frames may be
> wrong.
> 00e3ff24 10003a7b rfm2gdll_stdc!RFM2gWaitForEvent+0x290
> 00e3ff6c 1023dfd3 rfm2gdll_stdc!RFM2gEnableEventCallback+0x2db
> 00e3ffa8 1023df69 MSVCR90D!beginthreadex+0x243
> 00e3ffb4 7c80b50b MSVCR90D!beginthreadex+0x1d9
> 00e3ffec 00000000 kernel32!BaseThreadStart+0x37 (FPO: [Non-Fpo])
>
> Thanks,
> Kota

Re: WDF framework DeviceIoControl is not returning to user application by Tim

Tim
Thu Jul 31 01:35:09 CDT 2008

kota <kota@discussions.microsoft.com> wrote:
>
>In one of our regression test, application calls the library for sendEvent,
>library calls the DeviceIoControl of the driver, in some cases, it is
>observed that, WDF framework is not returning to the dll.
>Driver retunrs from DeviceIoControl, but the control will never come to dll.

Before you returned from DeviceIoControl, did you remember to call
WdfRequestComplete? In ALL the paths?
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: WDF framework DeviceIoControl is not returning to user applica by kota

kota
Thu Jul 31 01:50:01 CDT 2008

Yes, I have taken care in all conditions, it is happening only very few times
<10 times out of 8000 tests.

Thanks,
Kota

"Tim Roberts" wrote:

> kota <kota@discussions.microsoft.com> wrote:
> >
> >In one of our regression test, application calls the library for sendEvent,
> >library calls the DeviceIoControl of the driver, in some cases, it is
> >observed that, WDF framework is not returning to the dll.
> >Driver retunrs from DeviceIoControl, but the control will never come to dll.
>
> Before you returned from DeviceIoControl, did you remember to call
> WdfRequestComplete? In ALL the paths?
> --
> Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.
>