Improve Product Quality Using Windows CE Error Reporting

Download Report

Transcript Improve Product Quality Using Windows CE Error Reporting

EMB318
Improve Product Quality
Using Windows CE Error
Reporting (Watson)
James Stulz
Program Manager
Windows CE Core Tools
Microsoft Corporation
Agenda
Introduction to Window Error
Reporting (WER)
WER Infrastructure
Enable WER in your platform
Looking at WER data on your own
How to access WER data from
Microsoft
Analyze and fix crashing problems
Introduction
What is it?
Windows CE/Mobile Error Reporting a.k.a Watson,
Dr. Watson, WER, Error Reporting
New for Windows CE/Mobile 5.0
The Error Reporting Client uploads crash data
to Microsoft
Captures both System and Application level crashes
Microsoft actively utilizes Error Reporting data to
identify and prioritize crashing problems
Share the Error Reports with OEMs and ISVs
Fix problems to improve quality
Introduction
What are the benefits?
Provides actionable data for customer
reported issues with your product
Educates you about the
frequency/scale of those issues
Provides you with crash data and
ability to analyze the problem
Bug prioritization based on
report volume
Customer satisfaction and a
successful product
Introduction
Bug prioritization
‘Scale’ is critical
From desktop Windows we learned there is a large
number of crashing points of failure
Fortunately there are clear trends seen in Windows
Error Reporting:
Worst 1% of the defects = 50% of the failures!
Worst 20% of the defects = 80% of the failures
Consistent across almost all applications and
components
Consistent on a per vendor basis
Focus on the peak issues can have a big impact!
Unique Problems (Buckets)
Introduction
Privacy
The user gives permission for
the upload
User can review the contents of
the upload
All data is saved to a Microsoftmanaged and secured database
Meets Federal Trade Commission's
Safe Harbor Agreement and EU laws
Intent is fixing bugs, not to track users
Introduction
Process overview
Infrastructure
Design overview
Set Options
Registry
DW
Control Panel
File System
Read Options
Device.exe
Write
Write Options
Transfer.dll
Persistent
Memory
Read
Dump
File
MS Watson Server
Move capture
from persistent
memory to file
system
Feedback
(optional)
Launches
Send
Run
Write Dump File
Dw.exe process
Read
Options
Upload Protocol
Scheduler
Signal Transfer.dll
to run
Debug
Stub
Unhandled 2nd chance
exception
Core Logic
Exception
Handler
Consent UI
Error
Continue
App Exception
Kernel Exception
Requires reset
Kernel
Error Report
Details - text
viewer
Infrastructure
Components
Kernel components
Hd.dll
Osaxst0.dll
Driver components
Dwxfer.dll
Dwui.dll
Client app
Dw.exe
Approximate size = 110KB (ARM)
Infrastructure
Captures
Unhandled 2nd chance exceptions
3 types of captures
Standard MS minidump format
Context (4-64KB)
System (64KB-several MB)
Complete (all physical mem + 64KB)
Best fit approach depending on how
much OEM allocates dedicated
memory
We recommend 300KB RAM
Infrastructure
Consent UI – e.g. Pocket PC
Infrastructure
Headless Devices
Easy to configure
Simply exclude the UI component
Set the NoConsentRequired in the registry
Headless means no UI for users to opt-in
Is privacy an issue?
Some devices don’t have privacy issues
If so, opt-in is not an issue
WER requires users to agree to the
Privacy policy
Add the privacy policy to the User license
EULA
Shrink wrap license agreement
On host computer configuration
Infrastructure
Upload to Microsoft
Minidumps are compressed
Uploads using an HTTPS connection
Configurable
Directly thru an internet connection
Pass thru Active Sync connection
If the connection is successful
Files are deleted
If the connection is unsuccessful
Additional attempts will be made on new
connection events
Asynchronous – as connections happen
Infrastructure
Bucketing parameters
Bucketing parameters are
Application name, version, and timestamp
Module name, version, and timestamp
Offset into the module
Owner application name, version, and timestamp
Group crash dumps into buckets
Similar crashes will result in the
same bucket
After collecting so many just
increment counters
Integrate WER Into Apps
Programmatically Capture
BOOL CaptureDumpFileOnDevice(
DWORD dwProcessId,
DWORD dwThreadId,
LPCWSTR pwzExtraFilesPath
);
dwProcessId, dwThreadId
0 = current
Otherwise, provide the Id
pwzExtraFilesPath
Optional
Unique folder name (ownership changes)
Returns
TRUE = successful
FALSE = failure, check GetLastError()
Integrate WER Into Apps
Exception Handling
Handled exceptions do not trigger
the capture
Generate a dump file from within an
exception filter
EFaultRepRetVal ReportFault(
LPEXCEPTION_POINTERS pep,
DWORD dwOpt
);
pep – Pointer to an EXCEPTION_POINTER structure
dwOpt – Reserved and should be zero
Returns
frrvErrNoDW – on error
fvvrOk – successful capture
Integrate WER Into Apps
Exception Handling Example
__try
{
FunctionThatGeneratesAnException();
}
__except(ReportFault(GetExceptionInformation(),0),
EXCEPTION_EXECUTE_HANDLER)
{
SomeHandlerFunction();
}
Add WER To Your Platform
Using PB on a new platform
Add the features using Platform wizard
Using PB on an existing platform
Add features from the Catalog
Using the command line
Define the SYSGENs
Allocate dedicated memory the capture
Add WER To Your Platform
Platform Wizard
Windows CE Error Reporting checkbox
Selects all of the components
Exception Report Generator
Error Report Transfer Driver
Error Report Control Panel
Report Upload Client
Default is Client Without User Interface
Allocate the dedicated memory
Build your platform
Add WER To Your Platform
Catalog
Under CoreOS\Windows CE Devices
Add Windows CE Error Reporting
components to your platform
Exception Report Generator
Error Report Transfer Driver
Error Report Control Panel
Report Upload Client
Report Client User Interface
Allocate the dedicated memory
Build your platform
Add WER To Your Platform
Command line builds
Define the SYSGENs
SYSGEN_WATSON_DMPGEN
SYSGEN_WATSON_XFER
SYSGEN_WATSON_CTPNL
SYSGEN_WATSON_CLIENT
SYSGEN_WATSON_CLIENT_UI
Allocate the dedicated memory
Build your platform
Add WER To Your Platform
Dedicated memory
Allocate the dedicated memory
In RAM (default)
Does not persist across cold boots
Set dwNKDrWatsonSize variable in OEMInit()
e.g. for 300 KB dwNKDrWatsonSize = (300 * 1024);
In OEM defined storage
Set dwNKDrWatsonSize variable in OEMInit()
OEM must provide the following routines
RAMDrWatsonFlush(void)
RAMDrWatsonClear(void)
RAMDrWatsonRead(DWORD dwOffset, LPVOID pData,
DWORD cbSize)
RAMDrWatsonWrite(DWORD dwOffset, LPVOID pData,
DWORD cbSize)
Configurability
On device thru registry
[HKEY_LOCAL_MACHINE\System\ErrorReporting\DumpSettings]
"MaxLogFiles"=dword:00000064
"MaxDiskUsage"=dword:000e1000
"UploadClient"="\\windows\\Dw.exe"
"ExtraFilesDirectory"="\\windows\\ExtraDumpFiles"
"CabDirectory"="\\Windows\\System\\DumpFiles\\CabFiles"
"DumpDirectory"="\\Windows\\System\\DumpFiles"
"DumpEnabled"=dword:00000001
[HKEY_LOCAL_MACHINE\System\ErrorReporting\UploadSettings]
"ManifestConsent"=dword:00000001
"UploadFailedDlg"=dword:00000000
"UploadSucceededDlg"=dword:00000000
"MaxDailyReports"=dword:00000000
"MaxWeeklyReports"=dword:00000000
"DontUpload"=dword:00000000
"NoConsentRequired"=dword:00000000
Analyzing The WER Data
On the device
Lose advantages of bucketing
parameters
Dumps are stored on the device
Configure not to Upload
Move the WER data off the device
Create your own client app
Analyzing The WER Data
Thru WinQual
WinQual – Windows Quality Online
http://winqual.microsoft.com
Part of the Windows Logo Program website
You do not have to have a logo
Requirements
Code Signing VerisignID Certificate
Sign Term of Use agreement (TOU)
File mapping
Request Responses
Close the loop with customers
Analyzing The WER Data
Debugging
Platform Builder Kernel Debugger
Postmortem debugger missed Windows CE 5.0
Power tools
UIDumpView.exe
http://download.microsoft.com/download/7/8/4/78
4bf4d2-2a21-416f-b4951fd0f2340e3b/UIDumpViewer.exe
Matching binaries and sources are required
WinQual
Microsoft Symbol server
Debugging The crash
James Stulz
Program Manager
Windows CE Core Tools
Summary
WER is easy to add
WinQual gives you direct access to
your data
Fix hard to find crashing problems
Create a successful product
While at MEDC 2005…
Fill out an evaluation for this session
Randomly selected instant WIN prizes!
Visit the Microsoft Product Pavilion
in the Exhibit Hall
Shorelines B
Use real technology in a lab
Instructor led
Reef E/F & Breakers L
Self-paced
Reef B/C
After The Conference…
Build
Install
Full-featured trial versions of Windows CE
and/or Windows XP Embedded
Build
Cool stuff & tell us about it:
msdn.microsoft.com/embedded/community
Join
Windows Embedded Partner Program:
www.mswep.com
Develop
Install
Windows Mobile 5.0 Eval Kit including
Visual Studio 2005 Beta 2
Enter
Mobile2Market Contest and win up to $25000:
mobile2marketcontest.com
Join
Microsoft Solutions Partner Program:
partner.microsoft.com
Tools & Resources
Build
Develop
msdn.microsoft.com/
embedded
msdn.microsoft.com/
mobility
microsoft.public.
windowsxp.embedded
windowsce.platbuilder
windowsce.embedded.vc
microsoft.public.
pocketpc.developer
smartphone.developer
dotnet.framework.compactframework
Blogs
blogs.msdn.com/
mikehall
blogs.msdn.com/
windowsmobile
vsdteam
netcfteam
Tools
Windows CE 5.0 Eval Kit
Windows XP Embedded Eval Kit
Windows Mobile 5.0 Eval Kit
Websites
Newsgroups
© 2005 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.