Breakpad:Current Implementation: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(google code to github)
 
(20 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''[[Airbag|« back to Airbag main page]]'''
'''[[Breakpad|« back to Breakpad main page]]'''


This is a summary of the current state of Breakpad integration into Mozilla.
This is a summary of the current state of Breakpad integration into Mozilla.


= Client Side =
= Client Side =
Currently Breakpad work in Mozilla has only progressed on Win32.  An OS X implementation is available in the Breakpad source.  Linux patches are in progress, but not yet available.
Breakpad crash reporting is currently enabled by default on trunk builds of Firefox on Windows, Mac OS X and Linux.


== Symbol Extraction/Upload ==
== Symbol Extraction/Upload ==
Symbol extraction and upload is done at build time.  There are two targets in the top level Makefile, [http://mxr.mozilla.org/seamonkey/source/Makefile.in#140 buildsymbols] and [http://mxr.mozilla.org/seamonkey/source/Makefile.in#158 uploadsymbols].
Symbol extraction and upload is done at build time.  There are two targets in [http://mxr.mozilla.org/mozilla/source/Makefile.in the top level Makefile], buildsymbols and uploadsymbols.


The |buildsymbols| target finds PDB files associated with EXE and DLL files in $(DIST), and processes them with [http://mxr.mozilla.org/seamonkey/source/toolkit/airbag/tools/win32/ dump_syms.exe] to get a SYM file for each, using the [http://mxr.mozilla.org/seamonkey/source/toolkit/airbag/tools/make_symbol_store.pl make_symbol_store.pl] script.  The SYM files and PDB files are both placed in $(DIST)/airbag-symbols/$(BUILDID) in the directory structure used for the Microsoft Symbol Server.  A description of this directory structure can be found [http://google-breakpad.googlecode.com/svn/trunk/src/processor/simple_symbol_supplier.h in the Breakpad source].  The symbols are then compressed into a .tar.bz2 file, in a dated directory alongside the top source directory.
== Exception Handler ==


The |uploadsymbols| target simply calls the [http://mxr.mozilla.org/seamonkey/source/toolkit/airbag/tools/upload_symbols.sh upload_symbols.sh] script to upload the symbols using rsync. This script relies on certain environment variables being set:
The exception handler is set in <code>XRE_Main</code>, so any app using that as an entry point can use it simply by setting some values in application.ini.  [http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/browser/app/application.ini&rev=1.10&mark=55-59#55  See the Firefox application.ini] for an example.
* AIRBAG_SYMBOL_SERVER  : host to upload symbols to
* AIRBAG_SYMBOL_USER    : username on that host
* AIRBAG_SYMBOL_PATH    : path on that host to put symbols in


The symbols are copied to the symbol server and untarred into the specified path.
There is an API for adding extra data to the crash report, implemented using the [http://mxr.mozilla.org/mozilla/source/toolkit/crashreporter/nsICrashReporter.idl nsICrashReporter] interface.  Note that the server must be modified to handle additional data.
 
Upon handling an exception, a minidump is written, and then the data added using <code>annotateCrashReport</code> is written to a file with a .extra extension alongside the minidump.  The crash reporter client is then launched with the minidump filename as the sole parameter.


== Exception Handler ==
== Crash Reporter Client ==
== Crash Reporter Client ==
The [http://mxr.mozilla.org/mozilla/source/toolkit/crashreporter/ crash reporter client] will display the contents of the .extra file for the user to view, and allow the user to submit a report.  The client can also restart the crashed application.  The client stores reports in a directory structure [http://kb.mozillazine.org/Breakpad#Location_of_crash_reports explained here].  Reports that have not yet been submitted are stored in <code>pending</code>, and successful reports have a text file with information about the report placed in <code>submitted</code>.


= Server Side =
= Server Side =
== Symbol Store ==
 
== Crash Report Collector ==
 
== Crash Report Viewer ==
Information about the server can be found at [https://github.com/mozilla/socorro/ the Socorro Github page].  The Mozilla instance is located at http://crash-stats.mozilla.com/ .

Latest revision as of 06:52, 24 June 2013

« back to Breakpad main page

This is a summary of the current state of Breakpad integration into Mozilla.

Client Side

Breakpad crash reporting is currently enabled by default on trunk builds of Firefox on Windows, Mac OS X and Linux.

Symbol Extraction/Upload

Symbol extraction and upload is done at build time. There are two targets in the top level Makefile, buildsymbols and uploadsymbols.

Exception Handler

The exception handler is set in XRE_Main, so any app using that as an entry point can use it simply by setting some values in application.ini. See the Firefox application.ini for an example.

There is an API for adding extra data to the crash report, implemented using the nsICrashReporter interface. Note that the server must be modified to handle additional data.

Upon handling an exception, a minidump is written, and then the data added using annotateCrashReport is written to a file with a .extra extension alongside the minidump. The crash reporter client is then launched with the minidump filename as the sole parameter.

Crash Reporter Client

The crash reporter client will display the contents of the .extra file for the user to view, and allow the user to submit a report. The client can also restart the crashed application. The client stores reports in a directory structure explained here. Reports that have not yet been submitted are stored in pending, and successful reports have a text file with information about the report placed in submitted.

Server Side

Information about the server can be found at the Socorro Github page. The Mozilla instance is located at http://crash-stats.mozilla.com/ .