Bug 1498609 - Annotate crash pings to include ECC memory support (or lack of) r=ted
authorGabriele Svelto <gsvelto@mozilla.com>
Wed, 24 Oct 2018 08:22:42 +0000
changeset 491084 e72b6abf3ec41dbd991c151210b826c68e39f5c0
parent 491083 1aacf5fda6cb9f6042264117b4517ba2807e3bc0
child 491085 0fe678bdcf595a848a25f423825ac6387bd19f1b
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
Bug 1498609 - Annotate crash pings to include ECC memory support (or lack of) r=ted Differential Revision: https://phabricator.services.mozilla.com/D8587
--- a/toolkit/components/telemetry/docs/data/crash-ping.rst
+++ b/toolkit/components/telemetry/docs/data/crash-ping.rst
@@ -1,18 +1,18 @@
 "crash" ping
 This ping is captured after the main Firefox process crashes or after a child process
 process crashes, whether or not the crash report is submitted to
 crash-stats.mozilla.org. It includes non-identifying metadata about the crash.
-This ping is sent either by the ```CrashManager``` or by the crash reporter
-client. The ```CrashManager``` is responsible for sending crash pings for the
+This ping is sent either by the ``CrashManager`` or by the crash reporter
+client. The ``CrashManager`` is responsible for sending crash pings for the
 child processes crashes, which are sent right after the crash is detected,
 as well as for main process crashes, which are sent after Firefox restarts
 successfully. The crash reporter client sends crash pings only for main process
 crashes whether or not the user also reports the crash. The crash reporter
 client will not send the crash ping if telemetry has been disabled in Firefox.
 The environment block that is sent with this ping varies: if Firefox was running long enough to record the environment block before the crash, then the environment at the time of the crash will be recorded and ``hasCrashEnvironment`` will be true. If Firefox crashed before the environment was recorded, ``hasCrashEnvironment`` will be false and the recorded environment will be the environment at time of submission.
@@ -39,17 +39,17 @@ Structure:
         version: 1,
         sessionId: <UUID>, // may be missing for crashes that happen early
                            // in startup. Added in Firefox 48 with the
                            // intention of uplifting to Firefox 46
         crashId: <UUID>, // Optional, ID of the associated crash
         minidumpSha256Hash: <hash>, // SHA256 hash of the minidump file
         processType: <type>, // Type of process that crashed, see below for a list of types
         stackTraces: { ... }, // Optional, see below
-        metadata: { // Annotations saved while Firefox was running. See nsExceptionHandler.cpp for more information
+        metadata: { // Annotations saved while Firefox was running. See CrashAnnotations.yaml for more information
           ProductID: "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}",
           ProductName: "Firefox",
           ReleaseChannel: <channel>,
           Version: <version number>,
           BuildID: "YYYYMMDDHHMMSS",
           AsyncShutdownTimeout: <json>, // Optional, present when a shutdown blocker failed to respond within a reasonable amount of time
           AvailablePageFile: <size>, // Windows-only, available paging file in bytes
           AvailablePhysicalMemory: <size>, // Windows-only, available physical memory in bytes
@@ -57,16 +57,17 @@ Structure:
           BlockedDllList: <list>, // Windows-only, see WindowsDllBlocklist.cpp for details
           BlocklistInitFailed: "1", // Windows-only, present only if the DLL blocklist initialization failed
           CrashTime: <time>, // Seconds since the Epoch
           ContainsMemoryReport: "1", // Optional, if set indicates that the crash had a memory report attached
           EventLoopNestingLevel: <levels>, // Optional, present only if >0, indicates the nesting level of the event-loop
           ipc_channel_error: <error string>, // Optional, contains the string processing error reason for an ipc-based content crash
           IsGarbageCollecting: "1", // Optional, if set indicates that the crash occurred while the garbage collector was running
           LowCommitSpaceEvents: <num>, // Windows-only, present only if >0, number of low commit space events detected by the available memory tracker
+          MemoryErrorCorrection: <type>, // Windows-only, indicates the type of ECC memory in use, see below
           MozCrashReason: <reason>, // Optional, contains the string passed to MOZ_CRASH()
           OOMAllocationSize: <size>, // Size of the allocation that caused an OOM
           RemoteType: <type>, // Optional, type of content process, see below for a list of types
           SecondsSinceLastCrash: <duration>, // Seconds elapsed since the last crash occurred
           ShutdownProgress: <phase>, // Optional, contains a string describing the shutdown phase in which the crash occurred
           SystemMemoryUsePercentage: <percentage>, // Windows-only, percent of memory in use
           StartupCrash: "1", // Optional, if set indicates that Firefox crashed during startup
           TelemetrySessionId: <id>, // Active telemetry session ID when the crash was recorded
@@ -205,12 +206,39 @@ The trust levels are (from least trusted
 | none          | Unknown, this is most likely not a valid frame    |
 The ``code_id`` field holds a unique ID used to distinguish between different
 versions and builds of the same module. See `breakpad <https://chromium.googlesource.com/breakpad/breakpad/+/24f5931c5e0120982c0cbf1896641e3ef2bdd52f/src/google_breakpad/processor/code_module.h#60>`__'s
 description for further information. This field is populated only on Windows.
+The value of the ``MemoryErrorCorrection`` metadata field contains the type
+of memory error correction available on the machine, it can be one of the
+following types:
+| Type           | Description                                               |
+| Reserved       | Should never be set, assume no error correction available |
+| Other          | Assume no error correction available                      |
+| Unknown        | Assume no error correction available                      |
+| None           | No error correction available                             |
+| Parity         | Single-bit error detection, no correction.                |
+| Single-bit ECC | SECDED ECC (single-bit correction, double-bit detection)  |
+| Multi-bit ECC  | Usually single-device data correction (SDDC, Chipkill)    |
+| CRC            | Multi-device data correction (DDDC or similar)            |
 Version History
 - Firefox 58: Added ipc_channel_error (`bug 1410143 <https://bugzilla.mozilla.org/show_bug.cgi?id=1410143>`_).
+- Firefox 62: Added LowCommitSpaceEvents (`bug 1464773 <https://bugzilla.mozilla.org/show_bug.cgi?id=1464773>`_).
+- Firefox 63: Added RecordReplayError (`bug 1481009 <https://bugzilla.mozilla.org/show_bug.cgi?id=1481009>`_).
+- Firefox 64: Added MemoryErrorCorrection (`bug 1498609 <https://bugzilla.mozilla.org/show_bug.cgi?id=1498609>`_).
--- a/toolkit/crashreporter/CrashAnnotations.yaml
+++ b/toolkit/crashreporter/CrashAnnotations.yaml
@@ -478,16 +478,17 @@ MarshalActCtxManifestPath:
   type: string
   description: >
     Windows only, type of error correction used by system memory.  See
     documentation for MemoryErrorCorrection property of
     Win32_PhysicalMemoryArray WMI class.
   type: string
+  ping: true
   description: >
     Plaintext description of why Firefox crashed, this is usually set by
     assertions and the like.
   type: string
   ping: true