Recently I saw a hanging problem when I install my encrypt driver
and McAfee on the same machine. I guess there is a deadlock, but
I cannot figure out how it happens.
The detail information is:
OS: Windows 7 32 bit or 64 bit
Software: Office 2010
McAfee VirusScan Enterprise 8.7i
Our Encryption Driver (nl_SysEncryption.sys and nl_SysEncryptionFW.sys)
Our User Mode Services
Step to reproduce:
Open folder “C:\temp\doc”, right click on any word file.
Result:
Windows Explorer hangs. But after about two and half minutes,
Explorer comes back.
I did some debugging, and found that two threads in explorer try to open the same file:
–> ??\C:\Users\gye\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms
One thing is suspicious in THREAD 83f6f030 is that it stops in McAfee driver mfehidk.sys.
Because our driver is lower, the request should be passed to our driver (See thread 8438ad48).
But in this thread, it doesn’t, this is abnormal.
So I check the lock, the lock is currently held by another thread 8584cb68 in process Mcshield.exe.
That thread also open the same file (??\C:\Users\gye\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms)
But I haven’t figure out why the thread 8584cb68 in process Mcshield.exe doesn’t release the lock.
There should be another lock cause the dead lock.
Do you have any suggestion?
Thanks!
<– WinDBG Information –>
THREAD 83f6f030 Cid 0a08.0ae8 Teb: 7ffd3000 Win32Thread: fe79d3b8 WAIT: (Executive) KernelMode Non-Alertable
93a17824 NotificationEvent
IRP List:
84084328: (0006,01fc) Flags: 00000884 Mdl: 00000000
Not impersonating
DeviceMap 91eac648
Owning Process 85ca8198 Image: explorer.exe
Attached Process N/A Image: N/A
Wait Start TickCount 7339 Ticks: 5071 (0:00:01:19.234)
Context Switch Count 106
UserTime 00:00:00.000
KernelTime 00:00:00.171
Win32 Start Address ntdll!TppWorkerThread (0x774dd63e)
Stack Init 93a17fd0 Current 93a176e0 Base 93a18000 Limit 93a15000 Call 0
Priority 9 BasePriority 8 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5
ChildEBP RetAddr Args to Child
93a176f8 8266eb15 83f6f030 00000000 82729d20 nt!KiSwapContext+0x26 (FPO: [Uses EBP] [0,0,4])
93a17730 8266d403 83f6f0f0 83f6f030 93a17824 nt!KiSwapThread+0x266
93a17758 826672cf 83f6f030 83f6f0f0 0000002b nt!KiCommitThreadWait+0x1df
93a177d0 8723b491 93a17824 00000000 00000000 nt!KeWaitForSingleObject+0x393
93a177fc 8723e1b7 000249f0 8409d008 8409a2d8 mfehidk+0x491
93a1786c 939c8103 93a178a4 00004e20 000249f0 mfehidk+0x31b7
93a1791c 939c5b76 84064328 851edd20 851edd94 mfeavfk+0x4103
93a17968 8724bef5 00000000 00000001 851edd94 mfeavfk+0x1b76
93a17984 87244751 00000002 851edd20 851edd94 mfehidk+0x10ef5
93a179b0 87244e91 00000002 84084500 8573d1b8 mfehidk+0x9751
93a17a48 8725fd87 00000000 84cb96f8 84cb96f8 mfehidk+0x9e91
93a17a70 8263c4bc 84cb96f8 84084328 8573d214 mfehidk!DEVICEDISPATCH::DispatchPassThrough+0x48
93a17a88 8284062d e61e130d 93a17c30 00000000 nt!IofCallDriver+0x63
93a17b60 828211d7 84dfc138 85fcf588 85b6b540 nt!IopParseDevice+0xed7
93a17bdc 8284724d 00000000 93a17c30 00000040 nt!ObpLookupObjectName+0x4fa
93a17c38 8283f5ab 03dfccfc 83fcf588 93a17c01 nt!ObOpenObjectByName+0x159
93a17cb4 8284aeb6 03dfcd2c 80000000 03dfccfc nt!IopCreateFile+0x673
93a17d00 8264342a 03dfcd2c 80000000 03dfccfc nt!NtCreateFile+0x34
(??\C:\Users\gye\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms)
93a17d00 774f64f4 03dfcd2c 80000000 03dfccfc nt!KiFastCallEntry+0x12a (FPO: [0,3] TrapFrame @ 93a17d34)
03dfcd24 00000000 00000000 00000000 00000000 ntdll!KiFastSystemCallRet (FPO: [0,0,0])
THREAD 8438ad48 Cid 0a08.0f44 Teb: 7ff9b000 Win32Thread: fe771550 WAIT: (Executive) UserMode Non-Alertable
96baac74 NotificationEvent
IRP List:
84123820: (0006,01d8) Flags: 00000884 Mdl: 00000000
840b1c20: (0006,01d8) Flags: 00000884 Mdl: 00000000
841b8e00: (0006,01fc) Flags: 00000884 Mdl: 00000000
Not impersonating
DeviceMap 91eac648
Owning Process 85ca8198 Image: explorer.exe
Attached Process N/A Image: N/A
Wait Start TickCount 11465 Ticks: 945 (0:00:00:14.765)
Context Switch Count 226 NoStackSwap
UserTime 00:00:00.000
KernelTime 00:00:00.046
Win32 Start Address ntdll!TppWorkerThread (0x774dd63e)
Stack Init 96babfd0 Current 96baab10 Base 96bac000 Limit 96ba9000 Call 0
Priority 10 BasePriority 8 UnusualBoost 0 ForegroundBoost 2 IoPriority 2 PagePriority 5
ChildEBP RetAddr Args to Child
96baab28 8266eb15 8438ad48 00000000 82729d20 nt!KiSwapContext+0x26 (FPO: [Uses EBP] [0,0,4])
96baab60 8266d403 8438ae08 8438ad48 96baac74 nt!KiSwapThread+0x266
96baab88 826672cf 8438ad48 8438ae08 00000000 nt!KiCommitThreadWait+0x1df
96baac00 86d7259a 96baac74 00000000 00000001 nt!KeWaitForSingleObject+0x393
96baac30 86d5de04 84123820 96baac70 106a970a Ntfs!NtfsWaitForCreateEvent+0x5e (FPO: [Non-Fpo])
96baad28 8263c4bc 84e25020 84123820 84123820 Ntfs!NtfsFsdCreate+0x23c (FPO: [Non-Fpo])
96baad40 86c1f20c 84123820 00000000 841239d4 nt!IofCallDriver+0x63
96baad64 86c328c9 96baad84 84f09400 00000000 fltmgr!FltpLegacyProcessingAfterPreCallbacksCompleted+0x2aa (FPO: [Non-Fpo])
96baadb0 8263c4bc 84f09400 84f49008 85789ec4 fltmgr!FltpCreate+0x2db (FPO: [Non-Fpo])
96baadc8 8284062d e305c6cd 96baaf70 00000000 nt!IofCallDriver+0x63
96baaea0 828211d7 84dfc138 87fcf588 84097440 nt!IopParseDevice+0xed7
96baaf1c 8284724d 00000000 96baaf70 00000240 nt!ObpLookupObjectName+0x4fa
96baaf78 8283f5ab 96bab170 83fcf588 00010000 nt!ObOpenObjectByName+0x159
96baaff4 82876d99 96bab190 80000000 96bab170 nt!IopCreateFile+0x673
96bab050 86c34b62 96bab190 80000000 96bab170 nt!IoCreateFileEx+0x9e
(\Device\HarddiskVolume2\Users\gye\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms)
96bab0dc 86c34c84 84d3c798 84ef3c10 96bab190 fltmgr!FltCreateFileEx2+0xba (FPO: [Non-Fpo])
96bab124 86c62177 84d3c798 84ef3c10 96bab190 fltmgr!FltCreateFile+0x38 (FPO: [Non-Fpo])
96bab194 86c643b2 84d3c798 84ef3c10 00000200 nl_SysEncryption!NLSEGetFileAttributes+0x8b (FPO: [Non-Fpo]) (CONV: stdcall)
96bab214 86c1baeb 00000a08 96bab234 96bab260 nl_SysEncryption!NLFSEOpCallbackPreCreate+0x208 (FPO: [Non-Fpo]) (CONV: stdcall)
96bab280 86c1e9f0 96bab2c4 840b1c20 00000000 fltmgr!FltpPerformPreCallbacks+0x34d (FPO: [Non-Fpo])
96bab298 86c321fe 96bab2c4 86c35f3c 00000000 fltmgr!FltpPassThroughInternal+0x40 (FPO: [Non-Fpo])
96bab2ac 86c328b7 96bab2c4 840b1c20 84121038 fltmgr!FltpCreateInternal+0x24 (FPO: [Non-Fpo])
96bab2f0 8263c4bc 84f09400 84f49008 84121094 fltmgr!FltpCreate+0x2c9 (FPO: [Non-Fpo])
96bab308 8284062d e305db8d 96bab4b0 00000000 nt!IofCallDriver+0x63
96bab3e0 828211d7 84dfc138 87fcf588 85b8da38 nt!IopParseDevice+0xed7
96bab45c 8284724d 00000000 96bab4b0 00000240 nt!ObpLookupObjectName+0x4fa
96bab4bc 8283f5ab 96bab6f4 83fcf588 96bab500 nt!ObOpenObjectByName+0x159
96bab538 82876d99 96bab718 80000000 96bab6f4 nt!IopCreateFile+0x673
96bab594 86c34b62 96bab718 80000000 96bab6f4 nt!IoCreateFileEx+0x9e
(??\C:\Users\gye\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms)
96bab620 86c34c84 84d3f840 84f09dd8 96bab718 fltmgr!FltCreateFileEx2+0xba (FPO: [Non-Fpo])
96bab668 86cb97d2 84d3f840 84f09dd8 96bab718 fltmgr!FltCreateFile+0x38 (FPO: [Non-Fpo])
96bab724 86cb8dba 00bab7b8 84f09c90 84ed4d38 nl_SysEncryptionFW!NLFSECheckFileExist+0x9c (FPO: [Non-Fpo]) (CONV: stdcall)
96bab798 86c1baeb 8418ae40 96bab7b8 96bab7e4 nl_SysEncryptionFW!NLFSEOpCallbackPreCreate+0x2f2 (FPO: [Non-Fpo]) (CONV: stdcall)
96bab804 86c1e9f0 96bab848 841b8e00 00000000 fltmgr!FltpPerformPreCallbacks+0x34d (FPO: [Non-Fpo])
96bab81c 86c321fe 96bab848 86c35f3c 00000000 fltmgr!FltpPassThroughInternal+0x40 (FPO: [Non-Fpo])
96bab830 86c328b7 96bab848 00000000 841b8e00 fltmgr!FltpCreateInternal+0x24 (FPO: [Non-Fpo])
96bab874 8263c4bc 84f09400 84f49008 96bab998 fltmgr!FltpCreate+0x2c9 (FPO: [Non-Fpo])
96bab88c 87260b2a 96bab998 842e3d20 842e3d7c nt!IofCallDriver+0x63
96bab8cc 872446ea 96bab998 841b8fd8 84e79420 mfehidk!DEVICEDISPATCH::LowerDispatchPassThrough+0x51
96bab8f0 87244e91 00000002 841b8fd8 84144578 mfehidk+0x96ea
THREAD 8584cb68 Cid 01a4.090c Teb: 7ffa9000 Win32Thread: 00000000 WAIT: (Executive) UserMode Non-Alertable
94492c74 NotificationEvent
IRP List:
85715b08: (0006,01d8) Flags: 00000884 Mdl: 00000000
85b8ad48: (0006,01d8) Flags: 00000884 Mdl: 00000000
84078008: (0006,01fc) Flags: 00000884 Mdl: 00000000
Not impersonating
DeviceMap 87c08870
Owning Process 857b2030 Image: Mcshield.exe
Attached Process N/A Image: N/A
Wait Start TickCount 7339 Ticks: 5071 (0:00:01:19.234)
Context Switch Count 1865 NoStackSwap
UserTime 00:00:00.515
KernelTime 00:00:01.484
Win32 Start Address 0x66241a8b
Stack Init 94493fd0 Current 94492b10 Base 94494000 Limit 94491000 Call 0
Priority 14 BasePriority 13 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5
ChildEBP RetAddr Args to Child
94492b28 8266eb15 8584cb68 00000000 82729d20 nt!KiSwapContext+0x26 (FPO: [Uses EBP] [0,0,4])
94492b60 8266d403 8584cc28 8584cb68 94492c74 nt!KiSwapThread+0x266
94492b88 826672cf 8584cb68 8584cc28 00000000 nt!KiCommitThreadWait+0x1df
94492c00 86d7259a 94492c74 00000000 00000001 nt!KeWaitForSingleObject+0x393
94492c30 86d5de04 85715b08 94492c70 1299170a Ntfs!NtfsWaitForCreateEvent+0x5e (FPO: [Non-Fpo])
94492d28 8263c4bc 84e25020 85715b08 85715b08 Ntfs!NtfsFsdCreate+0x23c (FPO: [Non-Fpo])
94492d40 86c1f20c 85715b08 00000000 85715cbc nt!IofCallDriver+0x63
94492d64 86c328c9 94492d84 84f09400 00000000 fltmgr!FltpLegacyProcessingAfterPreCallbacksCompleted+0x2aa (FPO: [Non-Fpo])
94492db0 8263c4bc 84f09400 84f49008 8409f3a4 fltmgr!FltpCreate+0x2db (FPO: [Non-Fpo])
94492dc8 8284062d e1f646cd 94492f70 00000000 nt!IofCallDriver+0x63
94492ea0 828211d7 84dfc138 87fcf588 840946a0 nt!IopParseDevice+0xed7
94492f1c 8284724d 00000000 94492f70 00000240 nt!ObpLookupObjectName+0x4fa
94492f78 8283f5ab 94493170 83fcf588 00010000 nt!ObOpenObjectByName+0x159
94492ff4 82876d99 94493190 80000000 94493170 nt!IopCreateFile+0x673
94493050 86c34b62 94493190 80000000 94493170 nt!IoCreateFileEx+0x9e
\Device\HarddiskVolume2\Users\gye\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms
944930dc 86c34c84 84d3c798 84ef3c10 94493190 fltmgr!FltCreateFileEx2+0xba (FPO: [Non-Fpo])
94493124 86c62177 84d3c798 84ef3c10 94493190 fltmgr!FltCreateFile+0x38 (FPO: [Non-Fpo])
94493194 86c643b2 84d3c798 84ef3c10 00000200 nl_SysEncryption!NLSEGetFileAttributes+0x8b (FPO: [Non-Fpo]) (CONV: stdcall)
94493214 86c1baeb 000001a4 94493234 94493260 nl_SysEncryption!NLFSEOpCallbackPreCreate+0x208 (FPO: [Non-Fpo]) (CONV: stdcall)
94493280 86c1e9f0 944932c4 85b8ad48 00000000 fltmgr!FltpPerformPreCallbacks+0x34d (FPO: [Non-Fpo])
94493298 86c321fe 944932c4 86c35f3c 00000000 fltmgr!FltpPassThroughInternal+0x40 (FPO: [Non-Fpo])
944932ac 86c328b7 944932c4 85b8ad48 851fe410 fltmgr!FltpCreateInternal+0x24 (FPO: [Non-Fpo])
944932f0 8263c4bc 84f09400 84f49008 851fe46c fltmgr!FltpCreate+0x2c9 (FPO: [Non-Fpo])
94493308 8284062d e1f65b8d 944934b0 00000000 nt!IofCallDriver+0x63
944933e0 828211d7 84dfc138 87fcf588 84de5008 nt!IopParseDevice+0xed7
9449345c 8284724d 00000000 944934b0 00000240 nt!ObpLookupObjectName+0x4fa
944934bc 8283f5ab 944936f4 83fcf588 94493500 nt!ObOpenObjectByName+0x159
94493538 82876d99 94493718 80000000 944936f4 nt!IopCreateFile+0x673
94493594 86c34b62 94493718 80000000 944936f4 nt!IoCreateFileEx+0x9e
(??\C:\Users\gye\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms)
94493620 86c34c84 84d3f840 84f09dd8 94493718 fltmgr!FltCreateFileEx2+0xba (FPO: [Non-Fpo])
94493668 86cb97d2 84d3f840 84f09dd8 94493718 fltmgr!FltCreateFile+0x38 (FPO: [Non-Fpo])
94493724 86cb8dba 004937b8 84f09c90 84f00b38 nl_SysEncryptionFW!NLFSECheckFileExist+0x9c (FPO: [Non-Fpo]) (CONV: stdcall)
94493798 86c1baeb 8407b640 944937b8 944937e4 nl_SysEncryptionFW!NLFSEOpCallbackPreCreate+0x2f2 (FPO: [Non-Fpo]) (CONV: stdcall)
94493804 86c1e9f0 94493848 84078008 00000000 fltmgr!FltpPerformPreCallbacks+0x34d (FPO: [Non-Fpo])
9449381c 86c321fe 94493848 86c35f3c 00000000 fltmgr!FltpPassThroughInternal+0x40 (FPO: [Non-Fpo])
94493830 86c328b7 94493848 00000000 84078008 fltmgr!FltpCreateInternal+0x24 (FPO: [Non-Fpo])
94493874 8263c4bc 84f09400 84f49008 94493998 fltmgr!FltpCreate+0x2c9 (FPO: [Non-Fpo])
9449388c 87260b2a 94493998 8407f940 8407f99c nt!IofCallDriver+0x63
944938cc 872446ea 94493998 840781e0 84e79420 mfehidk!DEVICEDISPATCH::LowerDispatchPassThrough+0x51
944938f0 87244e91 00000002 840781e0 8405f348 mfehidk+0x96ea