Hi,
I have a KMDF1.5 (WDK6000) based upper volume filter and I used
WdfSpinLock to protect my device extension access.
We have been testing this filter for a long time now and it has held up
fine.
recently I encountered an OS hang a couple of times in it’s ioctl path.
I broke in using the debugger and I see a spinlock acquisition hang.
I have examined my code paths for missed unlocks but I couldn’t find
any.
I also examined the wdfspinlock “!wdfspinlock 0x520333e8e08” but it
shows that owning thread is 0x000000000000
I don’t know why this code path(shown in “kb” output) is hanging.
Please help by advicing on how I can debug this.
Thanks
Harish
PS. OS is “Windows Server 2003 Kernel Version 3790 MP (1 procs) Free
x64”
3: kd> kb
RetAddr : Args to Child
: Call Site
fffff80001051e62 : 00000520
333252a8 0000000000000005 fffffadf
ce70c8f0 00000520333e8e08 : nt!KxWaitForSpinLockAndAcquire+0x4 fffffadf
c853997c : fffffadfcccdad50 00000520
3319f9b8
0000000000070000 00000000
00000005 :
nt!KeAcquireSpinLockRaiseToDpc+0x1e
fffffadfc803b58b : fffffadf
ccc171f0 fffffadfc804f1a0 fffffadf
cccdad50 fffffadfc84e11af : Wdf01000!imp_WdfSpinLockAcquire+0x100 fffffadf
c803b27e : 00000520333e8e08 00000520
333252a8
fffffadfce70c8f0 00000000
00000005 : dtiw!WdfSpinLockAcquire+0x1b
[f:\winddk\6000\inc\wdf\kmdf\10\wdfsync.h @ 190]
fffffadfc8500291 : 00000520
3319f9b8 00000520333252a8 00000000
00000018 0000000000000000 : dtiw!dtiw_evt_handler_ioctl+0x10e [y:\src\main64\hdps\src\dtiw\kmod\dtiw.c @ 306] fffffadf
c84ff776 : 00000520333252a8 00000520
333252a8
fffffadfce70c8f0 fffffadf
cccdad50 :
Wdf01000!FxIoQueue::DispatchRequestToDriver+0x6d9
fffffadfc84fea8e : fffffadf
cce60640 0000000000000000 fffffadf
cce60600 fffffadfccef0021 : Wdf01000!FxIoQueue::DispatchEvents+0x83e fffffadf
c8505b64 : fffffadfccc8a600 fffffadf
ccc8a690
000005203319f9b8 00000520
333252a8 :
Wdf01000!FxIoQueue::QueueRequest+0x4a6
fffffadfc84e9651 : fffff800
011df70e fffffadfcccdad50 fffffadf
ccc8a690 fffffadfccd24e40 : Wdf01000!FxPkgIo::Dispatch+0x718 fffffadf
c79b9453 : 0000000100000000 fffffadf
ccc8a690
0000000000000000 00000000
00000000 : Wdf01000!FxDevice::Dispatch+0xa9
fffffadfc79b9cda : 00000000
00000000 00000000c000014f fffffadf
ccd24e40 fffffadfcc132010 : Fs_Rec!FsRecGetDeviceSectorSize+0xa3 fffff800
0108604e : fffffadfcd639e50 fffffadf
cd639ea0
000000000000000e fffffadf
cc132010 : Fs_Rec!FatRecFsControl+0x6a
fffff800012a3cac : fffffadf
c5ac3950 fffffadfccfe09d0 fffffadf
c5ac3690 fffffadfc5ac34e4 : nt!IopCheckVpbMounted+0x437 fffff800
012b5ba0 : fffffadfccfe09d0 fffffadf
ccfe0980
fffffadfc5ac3790 00000000
00000001 : nt!IopParseDevice+0x74a
fffff800012b7b47 : 00000000
00000000 fffffadfc5ac3780 00000000
00000040 0000000000000000 : nt!ObpLookupObjectName+0x923 fffff800
012bdbb4 : 0000000000000000 00000000
00000003
fffffadf00000dd0 00000000
00000000 : nt!ObOpenObjectByName+0x180
fffff800012bdd57 : fffffadf
ce6eba00 fffffadfc5ac3c70 00000000
00000000 fffffa800096b3f0 : nt!IopCreateFile+0x630 fffff800
012aca69 : 000007ff7f2025f8 fffff683
ffbf9010
0000000000000100 fffff800
01057896 : nt!IoCreateFile+0x12f
fffff8000104e37d : fffffa80
0096b3f0 0000000000000000 fffff6fb
7dbed078 0000000000000020 : nt!NtOpenFile+0x49 00000000
78ef159a : 0000000077d61b77 00000000
0016fb4d
0000000000000000 00000000
021af890 : nt!KiSystemServiceCopyEnd+0x3
3: kd> !wdfspinlock 0x520333e8e08
WDFSPINLOCK fffffadfccc171f0
Irql …: 0x0000000000000000
Owning Thread …: 0x0000000000000000
Acquired At Time Locked Duration Caller’s Address
01 0x0 0x0 @ 0000000000000000
02 0x0 0x206c644d0003000c @ 0000000000000000
03 0x60000 0xe56c694605110003 @ 0000000000000000
04 0xfffffadfcceaa1c0 0x0 @ 0000000040001000
05 0x40002 0xf800c8 @ 0001010000010000
06 0x0 0xfffffadfccc7c4c0 @ e56c694605110011
07 0x1010000010000 0x40002 @ 0000000000000000
08 0x1 0x0 @ 0000000000000000
09 0x1 0x0 @ 0000000000000000
10 0x40000000 0x2061634901060006 @ fffffadfccc17698