Hi,
I see deadlock happening on Windows 2000 professional when our file system
filter driver is installed along with anti virus driver.
Our filter driver basically pends READ requests and gives a chance to our
appliocation running in user mode to read the file and once our application
sends the response the filter driver will either deny the read request or
send the read request to next lower driver.
This work fine on system without anti virus driver but dead locks with anti
virus driver. So we are in feeling that we need to reachitecture the driver
but we wanted to know if there is any workaround for this.
Following is the brief dump analaysis of the system when the dead lock
happened. The scenario is wmplayer is trying to play a file whose read
request is pended by our filter driver and our application is trying to read
the same file.
kd> !devstack 81779d40
!DevObj !DrvObj !DevExt ObjectName
81779d40 \FileSystem\p2pfsfd 81779df8
81b930e0 \Driver\SymEvent 81b93198
8203e020 \FileSystem\Ntfs 8203e0d8
!process 8177ad60 (wmplayer.exe)
thread 817948e0
IRP List:
8176d008: (0006,01b4) Flags: 00000900 Mdl: 81905688
8190c788: (0006,01b4) Flags: 00000884 Mdl: 00000000
ChildEBP RetAddr Args to Child
b6d683b4 80505e88 8176d008 00000000 8067eb7c nt!KiSwapThread+0xc5
b6d683dc 80592263 8176d924 00000000 00000000
nt!KeWaitForSingleObject+0x1a1
b6d68404 8057171b 81779d40 00000103 8176d8c8
nt!IopSynchronousServiceTail+0xbf
b6d684d8 8053d691 000001d4 00000000 00000000 nt!NtReadFile+0x5f4
b6d684d8 804d9255 000001d4 00000000 00000000
nt!_KiSystemService+0xc4
b6d68574 b7b3ac43 000001d4 00000000 00000000 nt!ZwReadFile+0xb
b6d685bc b7b090f6 818eef80 b7b09070 b6d6862c savrt+0x3dc43
!handle 0x1d4 3 8177ad60
file 8176d8c8, Name: \music\tpid\tpid2.mp3 {HarddiskVolume2}
!irp 8176d008
MJ_READ file 8176d8c8, pending by p2pfsfd
!irp 8190c788
MJ_CREATE file 81795328, “\music\tpid\tpid2.mp3” (no vpb)
pending by SymEvent
!process 81798d60 (DCMSimulator.exe)
thread 81778020
81902790 Mutant - owning thread 817948e0
819027b0 NotificationEvent
IRP List:
8176c608: (0006,01b4) Flags: 00000884 Mdl: 00000000
ChildEBP RetAddr Args to Child
b6c505fc 80505ba9 e4232b70 81902770 81902790 nt!KiSwapThread+0xc5
b6c50630 b7b11b1b 00000002 b6c50668 00000001
nt!KeWaitForMultipleObjects+0x266
b6c507c0 b7b7cb32 b6c50804 e12dc90c b6c50804 savrt+0x14b1b
b6c507d0 b7b832b8 b6c50804 81b930e0 b6c50804
SYMEVENT!SYMEvent_GetVMDataPtr+0x5392
b6c50820 804f7b8b 81b930e0 8176c608 8176c790
SYMEVENT!EventObjectCreate+0x3e8
b6c50910 80574945 80546400 8057441b b6c50c08 nt!IopfCallDriver+0x35
…
b6c50cf0 8056ff27 00f5cb88 c0100080 00f5cb24 nt!IoCreateFile+0x3ec
!obja 00f5cb24: ??\D:\music\tpid\tpid2.mp3
KeWaitForMultipleObjects(2, {Mutant, NotificationEvent}, WaitAny);
If anyone is interested I can send the full memory dump zipped which is
about 100 mb.
Any information is helpful.
Thanks,
Kedar.