No need for verifier.exe to investigate such a break - windbg is the appropriate tool for this.
Follow the advice from the !analyze text:
Arg4: 0000000000000003, total # of (paged+nonpaged) allocations that weren’t freed.
Type !verifier 3 drivername.sys for info on the allocations
that were leaked that caused the bugcheck.
i.e. run “!verifier 3 drvhookcsmf_amd64.sys”. That will display the address of the 3 leaked pool blocks, their size, pool tags and the address inside your driver where ExAllocatePool was called. Hopefully that will be enough to figure out who is leaking.
If that’s not enough, and you are using Vista or a newer Windows version, “!verifier 0x80 ADDRESS” might be able to find more information about the leaked pool blocks. ADDRESS is one of the three leaked addresses that “!verifier 3” displayed at the first step.
Dan
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@grammatech.com
Sent: Wednesday, October 14, 2009 11:48 AM
To: Windows File Systems Devs Interest List
Subject: RE:[ntfsd] FltMgr.sys pool usage
Thanks for your replies. I am running verifier, which bugchecks c4.
I knew it would, since the reparse sample I based my code on mentioned the filename buffer replacement method would cause a false positive leak except on Windows7.
I am not clear on how to use verifier to monitor/check for pool leaks. Is one supposed to do this via the verifier’s Display information about the currently-verified drivers -> monitoring global counters functionality?
Unfortunately, my driver loads, does its job, then unloads, and there is not time to run a UI in between to see anything before the unload/bug check.
I am looking at the crash dump file using windbg. Is there any way to get the pool info out of a crash dump or log file? I broke down the null modem cable/debugger setup months ago and no longer work in the same office, so setting it back up again would be a pain (there’s no host computer next to it).
Also, how does one figure out the address to use for !fltkd.streamlist fffff9800413ee90 1f ??
Thanks for your help!
–Tim
Here is the dump:
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************
DRIVER_VERIFIER_DETECTED_VIOLATION (c4)
A device driver attempting to corrupt the system has been caught. This is
because the driver was specified in the registry as being suspect (by the
administrator) and the kernel has enabled substantial checking of this driver.
If the driver attempts to corrupt the system, bugchecks 0xC4, 0xC1 and 0xA will
be among the most commonly seen crashes.
Arguments:
Arg1: 0000000000000062, A driver has forgotten to free its pool allocations prior to unloading.
Arg2: fffffadf3a5ce100, name of the driver having the issue.
Arg3: fffffadf3a5ce060, verifier internal structure with driver information.
Arg4: 0000000000000003, total # of (paged+nonpaged) allocations that weren’t freed.
Type !verifier 3 drivername.sys for info on the allocations
that were leaked that caused the bugcheck.
Debugging Details:
*** WARNING: Unable to verify timestamp for drvhookcsmf_amd64.sys
*** ERROR: Module load completed but symbols could not be loaded for drvhookcsmf_amd64.sys
BUGCHECK_STR: 0xc4_62
VERIFIER_DRIVER_ENTRY: dt nt!_MI_VERIFIER_DRIVER_ENTRY fffffadf3a5ce060
+0x000 Links : _LIST_ENTRY [0xfffff800011dac50 - 0xfffffadf
3a5ce140]
+0x010 Loads : 1
+0x014 Unloads : 0
+0x018 BaseName : _UNICODE_STRING “drvhookcsmf_amd64.sys”
+0x028 StartAddress : 0xfffffadf1b4fa000 +0x030 EndAddress : 0xfffffadf
1b508000
+0x038 Flags : 1
+0x040 Signature : 0x98761940
+0x050 PoolPageHeaders : _SLIST_HEADER
+0x060 PoolTrackers : _SLIST_HEADER
+0x070 CurrentPagedPoolAllocations : 3
+0x074 CurrentNonPagedPoolAllocations : 0
+0x078 PeakPagedPoolAllocations : 6
+0x07c PeakNonPagedPoolAllocations : 1
+0x080 PagedBytes : 0x1bc
+0x088 NonPagedBytes : 0
+0x090 PeakPagedBytes : 0x3dc
+0x098 PeakNonPagedBytes : 0x94
IMAGE_NAME: drvhookcsmf_amd64.sys
DEBUG_FLR_IMAGE_TIMESTAMP: 4a1182e0
MODULE_NAME: drvhookcsmf_amd64
FAULTING_MODULE: fffffadf1b4fa000 drvhookcsmf_amd64
CUSTOMER_CRASH_COUNT: 1
DEFAULT_BUCKET_ID: DRIVER_FAULT
PROCESS_NAME: services.exe
CURRENT_IRQL: 0
LAST_CONTROL_TRANSFER: from fffff800013e1b23 to fffff8000102e890
STACK_TEXT:
fffffadf1c901698 fffff800
013e1b23 : 00000000000000c4 00000000
00000062 fffffadf3a5ce100 fffffadf
3a5ce060 : nt!KeBugCheckEx
fffffadf1c9016a0 fffff800
0135b694 : 0000007ffffffff8 fffffadf
388e72e0 fffffadf376dbdf0 00000000
00000000 : nt!MiVerifyingDriverUnloading+0x159
fffffadf1c9016e0 fffff800
0131dc6c : fffffadf37673570 fffffadf
376735a0 fffffadf376735a0 fffffadf
376735a0 : nt!MmUnloadSystemImage+0x257
fffffadf1c901750 fffff800
01283eb0 : fffffadf37673570 fffffadf
376735a0 fffffadf37673550 00000000
00000000 : nt!IopDeleteDriver+0x4c
fffffadf1c901790 fffff800
0103c2ae : fffffadf37673570 fffffadf
1c901a00 fffffadf376735a0 00000000
00000000 : nt!ObpRemoveObjectRoutine+0x14f
fffffadf1c901800 fffff800
0131e828 : fffffadf376735a0 fffffadf
376735a0 0000000000000000 fffffadf
37673608 : nt!ObfDereferenceObject+0x83
fffffadf1c901830 fffff800
0102e33d : fffffadf388e72e0 00000000
00000000 0000000000000000 00000000
00000000 : nt!IopUnloadDriver+0x3b7
fffffadf1c901980 fffff800
0102e800 : fffff8000131e575 00000000
0278f0d0 fffffadf1c901cf0 00000000
00000000 : nt!KiSystemServiceCopyEnd+0x3
fffffadf1c901b18 fffff800
0131e575 : 000000000278f0d0 fffffadf
1c901cf0 0000000000000000 00000000
00000000 : nt!KiServiceLinkage
fffffadf1c901b20 fffff800
0102e33d : fffffadf388e72e0 00000000
00a60c50 0000000000000000 00000000
00000001 : nt!IopUnloadDriver+0x104
fffffadf1c901c70 00000000
77ef1bfa : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : nt!KiSystemServiceCopyEnd+0x3
000000000278f0a8 00000000
00000000 : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : 0x77ef1bfa
STACK_COMMAND: kb
FOLLOWUP_NAME: MachineOwner
FAILURE_BUCKET_ID: X64_0xc4_62_IMAGE_drvhookcsmf_amd64.sys_DATE_2009_05_18
BUCKET_ID: X64_0xc4_62_IMAGE_drvhookcsmf_amd64.sys_DATE_2009_05_18
Followup: MachineOwner
NTFSD is sponsored by OSR
For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer