Commit Graph

16 Commits

Author SHA1 Message Date
David Rajchenbach-Teller
8d8361a755 Bug 961665 - Fix typo in CrashManager's use of OS.File. r=gps 2014-03-13 09:50:24 -04:00
Gregory Szorc
e102b18b77 Bug 875562 - Part 9: Change Health Report to pull from crashes manager; r=bsmedberg, r=rnewman
This patch changes Firefox Health Report to pull crash counts from the
newly-implemented crash manager. The crash manager is now the canonical
source of crash data, so all the code for reading crash dump files from
disk has been removed.

This regresses the collection capability of Firefox Health Report by
removing plugin crashes and hangs from the reported values. This
regression is intended to be temporary and a follow-up bug will be
created to add plugin process event recording to the crash events
system.

This regression has been justified because the old crash reporting
mechanism was severely flawed and wasn't sending accurate data (not all
crashes were being saved to dumps and some dumps would be deleted).
2014-01-30 16:48:52 -08:00
Wes Kocher
9df8b36489 Backed out changeset 21793ea94b09 (bug 875562) for ASAN xpcshell failures 2014-03-13 15:22:40 -07:00
Gregory Szorc
db29219b17 Bug 875562 - Part 9: Change Health Report to pull from crashes manager; r=bsmedberg, r=rnewman
This patch changes Firefox Health Report to pull crash counts from the
newly-implemented crash manager. The crash manager is now the canonical
source of crash data, so all the code for reading crash dump files from
disk has been removed.

This regresses the collection capability of Firefox Health Report by
removing plugin crashes and hangs from the reported values. This
regression is intended to be temporary and a follow-up bug will be
created to add plugin process event recording to the crash events
system.

This regression has been justified because the old crash reporting
mechanism was severely flawed and wasn't sending accurate data (not all
crashes were being saved to dumps and some dumps would be deleted).
2014-01-30 16:48:52 -08:00
Ryan VanderMeulen
8699cfbd9c Backed out changesets c6ca1aa3887a, d741e117a033, 1fd26e822e73, and 720962c9f993 (bug 961665) for build bustage and xpcshell failures. 2014-03-13 10:32:57 -04:00
David Rajchenbach-Teller
aa1d47d4fb Bug 961665 - Fix typo in CrashManager's use of OS.File. r=gps 2014-03-13 09:50:24 -04:00
Gregory Szorc
438564733a Bug 976241 - Create crash store directory; r=Yoric 2014-03-04 16:21:11 -08:00
Gregory Szorc
c77b93553a NO BUG - Fix bustage in toolkit/components/crashes/tests/xpcshell/test_crash_manager.js; r=me 2014-02-14 14:53:47 -08:00
Gregory Szorc
cc47979e58 Bug 972093 - Detect run_next_test() during add_task(); r=ted, rnewman
If an xpcshell test called run_next_test() from inside an add_task(),
bad things would happen. This patch detects that behavior and aborts the
test immediately with an actionable error message.
2014-02-12 16:47:29 -08:00
Gregory Szorc
437bc82af6 Bug 875562 - Part 7: Implement limits for stored crash data; r=Yoric
This patch institutes limits for how much crash data can be stored in
terms of maximum number of crash events per day. If more events than the
limit are encountered, we record that a high water mark has been
encountered and we silently discard the payload of future events.

We chose to not increment the version of the store payload because no
clients are actively saving this data yet, so it doesn't make sense to
incur a version bump.
2014-01-28 17:33:38 -08:00
Gregory Szorc
e27ec87111 Bug 875562 - Part 6: Implement initial crash events; r=bsmedberg
Support for main process crashes, plugin crashes, and plugin hangs is
added to the crash manager. This includes a JS API for reporting them as
well as support for reading the event files.

There is still an issue of unbound growth on the store. This will be
addressed in a subsequent patch.
2014-01-28 15:46:03 -08:00
Gregory Szorc
77124ad0aa Bug 875562 - Part 5: Document crash events for initial implementation; r=bsmedberg
The initial implementation of this feature will write 3 distinct event
types and will only count occurrences of each. Future iterations of the
feature will capture more metadata, such as submission state and extra
crash annotations. These will not be included in this patch set.

DONTBUILD (NPOTB)
2014-01-28 12:00:10 -08:00
Gregory Szorc
9d35b1cb67 Bug 875562 - Part 4: Add Support for crash event files to CrashManager; r=Yoric
This patch introduces the concepts of the "crash data store" and "crash
event files." The "crash data store" is a data store containing
information about crashes. Data is added to this store directly through
a JavaScript API or by the presence of "crash event files." A "crash
event file" is simply an individual file containing information about
a crash event. These files are periodically scanned and their contents
are merged into the store.

Currently, no specific event files types are defined. This patch merely
begins to implement the infrastructure for dealing with them. Support
for specific crash events will be added in subsequent patches.
2014-01-27 15:49:11 -08:00
Gregory Szorc
dd25456b1e Bug 875562 - Part 3b: Review fixups; r=me 2014-01-29 09:46:39 -08:00
Gregory Szorc
e502d74bfe Bug 875562 - Part 3: XPCOM service for managing crash data; r=ted, bsmedberg 2014-01-23 15:49:24 -08:00
Gregory Szorc
8ba63dfcf8 Bug 875562 - Part 2: Create CrashManager API for managing crash data; r=ted, Yoric
The tree doesn't have a robust and reusable API for interfacing with
crash data. This patch is the start of a new API.

In this patch, the CrashManager type is introduced. It has APIs for
retrieving the lists of files related to crash dumps. In subsequent
patches, I will convert existing code in the tree that does similar
things to the new API. I will also build the events/timeline API onto
this type.

I made CrashManager generic because I hate, hate, hate singletons and
global variables. Allowing it to be instantiated multiple times with
different options (instead of say binding a global instance to ProfD)
makes the testing story much, much nicer. That is reason enough, IMO. In
a subsequent patch, I'll add an XPCOM service that instantiates the
"global" instance of CrashManager with the appropriate options.

It was tempting to add this code into the existing CrashReports.jsm.
However, this file does not import cleanly in xpcshell tests and I
didn't want to bloat scope to include fixing that file... yet.
CrashReports.jsm is using synchronous I/O. So, depending on how
adventerous I feel, I may replace consumers of CrashReports.jsm with the
new CrashManager.jsm, remove CrashReports.jsm, and eliminate another
source of synchronous I/O in the tree.
2013-11-19 14:08:25 -08:00