Hi all,
I am getting a a deadlock while saving a file in Microsoft Word 2003
SP2 to my file system. I am running on Windows XP SP2, checked build.
According to this thread, paging io writes from the MPW are allowed to
extend VDL.
In this case (see thread at end of this email), as I understand, Word
is setting the end of the file (in the debugger, stack frame 13 is
class FileEndOfFileInformation), which is beyond the current FileSize.
My driver extends FileSize and calls CcSetFileSizes().
This causes a flush in Mm, which eventually shows up as an MPW paging
io write in my driver again. I notice this is a write beyond VDL, so
I extend VDL and call CcSetFileSizes() again. This causes another
flush inside Mm, which blocks on an event I assume.
Who is suppose to signal this event? What am I doing wrong? Thanks.
Here is the Word thread that is stuck:
0 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
1 nt!KiSwapThread+0x46 (FPO: [0,0,0])
2 nt!KeWaitForSingleObject+0x22e (FPO: [Non-Fpo])
3 nt!MiFlushSectionInternal+0x1dd (FPO: [Non-Fpo])
4 nt!MmFlushSection+0x350 (FPO: [Non-Fpo])
5 nt!CcSetFileSizes+0x2dc (FPO: [Non-Fpo])
6 pifsk!PifsDispatchWrite+0x726 (FPO: [Non-Fpo]) (CONV: stdcall)
7 nt!IopfCallDriver+0x51 (FPO: [0,0,0])
8 nt!IovCallDriver+0xa0 (FPO: [Non-Fpo])
9 nt!IoSynchronousPageWrite+0xaf (FPO: [Non-Fpo])
10 nt!MiFlushSectionInternal+0x684 (FPO: [Non-Fpo])
11 nt!MmFlushSection+0x350 (FPO: [Non-Fpo])
12 nt!CcSetFileSizes+0x2dc (FPO: [Non-Fpo])
13 pifsk!PifsDispatchSetInformation+0x6e3 (FPO: [Non-Fpo]) (CONV: stdcall)
14 nt!IopfCallDriver+0x51 (FPO: [0,0,0])
15 nt!IovCallDriver+0xa0 (FPO: [Non-Fpo])
16 nt!NtSetInformationFile+0x5e7 (FPO: [Non-Fpo])
17 nt!KiFastCallEntry+0x158 (FPO: [0,3] TrapFrame @ f3984d64)
18 ntdll!KiFastSystemCallRet (FPO: [0,0,0])
(pifsk is my FSD)
=================================================
Roger Tawa
http://tawacentral.net/
[One thing about paradigms: shift happens.]
[When you stop, you’re done.]