CcSetFileSizes raising an exception...

Hi All,

Sorry for the verbose question. I have searched the archives looking for
any assistance and only came up with some closely related problems that
didn’t give me any help with regards to my problem…

So I have a problem in my FileSystem (not a filter), where calling
CcSetFileSizes is causing an exception to be raised, which happens to
be: exception 0xc000009a or STATUS_INSUFFICIENT_RESOURCES (This is the
first I have seen this situation), and the platform is WindowsXP SP2.

My SEH is handling this error, but the CacheManagers view of the
FileSizes has gone from ~110.2GBytes down to 4096 bytes. I was actually
trying to set a size of 178.7GBytes within a FastIO write. The next time
I do a buffered write (via the FastIO path again) and extend the
filesize I am getting a panic in the CacheManager:

The CacheManagers view of the FileSizes/SharedCacheMap at the time of
the panic:

0: kd> dt nt!_SHARED_CACHE_MAP 0x855a0cc0
+0x000 NodeTypeCode : 767
+0x002 NodeByteSize : 304
+0x004 OpenCount : 1
+0x008 FileSize : _LARGE_INTEGER 0x1000 ???
+0x010 BcbList : _LIST_ENTRY [0x855a0cd0 - 0x855a0cd0]
+0x018 SectionSize : _LARGE_INTEGER 0x100000
+0x020 ValidDataLength : _LARGE_INTEGER 0x1000 ???
+0x028 ValidDataGoal : _LARGE_INTEGER 0x1000 ???
+0x030 InitialVacbs : [4] (null)
+0x040 Vacbs : 0x855a0cf0 -> (null)
+0x044 FileObject : 0x856832c0
+0x048 ActiveVacb : (null)
+0x04c NeedToZero : (null)
+0x050 ActivePage : 0
+0x054 NeedToZeroPage : 0
+0x058 ActiveVacbSpinLock : 0
+0x05c VacbActiveCount : 1
+0x060 DirtyPages : 0
+0x064 SharedCacheMapLinks : _LIST_ENTRY [0x855bb06c - 0x8558b5bc]
+0x06c Flags : 0x400
+0x070 Status : 0
+0x074 Mbcb : 0x85c01be8
+0x078 Section : 0xe2462300
+0x07c CreateEvent : (null)
+0x080 WaitOnActiveCount : (null)
+0x084 PagesToWrite : 1
+0x088 BeyondLastFlush : 0
+0x090 Callbacks : 0xa6f8f5a8
+0x094 LazyWriteContext : 0x85576770
+0x098 PrivateList : _LIST_ENTRY [0x855a0de4 - 0x855a0de4]
+0x0a0 LogHandle : (null)
+0x0a4 FlushToLsnRoutine : (null)
+0x0a8 DirtyPageThreshold : 0
+0x0ac LazyWritePassCount : 1
+0x0b0 UninitializeEvent : (null)
+0x0b4 NeedToZeroVacb : (null)
+0x0b8 BcbSpinLock : 0
+0x0bc Reserved : (null)
+0x0c0 Event : _KEVENT
+0x0d0 VacbPushLock : _EX_PUSH_LOCK
+0x0d8 PrivateCacheMap : _PRIVATE_CACHE_MAP

Other interesting info the whole file had been flushed, and when the
FastIO write came along (which raised) started a process of acquiring
the PagingIO resource for flushing…

The bugcheck is:

* Bugcheck
Analysis *

An attempt was made to access a pageable (or completely invalid) address
at an
interrupt request level (IRQL) that is too high. This is usually
caused by drivers using improper addresses.
If a kernel debugger is available get the stack backtrace.
Arg1: 00000003, memory referenced
Arg2: 00000002, IRQL
Arg3: 00000001, value 0 = read operation, 1 = write operation
Arg4: 804ebf12, address which referenced memory

Debugging Details:



804ebf12 890a mov [edx],ecx



LAST_CONTROL_TRANSFER: from 804f8800 to 804ebf12

TRAP_FRAME: a5cf86d0 – (.trap ffffffffa5cf86d0)
ErrCode = 00000002
eax=85c01150 ebx=855a0cc0 ecx=00023d7e edx=00000003 esi=855a0d90
eip=804ebf12 esp=a5cf8744 ebp=a5cf8754 iopl=0 nv up ei pl nz na
pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
804ebf12 890a mov [edx],ecx
Resetting default scope

a5cf8754 804f8800 005a0cc0 7318d600 00000029 nt!CcGetVirtualAddress+0x9d
a5cf87e4 804f8a78 855a0cc0 10047000 a5cf8828 nt!CcMapAndCopy+0xee
a5cf8874 a6e7d98e 856832c0 a5cf889c 00005044 nt!CcCopyWrite+0x2a6

Note: My FileSize are all equal so I always set AllocationSize ==
FileSize == ValidDataLength in both the Fcb and when calling

Any assistance as to why the CacheManager is crashing would be greatly

Thanks in Advance,

Ian Costello