I was referring to dbghelp.dll now windbg.dll, sorry for the typo.
Your logger ID is:
Logger Id: 0x2
On the debugger box.
!wmitrace.help gives all the options.
!wmitrace.searchpath to set the path to the tmf files.
!wmitrace.logger 2 gives you info about your trace session
!wmitrace.strdump 2 gives info about the trace info strucs
So once you start tracing with tracelog, you don’t need to use traceview
at all.
Check info about WPP/ETW tracing on MSDN.
The crash with traceview could be that traceview is not using 3k buffers
when starting the session. In the output from tracelog below it should
work Buffer Size: 3 kb.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Voeller
Sent: Tuesday, February 06, 2007 1:23 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Tracing - WPP, ETW, TraceView, WinDbg
I still have the crash in TraceView.
* I have WinDbg version 6.6.0007.5 on both my target and host PC.
* I am using TraceView.exe version 2.1.1 Copyright 2005 from WDK RTM
6000.
(Note that I had the same version on my target as my host but the file
size
was different so I made sure to copy everything from
C:\WINDDK\6000\tools\tracing\i386 to my target box).
* I could not find a “windbg.dll” file anywhere on both my target and
host
PC.
* I ran tracelog -start MySession -guid
#635CC065-EFCD-4593-84E6-BC1354963E8F -flags ff -level 5 -f MyLog.etl
-kd
This resulted in the command line output:
Logger Started…
Enablling trace to logger 2
Operation Status: 0L The operation completed successfully.
Logger Name: MySession
Logger Id: 0x2
Logger Thread Id: 00000F10
Guid:
635CC065-EFCD-4593-84E6-BC1354963E8F
Buffer Size: 3 kb
Maximum Buffers: 25
Minimum Buffers: 3
Number of Bufferes: 3
Free Buffers: 2
Buffers Written: 1
Events Lost: 0
Log Buffers Lost: 0
Real Time Buffers Lost: 0
AgeLimit: 15
ClockType: SystemTime
Log Mode: Sequential
Kd Filter mode enabled
Maximum File Size: not set
Buffer Flush Timer: not set
Enabled tracing: 0x00000001
Log Filename: blah blah MyLog.etl
I loaded the wmitrace “!load wmitrace.dll” but that was as far as I got
with
the command line option to send trace output to WinDbg.
* I enabled tracing using the latest version of TraceView and had a very
similar crash as the previous times.
kd> !analyze -v
********************************************
*
*
* Bugcheck Analysis *
*
*
********************************************
DRIVER_IRQL_NOT_LESS_OR_EQUAL (d1)
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 kernel debugger is available get stack backtrace.
Arguments:
Arg1: 8069e000, memory referenced
Arg2: 00000002, IRQL
Arg3: 00000000, value 0 = read operation, 1 = write operation
Arg4: f7988098, address which referenced memory
Debugging Details:
READ_ADDRESS: 8069e000
CURRENT_IRQL: 2
FAULTING_IP:
kdcom!KdpComputeChecksum+12
f7988098 0fb631 movzx esi,byte ptr [ecx]
DEFAULT_BUCKET_ID: DRIVER_FAULT
BUGCHECK_STR: 0xD1
PROCESS_NAME: System
TRAP_FRAME: b9ff7b90 – (.trap ffffffffb9ff7b90)
ErrCode = 00000003
eax=00000004 ebx=85a04bf8 ecx=00000001 edx=00000002 esi=b9ff7c3c
edi=8069b000
eip=8053af55 esp=b9ff7c04 ebp=b9ff7c60 iopl=0 nv up di pl nz na
po
nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
efl=00010002
nt!MmDbgCopyMemory+0x38a:
8053af55 f3a5 rep movs dword ptr es:[edi],dword ptr [esi]
es:0023:8069b000=50524920 ds:0023:b9ff7c3c=ffffffff
Resetting default scope
EXCEPTION_RECORD: b9ff761c – (.exr ffffffffb9ff761c)
ExceptionAddress: 804e3b25 (nt!RtlpBreakWithStatusInstruction)
ExceptionCode: 80000003 (Break instruction exception)
ExceptionFlags: 00000000
NumberParameters: 3
Parameter[0]: 00000000
Parameter[1]: 8050589d
Parameter[2]: 0000006a
LAST_CONTROL_TRANSFER: from 805328e7 to 804e3b25
STACK_TEXT:
b9ff6b58 805328e7 00000003 b9ff6eb4 00000000
nt!RtlpBreakWithStatusInstruction
b9ff6ba4 805333be 00000003 8069e000 f7988098
nt!KiBugCheckDebugBreak+0x19
b9ff6f84 804e2158 0000000a 8069e000 00000002 nt!KeBugCheck2+0x574
b9ff6f84 f7988098 0000000a 8069e000 00000002 nt!KiTrap0E+0x233
b9ff701c f7988262 80691918 0000fffc ffdff13c
kdcom!KdpComputeChecksum+0x12
b9ff704c 8067cf12 00000007 b9ff71e0 b9ff71d8 kdcom!KdSendPacket+0x24
b9ff70c8 8067d0bd 00000007 b9ff71e0 b9ff71d8
nt!KdpSendWaitContinue+0x2e0
b9ff71e8 805325a4 b9ff761c ffdff13c 00000000
nt!KdpReportExceptionStateChange+0x8a
b9ff7208 8067e137 b9ff7670 00000000 b9ff7600 nt!KdpReport+0x60
b9ff7234 804fa243 b9ff7670 00000000 b9ff761c nt!KdpTrap+0x108
b9ff7600 804dfada b9ff761c 00000000 b9ff7670
nt!KiDispatchException+0x129
b9ff7668 804e0208 b9ff772c 804e3b26 badb0d00
nt!CommonDispatchException+0x4d
b9ff7668 804e3b26 b9ff772c 804e3b26 badb0d00 nt!KiTrap03+0xad
b9ff76e0 805328e7 00000003 b9ff7a3c 00000000
nt!RtlpBreakWithStatusInstruction+0x1
b9ff772c 805333be 00000003 c0300804 81800000
nt!KiBugCheckDebugBreak+0x19
b9ff7b0c 805339ae 000000be 8069b000 0069b121 nt!KeBugCheck2+0x574
b9ff7b2c 805246fb 000000be 8069b000 0069b121 nt!KeBugCheckEx+0x1b
b9ff7b78 804e1ff1 00000001 8069b000 00000000 nt!MmAccessFault+0x6f5
b9ff7b78 8053af55 00000001 8069b000 00000000 nt!KiTrap0E+0xcc
b9ff7c60 8067d6bc 85a04bf8 00000000 8069b000 nt!MmDbgCopyMemory+0x38a
b9ff7c88 8067c504 85a04bf8 00000000 8069b000 nt!KdpCopyMemoryChunks+0x68
b9ff7d00 8067cc1c b9ff7d0c 0000ffff 859f9000 nt!KdpSendTraceData+0x28
b9ff7d14 8067a1fb 859f9001 00000000 85ac5010 nt!KdReportTraceData+0x41
b9ff7d58 806408a0 00000000 859f9000 00000000 nt!WmipFlushBuffer+0x336
b9ff7d80 80640ac9 85ac5054 00000001 00000000
nt!WmipFlushActiveBuffers+0x18d
b9ff7dac 8057dfed 00000001 00000000 00000000 nt!WmipLogger+0x16f
b9ff7ddc 804fa477 8064095a 85ac5000 00000000
nt!PspSystemThreadStartup+0x34
00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16
STACK_COMMAND: kb
FOLLOWUP_IP:
kdcom!KdpComputeChecksum+12
f7988098 0fb631 movzx esi,byte ptr [ecx]
SYMBOL_STACK_INDEX: 4
SYMBOL_NAME: kdcom!KdpComputeChecksum+12
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: kdcom
IMAGE_NAME: kd1394.dll
DEBUG_FLR_IMAGE_TIMESTAMP: 41107b3a
FAILURE_BUCKET_ID: 0xD1_VRF_kdcom!KdpComputeChecksum+12
BUCKET_ID: 0xD1_VRF_kdcom!KdpComputeChecksum+12
Followup: MachineOwner
“Jose Sua” wrote in message
news:xxxxx@ntdev…
You can enable trace with the command line tools available in the
WDK/DDK:
I would recommend using the latest traceview part of the WDK and if that
fails let me know. You must also have the windbg.dll from the debugger
for traceview to work fine.
Tracelog (part of the WDK/DDK) take a look at the documentation on
MSDN. You can also use logman which is a tool part of the OS.
Fist case:
Start Tracing
Tracelog -start sessionname -guid #theProviderGuidInyourComponent -flags
yourflags -level levelIfUsed -f logfile.etl
Then run your scenario
Stop tracing.
tracelog -stop sessionname
You need the TMF files to view the events
Tracepdb -f yourdriver.pdb // this is a tool that extracts the tmf
files
tracefmt -display -p . logfile.etl // this tool will show you the
events and save them to a file.
The windbg scenario.
Enable tracing on your target machine using tracelog like above, but you
need to add the -kd obtion.
Then on your windbg kd machine, you need to use the wmitrace extension
which is part of the debugger to view the events.
!wmitrace.help to see the options.
But you must locate your trace session, which is provided when you ran
tracelog on the target machiene. Then you can see the trace buffers of
that session on the debugger.
In your debugger machine you need to have a copy of the tmf files
generated from tracepdb and your driver pdb file so that the extension
can decode the events.
!wmitrace extension should work on xp with the latest updates.
Thanks,
Jose Sua
Microsoft Corporation
This posting is provided “AS IS” with no warranties and confers no
rights.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Voeller
Sent: Tuesday, February 06, 2007 8:42 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracing - WPP, ETW, TraceView, WinDbg
I have a KMDF USB driver that includes WPP tracing. The target box is
XP
sp2. I have the driver code setup so that I can switch between WPP
tracing
for driver release and Debug Tracing for development. I’ve been using
Debug
Tracing for all of my diagnostics but I thought I would give WPP tracing
a
try. I’m thinking that if I deploy a release version of the driver and
there is a problem, my first attempt at fixing the problem will be to
enable
tracing at the customer’s site using a “ctl” file and then look at the
resulting “etl” output once the problem has been recorded. My second
attempt at fixing the problem will be to have the entire PC sent back in
which case I would like to connect to the box with firewire/WinDbg and
view
the trace output.
I wanted to test these situations so I built the driver with WPP
enabled.
For the second case where I connect to the target with WinDbg, the only
way
I could find from the docs to get trace output to WinDbg is to use
TraceView
(or command line equivalent) to start a trace session and enable trace
output to WinDbg as well as TraceView. I’ve tried this 2 times and
always
get the crash shown below.
Question 1: Is there another way to enable trace output to WinDbg
besides
using TraceView?
Question 2: Is this crash a legitimate bug?
LAST_CONTROL_TRANSFER: from 805328e7 to 804e3b25
STACK_TEXT:
ba12eb58 805328e7 00000003 ba12eeb4 00000000
nt!RtlpBreakWithStatusInstruction
ba12eba4 805333be 00000003 8069e000 f7988098
nt!KiBugCheckDebugBreak+0x19
ba12ef84 804e2158 0000000a 8069e000 00000002 nt!KeBugCheck2+0x574
ba12ef84 f7988098 0000000a 8069e000 00000002 nt!KiTrap0E+0x233
ba12f01c f7988262 80691918 0000fffc ffdff13c
kdcom!KdpComputeChecksum+0x12
ba12f04c 8067cf12 00000007 ba12f1e0 ba12f1d8 kdcom!KdSendPacket+0x24
ba12f0c8 8067d0bd 00000007 ba12f1e0 ba12f1d8
nt!KdpSendWaitContinue+0x2e0
ba12f1e8 805325a4 ba12f61c ffdff13c 00000000
nt!KdpReportExceptionStateChange+0x8a
ba12f208 8067e137 ba12f670 00000000 ba12f600 nt!KdpReport+0x60
ba12f234 804fa243 ba12f670 00000000 ba12f61c nt!KdpTrap+0x108
ba12f600 804dfada ba12f61c 00000000 ba12f670
nt!KiDispatchException+0x129
ba12f668 804e0208 ba12f72c 804e3b26 badb0d00
nt!CommonDispatchException+0x4d
ba12f668 804e3b26 ba12f72c 804e3b26 badb0d00 nt!KiTrap03+0xad
ba12f6e0 805328e7 00000003 ba12fa3c 00000000
nt!RtlpBreakWithStatusInstruction+0x1
ba12f72c 805333be 00000003 c0300804 81800000
nt!KiBugCheckDebugBreak+0x19
ba12fb0c 805339ae 000000be 8069b000 0069b121 nt!KeBugCheck2+0x574
ba12fb2c 805246fb 000000be 8069b000 0069b121 nt!KeBugCheckEx+0x1b
ba12fb78 804e1ff1 00000001 8069b000 00000000 nt!MmAccessFault+0x6f5
ba12fb78 8053af55 00000001 8069b000 00000000 nt!KiTrap0E+0xcc
ba12fc60 8067d6bc 85fc1bf8 00000000 8069b000 nt!MmDbgCopyMemory+0x38a
ba12fc88 8067c504 85fc1bf8 00000000 8069b000 nt!KdpCopyMemoryChunks+0x68
ba12fd00 8067cc1c ba12fd0c 0000ffff 85fb6000 nt!KdpSendTraceData+0x28
ba12fd14 8067a1fb 85fb6001 00000000 86152010 nt!KdReportTraceData+0x41
ba12fd58 806408a0 00000000 85fb6000 00000000 nt!WmipFlushBuffer+0x336
ba12fd80 80640ac9 86152054 00000001 00000000
nt!WmipFlushActiveBuffers+0x18d
ba12fdac 8057dfed 00000001 00000000 00000000 nt!WmipLogger+0x16f
ba12fddc 804fa477 8064095a 86152000 00000000
nt!PspSystemThreadStartup+0x34
00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16
STACK_COMMAND: kb
FOLLOWUP_IP:
kdcom!KdpComputeChecksum+12
f7988098 0fb631 movzx esi,byte ptr [ecx]
SYMBOL_STACK_INDEX: 4
SYMBOL_NAME: kdcom!KdpComputeChecksum+12
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: kdcom
IMAGE_NAME: kd1394.dll
DEBUG_FLR_IMAGE_TIMESTAMP: 41107b3a
FAILURE_BUCKET_ID: 0xD1_VRF_kdcom!KdpComputeChecksum+12
BUCKET_ID: 0xD1_VRF_kdcom!KdpComputeChecksum+12
Followup: MachineOwner
---------
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer