Hi,
I am maintaining a legacy file system filter driver that tracks changes on some files. I am seeing a DISORDERLY_SHUTDOWN (f3) crash. I can see my driver in one of the stacks. From the dump what I am able to see is that the number of available pages is way too low. The modified page writer has gone to sleep forever. I don’t know if my driver is responsible for this but it does do certain processing on receiving IRP_MJ_SHUTDOWN. The modified page writer goes to sleep by the time file system stack receives IRP_MJ_SHUTDOWN is new to me.
- Is anyone aware of this behavior?
- I didn’t find any guidelines for file system filters during shutdown processing. Because any driver that does some processing on shutdown can cause this crash. Assuming the processing is large enough.
Posting relevant bits from the dump
!vm b
*** Virtual Memory Usage ***
Physical Memory: 1048462 ( 4193848 Kb)
Page File: ??\C:\pagefile.sys
Current: 12324920 Kb Free Space: 2428040 Kb
Minimum: 4501048 Kb Maximum: 12581544 Kb
Available Pages: 127 ( 508 Kb)
ResAvail Pages: 925356 ( 3701424 Kb)
Locked IO Pages: 0 ( 0 Kb)
Free System PTEs: 33504410 ( 134017640 Kb)
Modified Pages: 926775 ( 3707100 Kb)
Modified PF Pages: 926709 ( 3706836 Kb)
Modified No Write Pages: 69 ( 276 Kb)
NonPagedPool Usage: 72917 ( 291668 Kb)
NonPagedPool Max: 774136 ( 3096544 Kb)
PagedPool 0 Usage: 42783 ( 171132 Kb)
PagedPool 1 Usage: 111129 ( 444516 Kb)
PagedPool 2 Usage: 79403 ( 317612 Kb)
PagedPool 3 Usage: 79424 ( 317696 Kb)
PagedPool 4 Usage: 79535 ( 318140 Kb)
PagedPool Usage: 392274 ( 1569096 Kb)
PagedPool Maximum: 33554432 ( 134217728 Kb)
Session Commit: 4679 ( 18716 Kb)
Shared Commit: 7967 ( 31868 Kb)
Special Pool: 0 ( 0 Kb)
Shared Process: 3550 ( 14200 Kb)
Pages For MDLs: 82 ( 328 Kb)
Pages For AWE: 0 ( 0 Kb)
NonPagedPool Commit: 0 ( 0 Kb)
PagedPool Commit: 392338 ( 1569352 Kb)
Driver Commit: 3903 ( 15612 Kb)
Boot Commit: 0 ( 0 Kb)
System PageTables: 0 ( 0 Kb)
VAD/PageTable Bitmaps: 14 ( 56 Kb)
ProcessLockedFilePages: 0 ( 0 Kb)
Pagefile Hash Pages: 0 ( 0 Kb)
Sum System Commit: 412533 ( 1650132 Kb)
Total Private: 3013670 ( 12054680 Kb)
Misc/Transient Commit: 115428 ( 461712 Kb)
Committed pages: 3541631 ( 14166524 Kb)
Commit limit: 4129231 ( 16516924 Kb)
Memory Management Thread Stacks:
THREAD fffffa8003dcf660 Cid 0004.0058 Teb: 0000000000000000 Win32Thread: 0000000000000000 WAIT: (WrVirtualMemory) UserMode Non-Alertable
fffff80002a593e0 Semaphore Limit 0x7fffffff
fffff80002a594c0 NotificationEvent
fffff80002a595c0 NotificationEvent
fffff80002a46be0 NotificationEvent
fffff80002a46c00 SynchronizationEvent
Not impersonating
DeviceMap fffff8a000008aa0
Owning Process fffffa8003cd85f0 Image: System
Attached Process N/A Image: N/A
Wait Start TickCount 4003696 Ticks: 6185 (0:00:01:36.486)
Context Switch Count 1849835 IdealProcessor: 0
UserTime 00:00:00.000
KernelTime 00:00:55.021
Win32 Start Address nt!MiDereferenceSegmentThread (0xfffff800028e0660)
Stack Init fffff88003524c70 Current fffff880035246b0
Base fffff88003525000 Limit fffff8800351f000 Call 0
Priority 18 BasePriority 8 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5
Child-SP RetAddr : Args to Child : Call Site
fffff880035246f0 fffff80002898992 : fffffa8008dd9650 fffffa8003dcf660 fffffa8000000000 fffffa8007afa440 : nt!KiSwapContext+0x7a
fffff88003524830 fffff80002897eaa : 0000000000000010 0000000000010206 fffff88000000000 0000000000000000 : nt!KiCommitThreadWait+0x1d2
fffff880035248c0 fffff800028e06f3 : 0000000000000005 fffff88003524bc0 fffffa8000000001 fffffa8000000012 : nt!KeWaitForMultipleObjects+0x272
fffff88003524b80 fffff80002b30cce : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : nt!MiDereferenceSegmentThread+0x93
fffff88003524c00 fffff80002884fe6 : fffff80002a05e80 fffffa8003dcf660 fffff80002a13cc0 0000000000000000 : nt!PspSystemThreadStartup+0x5a
fffff88003524c40 0000000000000000 : fffff88003525000 fffff8800351f000 fffff880035246b0 0000000000000000 : nt!KiStartSystemThread+0x16
THREAD fffffa8003d90040 Cid 0004.005c Teb: 0000000000000000 Win32Thread: 0000000000000000 WAIT: (DelayExecution) KernelMode Non-Alertable
fffff80002a42520 Gate
Not impersonating
DeviceMap fffff8a000008aa0
Owning Process fffffa8003cd85f0 Image: System
Attached Process N/A Image: N/A
Wait Start TickCount 3940739 Ticks: 69142 (0:00:17:58.622)
Context Switch Count 20205 IdealProcessor: 0
UserTime 00:00:00.000
KernelTime 00:05:01.549
Win32 Start Address nt!MiModifiedPageWriter (0xfffff80002823230)
Stack Init fffff8800352bc70 Current fffff8800352b920
Base fffff8800352c000 Limit fffff88003526000 Call 0
Priority 17 BasePriority 8 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5
Child-SP RetAddr : Args to Child : Call Site
fffff8800352b960 fffff80002898992 : fffffa8003d90040 fffffa8003d90040 fffff8800352bc08 fffffa800000000f : nt!KiSwapContext+0x7a
fffff8800352baa0 fffff8000289a1a2 : 0000000000000000 fffffa80056d1490 fffffa8000000014 fffff8000285ab8b : nt!KiCommitThreadWait+0x1d2
fffff8800352bb30 fffff80002823484 : fffffa8003d90040 0000000000000000 fffffa8000002d00 0000000000000014 : nt!KeDelayExecutionThread+0x186
fffff8800352bba0 fffff80002b30cce : fffffa8003d90040 0f00000000000000 0000000000000080 0000000000000001 : nt!MiModifiedPageWriter+0x254
fffff8800352bc00 fffff80002884fe6 : fffff80002a05e80 fffffa8003d90040 fffffa8003dcf660 0000000000000000 : nt!PspSystemThreadStartup+0x5a
fffff8800352bc40 0000000000000000 : fffff8800352c000 fffff88003526000 fffff8800352b940 0000000000000000 : nt!KiStartSystemThread+0x16
Pagefile Write Log :
TPri IPri Avail PfPages MDLSize MDLPfn Status Time
TotalPagesWritten in this log is 0x0
16.1: kd> !defwrites
*** Cache Write Throttle Analysis ***
CcTotalDirtyPages: 0 ( 0 Kb)
CcDirtyPageThreshold: 131057 ( 524228 Kb)
MmAvailablePages: 127 ( 508 Kb)
MmThrottleTop: 450 ( 1800 Kb)
MmThrottleBottom: 80 ( 320 Kb)
MmModifiedPageListHead.Total: 926775 ( 3707100 Kb)
MmAvailablePages <= MmThrottleTop,
and modified page list >= 1000, writes throttled
Check these thread(s): MiModifiedPageWriter
Check system process for the Mm page writers, !vm 3
Cc Deferred Write list: (CcDeferredWrites)
File: fffffa8007fa2420 Event: fffff880030905a0
Thanks