emb318 improve product quality using windows ce error reporting (watson) james stulz program manager...
TRANSCRIPT
EMB318EMB318
Improve Product Quality Improve Product Quality Using Windows CE Error Using Windows CE Error Reporting (Watson)Reporting (Watson)
James StulzJames StulzProgram ManagerProgram ManagerWindows CE Core ToolsWindows CE Core ToolsMicrosoft CorporationMicrosoft Corporation
AgendaAgenda
Introduction to Window Error Introduction to Window Error Reporting (WER)Reporting (WER)
WER InfrastructureWER Infrastructure
Enable WER in your platformEnable WER in your platform
Looking at WER data on your ownLooking at WER data on your own
How How to access WER data from to access WER data from Microsoft Microsoft
Analyze and fix crashing problemsAnalyze and fix crashing problems
Introduction Introduction What is it?What is it?
Windows CE/Mobile Error Reporting a.k.a Watson, Windows CE/Mobile Error Reporting a.k.a Watson, Dr. Watson, WER, Error ReportingDr. Watson, WER, Error Reporting
New for Windows CE/Mobile 5.0 New for Windows CE/Mobile 5.0
The Error Reporting Client uploads crash data The Error Reporting Client uploads crash data to Microsoftto Microsoft
Captures both System and Application level crashesCaptures both System and Application level crashes
Microsoft actively utilizes Error Reporting data to Microsoft actively utilizes Error Reporting data to identify and prioritize crashing problemsidentify and prioritize crashing problems
Share the Error Reports with OEMs and ISVsShare the Error Reports with OEMs and ISVs
Fix problems to improve qualityFix problems to improve quality
IntroductionIntroductionWhat are the benefits?What are the benefits?
Provides actionable data for customer Provides actionable data for customer reported issues with your productreported issues with your productEducates you about the Educates you about the frequency/scale of those issuesfrequency/scale of those issuesProvides you with crash data and Provides you with crash data and ability to analyze the problemability to analyze the problem Bug prioritization based on Bug prioritization based on report volumereport volumeCustomer satisfaction and a Customer satisfaction and a successful productsuccessful product
IntroductionIntroductionBug prioritizationBug prioritization
‘‘Scale’ is criticalScale’ is critical
From desktop Windows we learned there is a From desktop Windows we learned there is a large number of crashing points of failurelarge number of crashing points of failure
Fortunately there are clear trends seen in Windows Fortunately there are clear trends seen in Windows Error Reporting:Error Reporting:
Worst 1% of the defects = 50% of the failures!Worst 1% of the defects = 50% of the failures!
Worst 20% of the defects = 80% of the failuresWorst 20% of the defects = 80% of the failures
Consistent across almost all applications and Consistent across almost all applications and componentscomponents
Consistent on a per vendor basisConsistent on a per vendor basis
Focus on the peak issues can have a big impact!Focus on the peak issues can have a big impact!
Unique Problems (Buckets)Unique Problems (Buckets)
IntroductionIntroductionPrivacyPrivacy
The user gives permission for The user gives permission for the uploadthe upload
User can review the contents of User can review the contents of the uploadthe upload
All data is saved to a Microsoft-All data is saved to a Microsoft-managed and secured databasemanaged and secured database
Meets Federal Trade Commission's Meets Federal Trade Commission's Safe Harbor Agreement and EU lawsSafe Harbor Agreement and EU laws
Intent is fixing bugs, not to track usersIntent is fixing bugs, not to track users
IntroductionIntroductionProcess overview Process overview
InfrastructureInfrastructureDesign overviewDesign overview
Unhandled 2nd chance exception
Kernel
Exception HandlerDebug
Stub
Persistent Memory
Write Dump File
Scheduler
Signal Transfer.dll to run
Error
File System
Consent UI
Upload Protocol
MS Watson Server
Continue
Requires reset
Kernel Exception
App Exception
Feedback(optional)
Send
Dw.exe process
Core Logic
Error Report Details - text
viewer
Device.exe
Transfer.dll
Read Dump File
Write
Move capture from persistent memory to file
system
Launches
Run
DW Control Panel
RegistrySet Options
Read Options
Read Options
Write Options
InfrastructureInfrastructureComponentsComponents
Kernel componentsKernel componentsHd.dllHd.dll
Osaxst0.dllOsaxst0.dll
Driver componentsDriver componentsDwxfer.dllDwxfer.dll
Dwui.dllDwui.dll
Client appClient appDw.exe Dw.exe
Approximate size = 110KB (ARM)Approximate size = 110KB (ARM)
Infrastructure Infrastructure CapturesCaptures
Unhandled 2Unhandled 2ndnd chance exceptions chance exceptions3 types of captures3 types of captures
Standard MS minidump formatStandard MS minidump formatContext (4-64KB)Context (4-64KB)System (64KB-several MB)System (64KB-several MB)Complete (all physical mem + 64KB)Complete (all physical mem + 64KB)
Best fit approach depending on how Best fit approach depending on how much OEM allocates dedicated much OEM allocates dedicated memorymemory
We recommend 300KB RAMWe recommend 300KB RAM
Infrastructure Infrastructure Consent UI – e.g. Pocket PCConsent UI – e.g. Pocket PC
Infrastructure Infrastructure Headless DevicesHeadless Devices
Easy to configureEasy to configureSimply exclude the UI componentSimply exclude the UI componentSet the NoConsentRequired in the registrySet the NoConsentRequired in the registry
Headless means no UI for users to opt-inHeadless means no UI for users to opt-inIs privacy an issue?Is privacy an issue?
Some devices don’t have privacy issuesSome devices don’t have privacy issuesIf so, opt-in is not an issue If so, opt-in is not an issue
WER requires users to agree to the WER requires users to agree to the Privacy policyPrivacy policy
Add the privacy policy to the User licenseAdd the privacy policy to the User licenseEULAEULAShrink wrap license agreement Shrink wrap license agreement
On host computer configuration On host computer configuration
InfrastructureInfrastructureUpload to MicrosoftUpload to Microsoft
Minidumps are compressedMinidumps are compressedUploads using an HTTPS connectionUploads using an HTTPS connection
ConfigurableConfigurableDirectly thru an internet connectionDirectly thru an internet connectionPass thru Active Sync connectionPass thru Active Sync connection
If the connection is successful If the connection is successful Files are deletedFiles are deleted
If the connection is unsuccessfulIf the connection is unsuccessfulAdditional attempts will be made on new Additional attempts will be made on new connection eventsconnection events
Asynchronous – as connections happenAsynchronous – as connections happen
InfrastructureInfrastructureBucketing parametersBucketing parameters
Bucketing parameters areBucketing parameters areApplication name, version, and timestamp Application name, version, and timestamp
Module name, version, and timestamp Module name, version, and timestamp
Offset into the module Offset into the module
Owner application name, version, and timestampOwner application name, version, and timestamp
Group crash dumps into bucketsGroup crash dumps into buckets
Similar crashes will result in the Similar crashes will result in the same bucketsame bucket
After collecting so many just After collecting so many just increment countersincrement counters
Integrate WER Into AppsIntegrate WER Into AppsProgrammatically CaptureProgrammatically Capture
BOOL CaptureDumpFileOnDevice(BOOL CaptureDumpFileOnDevice( DWORDDWORD dwProcessIddwProcessId,,
DWORDDWORD dwThreadIddwThreadId,,
LPCWSTRLPCWSTR pwzExtraFilesPathpwzExtraFilesPath
););
dwProcessId, dwThreadIddwProcessId, dwThreadId0 = current 0 = current
Otherwise, provide the IdOtherwise, provide the Id
pwzExtraFilesPathpwzExtraFilesPathOptionalOptional
Unique folder name (ownership changes)Unique folder name (ownership changes)
Returns Returns TRUE = successfulTRUE = successful
FALSE = failure, check GetLastError()FALSE = failure, check GetLastError()
Integrate WER Into Apps Integrate WER Into Apps Exception HandlingException Handling
Handled exceptions do not trigger Handled exceptions do not trigger the capturethe captureGenerate a dump file from within an Generate a dump file from within an exception filter exception filter EFaultRepRetVal ReportFault(EFaultRepRetVal ReportFault(
LPEXCEPTION_POINTERSLPEXCEPTION_POINTERS peppep, , DWORD DWORD dwOptdwOpt
);); pep – Pointer to an EXCEPTION_POINTER structurepep – Pointer to an EXCEPTION_POINTER structuredwOpt – Reserved and should be zerodwOpt – Reserved and should be zeroReturnsReturns
frrvErrNoDW – on errorfrrvErrNoDW – on errorfvvrOk – successful capturefvvrOk – successful capture
Integrate WER Into Apps Integrate WER Into Apps Exception Handling ExampleException Handling Example
__try__try
{{
FunctionThatGeneratesAnException();FunctionThatGeneratesAnException();
}}
__except(ReportFault(GetExceptionInformation(),0), __except(ReportFault(GetExceptionInformation(),0), EXCEPTION_EXECUTE_HANDLER)EXCEPTION_EXECUTE_HANDLER)
{{
SomeHandlerFunction();SomeHandlerFunction();
}}
Add WER To Your PlatformAdd WER To Your Platform
Using PB on a new platformUsing PB on a new platformAdd the features using Platform wizardAdd the features using Platform wizard
Using PB on an existing platformUsing PB on an existing platformAdd features from the CatalogAdd features from the Catalog
Using the command lineUsing the command lineDefine the SYSGENs Define the SYSGENs
Allocate dedicated memory the captureAllocate dedicated memory the capture
Add WER To Your Platform Add WER To Your Platform Platform WizardPlatform Wizard
Windows CE Error Reporting checkboxWindows CE Error Reporting checkboxSelects all of the componentsSelects all of the components
Exception Report GeneratorException Report Generator
Error Report Transfer DriverError Report Transfer Driver
Error Report Control PanelError Report Control Panel
Report Upload ClientReport Upload ClientDefault is Client Without User InterfaceDefault is Client Without User Interface
Allocate the dedicated memory Allocate the dedicated memory
Build your platformBuild your platform
Add WER To Your Platform Add WER To Your Platform CatalogCatalog
Under CoreOS\Windows CE DevicesUnder CoreOS\Windows CE DevicesAdd Windows CE Error Reporting Add Windows CE Error Reporting components to your platformcomponents to your platform
Exception Report GeneratorException Report Generator
Error Report Transfer DriverError Report Transfer Driver
Error Report Control PanelError Report Control Panel
Report Upload ClientReport Upload ClientReport Client User InterfaceReport Client User Interface
Allocate the dedicated memoryAllocate the dedicated memory
Build your platformBuild your platform
Add WER To Your Platform Add WER To Your Platform Command line buildsCommand line builds
Define the SYSGENsDefine the SYSGENsSYSGEN_WATSON_DMPGEN SYSGEN_WATSON_DMPGEN
SYSGEN_WATSON_XFER SYSGEN_WATSON_XFER
SYSGEN_WATSON_CTPNL SYSGEN_WATSON_CTPNL
SYSGEN_WATSON_CLIENT SYSGEN_WATSON_CLIENT
SYSGEN_WATSON_CLIENT_UI SYSGEN_WATSON_CLIENT_UI
Allocate the dedicated memoryAllocate the dedicated memory
Build your platformBuild your platform
Add WER To Your Platform Add WER To Your Platform Dedicated memoryDedicated memory
Allocate the dedicated memoryAllocate the dedicated memoryIn RAM (default)In RAM (default)
Does not persist across cold bootsDoes not persist across cold boots
Set dwNKDrWatsonSize variable in OEMInit()Set dwNKDrWatsonSize variable in OEMInit()
e.g. for 300 KB dwNKDrWatsonSize = (300 * 1024); e.g. for 300 KB dwNKDrWatsonSize = (300 * 1024);
In OEM defined storageIn OEM defined storageSet dwNKDrWatsonSize variable in OEMInit()Set dwNKDrWatsonSize variable in OEMInit()
OEM must provide the following routinesOEM must provide the following routinesRAMDrWatsonFlush(void)RAMDrWatsonFlush(void)
RAMDrWatsonClear(void)RAMDrWatsonClear(void)
RAMDrWatsonRead(DWORD dwOffset, LPVOID pData, RAMDrWatsonRead(DWORD dwOffset, LPVOID pData, DWORD cbSize)DWORD cbSize)
RAMDrWatsonWrite(DWORD dwOffset, LPVOID pData, RAMDrWatsonWrite(DWORD dwOffset, LPVOID pData, DWORD cbSize)DWORD cbSize)
Configurability Configurability On device thru registryOn device thru registry[HKEY_LOCAL_MACHINE\System\ErrorReporting\DumpSettings][HKEY_LOCAL_MACHINE\System\ErrorReporting\DumpSettings]"MaxLogFiles"=dword:00000064"MaxLogFiles"=dword:00000064"MaxDiskUsage"=dword:000e1000"MaxDiskUsage"=dword:000e1000"UploadClient"="\\windows\\Dw.exe""UploadClient"="\\windows\\Dw.exe""ExtraFilesDirectory"="\\windows\\ExtraDumpFiles""ExtraFilesDirectory"="\\windows\\ExtraDumpFiles""CabDirectory"="\\Windows\\System\\DumpFiles\\CabFiles""CabDirectory"="\\Windows\\System\\DumpFiles\\CabFiles""DumpDirectory"="\\Windows\\System\\DumpFiles""DumpDirectory"="\\Windows\\System\\DumpFiles""DumpEnabled"=dword:00000001"DumpEnabled"=dword:00000001 [HKEY_LOCAL_MACHINE\System\ErrorReporting\UploadSettings][HKEY_LOCAL_MACHINE\System\ErrorReporting\UploadSettings]"ManifestConsent"=dword:00000001"ManifestConsent"=dword:00000001"UploadFailedDlg"=dword:00000000"UploadFailedDlg"=dword:00000000"UploadSucceededDlg"=dword:00000000"UploadSucceededDlg"=dword:00000000"MaxDailyReports"=dword:00000000"MaxDailyReports"=dword:00000000"MaxWeeklyReports"=dword:00000000"MaxWeeklyReports"=dword:00000000"DontUpload"=dword:00000000"DontUpload"=dword:00000000"NoConsentRequired"=dword:00000000"NoConsentRequired"=dword:00000000
Analyzing The WER DataAnalyzing The WER DataOn the deviceOn the device
Lose advantages of bucketing Lose advantages of bucketing parametersparameters
Dumps are stored on the deviceDumps are stored on the device
Configure not to UploadConfigure not to Upload
Move the WER data off the deviceMove the WER data off the device
Create your own client appCreate your own client app
Analyzing The WER DataAnalyzing The WER DataThru WinQualThru WinQual
WinQual – Windows Quality OnlineWinQual – Windows Quality Onlinehttp://winqual.microsoft.comhttp://winqual.microsoft.com
Part of the Windows Logo Program websitePart of the Windows Logo Program websiteYou do not have to have a logoYou do not have to have a logo
RequirementsRequirementsCode Signing VerisignID CertificateCode Signing VerisignID Certificate
Sign Term of Use agreement (TOU)Sign Term of Use agreement (TOU)
File mappingFile mapping
Request ResponsesRequest ResponsesClose the loop with customersClose the loop with customers
Analyzing The WER DataAnalyzing The WER DataDebuggingDebugging
Platform Builder Kernel DebuggerPlatform Builder Kernel DebuggerPostmortem debugger missed Windows CE 5.0Postmortem debugger missed Windows CE 5.0
Power toolsPower toolsUIDumpView.exeUIDumpView.exe
http://download.microsoft.com/download/7/8/4/78http://download.microsoft.com/download/7/8/4/784bf4d2-2a21-416f-b495-1fd0f2340e3b/UIDumpVie4bf4d2-2a21-416f-b495-1fd0f2340e3b/UIDumpViewer.exewer.exe
Matching binaries and sources are requiredMatching binaries and sources are requiredWinQualWinQual
Microsoft Symbol serverMicrosoft Symbol server
Debugging The crashDebugging The crash
James StulzJames StulzProgram ManagerProgram ManagerWindows CE Core ToolsWindows CE Core Tools
Summary Summary
WER is easy to addWER is easy to add
WinQual gives you direct access to WinQual gives you direct access to your datayour data
Fix hard to find crashing problemsFix hard to find crashing problems
Create a successful product Create a successful product
While at MEDC 2005…While at MEDC 2005…Fill outFill out an evaluation for this session an evaluation for this session
Randomly selected instant Randomly selected instant WINWIN prizes! prizes!
Use Use real technology in a labreal technology in a lab Instructor led Instructor led Reef E/FReef E/F & & Breakers LBreakers L
Self-paced Self-paced Reef B/CReef B/C
VisitVisit the Microsoft Product Pavilion the Microsoft Product Pavilion
in the Exhibit Hall in the Exhibit Hall Shorelines BShorelines B
After The Conference…After The Conference…
DevelopDevelop
BuildBuild
InstallInstall
BuildBuild
JoinJoin
InstallInstall
EnterEnter
JoinJoin
Full-featured trial versions of Windows CE Full-featured trial versions of Windows CE and/or Windows XP Embeddedand/or Windows XP Embedded
Cool stuff & tell us about it: Cool stuff & tell us about it: msdn.microsoft.com/embedded/community
Windows Embedded Partner Program:Windows Embedded Partner Program:www.mswep.com
Windows Mobile 5.0 Eval Kit including Windows Mobile 5.0 Eval Kit including Visual Studio 2005 Beta 2Visual Studio 2005 Beta 2
Mobile2Market Contest and win up to $25000: Mobile2Market Contest and win up to $25000: mobile2marketcontest.com
Microsoft Solutions Partner Program:Microsoft Solutions Partner Program:partner.microsoft.com
Tools & ResourcesTools & Resources
msdn.microsoft.com/msdn.microsoft.com/ embeddedembedded
microsoft.public.microsoft.public. windowsxp.embeddedwindowsxp.embedded windowsce.platbuilderwindowsce.platbuilder windowsce.embedded.vcwindowsce.embedded.vc
blogs.msdn.com/blogs.msdn.com/ mikehallmikehall
Windows CE 5.0 Eval KitWindows CE 5.0 Eval KitWindows XP Embedded Eval KitWindows XP Embedded Eval Kit
msdn.microsoft.com/msdn.microsoft.com/ mobilitymobility
microsoft.public.microsoft.public. pocketpc.developer pocketpc.developer smartphone.developer smartphone.developer dotnet.framework.compactframeworkdotnet.framework.compactframework
blogs.msdn.com/blogs.msdn.com/ windowsmobilewindowsmobile vsdteamvsdteam netcfteamnetcfteam
Windows Mobile 5.0 Eval KitWindows Mobile 5.0 Eval Kit
WebsitesWebsites
NewsgroupsNewsgroups
BlogsBlogs
ToolsTools
BuildBuild DevelopDevelop
© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.