This patch rolls up all the required changes for this purpose. Since the
whole crash reporting flow must understand the new format it's not possible
to land this as separate patches as individually they would be broken. This
patch includes the following changes:
* Changes to the crash reporting machinery to write out annotations as JSON,
these includes changes to the DLL blocklist code that must be run at crash
time.
* Modifications to the crash reporter client so that it can read and
submit the new format; this includes platform-specific changes to the
Breakpad libraries it uses for submitting crashes.
* Modifications to the minidump-analyzer to understand and process the new
format correctly.
* Modifications to the crash manager to understand and process the new format
correctly.
* Modifications to GeckoView's crash handler to understand and submit the
new format correctly.
* Added new tests to cover the new format and modified existing ones to
accomodate the new one.
Differential Revision: https://phabricator.services.mozilla.com/D46848
--HG--
extra : moz-landing-system : lando
This patch rolls up all the required changes for this purpose. Since the
whole crash reporting flow must understand the new format it's not possible
to land this as separate patches as individually they would be broken. This
patch includes the following changes:
* Changes to the crash reporting machinery to write out annotations as JSON,
these includes changes to the DLL blocklist code that must be run at crash
time.
* Modifications to the crash reporter client so that it can read and
submit the new format; this includes platform-specific changes to the
Breakpad libraries it uses for submitting crashes.
* Modifications to the minidump-analyzer to understand and process the new
format correctly.
* Modifications to the crash manager to understand and process the new format
correctly.
* Modifications to GeckoView's crash handler to understand and submit the
new format correctly.
* Added new tests to cover the new format and modified existing ones to
accomodate the new one.
Differential Revision: https://phabricator.services.mozilla.com/D46848
--HG--
extra : moz-landing-system : lando
The minidump-analyzer tool was originally conceived to be used from the crash
report client and as such was installed in the crash reporter client
application bundle on macOS. It was later adapted to work from Firefox itself
but this caused linking problems when invoked from the Firefox app bundle.
This patch moves the minidump-analyzer into the Firefox app bundle and adapts
the relevant code to find it there.
The minidump-analyzer was also not signed like the rest of our executables and
this patch addresses that issue too.
Differential Revision: https://phabricator.services.mozilla.com/D52910
--HG--
extra : moz-landing-system : lando
`std::auto_ptr` is going away in C++17, so we might as well switch to
the approved thing now.
Differential Revision: https://phabricator.services.mozilla.com/D44042
--HG--
extra : moz-landing-system : lando
This patch includes multiple changes cleaning up various aspects of the crash
reporter client and exception handler:
* Some Unix-specific code was moved out from the base crashreporter client
code and into the appropriate platform implementation
* Functions used to open files in the crashreporter client now accept C++
`std::ios` flags instead of unreadable booleans
* Useless character conversion routines were removed from the
minidump-analyzer
* Crash annotations are not serialized into a huge string anymore every time
they change. They are all written out individually during an exception.
* `WriteEscapedMozCrashReason()` uses the exception-safe `my_strlen()` instead
of plain `strlen()`
* The Windows-specific DLL-blocklist shutdown was removed from the Linux &
macOS Breakpad callbacks
* The `CrashReporterHost`, `CrashReporterClient` and
`CrashReporterMetadataShmem` classes now take `nsACString` references
instead of `nsCString` ones since they never modify their contents
Differential Revision: https://phabricator.services.mozilla.com/D33267
--HG--
extra : moz-landing-system : lando
The definitions can't be entirely removed yet because NSS still needs them.
Differential Revision: https://phabricator.services.mozilla.com/D23454
--HG--
extra : moz-landing-system : lando
I was there, looking at a Firefox directory in my file manager while
working on bug 1079662, when I noticed the `Throbber-small.gif`
appearing first in the list, and wondering where it came from. And I
found it's there for the crashreporter UI. Fair enough.
But back when it was added in bug 404855, the file was also used for
Firefox, which is why it's taken from the Firefox theme. Interestingly,
back then, the file was duplicated in multiple themes, but was taken
from the windows theme rather than the gnome theme. Figures.
Anyways, later down the road, in bug 421595, Firefox replaced the gif
throbber with an APNG version. Then even later, bug 418003 removed the
unused gif throbber files, leaving the Windows one alone because it's
used by the crashreporter client moz.build (Makefile, back then), but
still removed the reference from the jar.mn.
9 years later, here we are, still using a file from the Windows theme,
that is not actually part of the Windows theme, for the Linux
crashreporter.
--HG--
rename : toolkit/themes/windows/global/throbber/Throbber-small.gif => toolkit/crashreporter/client/Throbber-small.gif
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.
All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.
--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
This makes one less place where we link code compiled for libxul into a
place that doesn't link mozglue, and is cleaner to boot. We don't need
the BREAKPAD_NO_TERMINATE_THREAD define that breakpad-windows-libxul
defines because we're not including the handler code in the
crashreporter binary.
Before we were falling back to using the raw version, which isn't
correct on at least beta (i.e. we would get `60.0` instead of `60.0b1`).
MozReview-Commit-ID: 7NfV6iRoj4y
--HG--
extra : rebase_source : de1ea9d64d1d03c8281fc0ab9efe4ffac6fd40cb
This cleans up the way the crash reporter client invokes the minidump analyzer
by removing the extra command-line parameter and replacing it with an
environment variable. Since I was at it I've also cleaned up other uses of env
variables in the code and added documentation for all of them.
MozReview-Commit-ID: ATkgsI3L2Md
--HG--
extra : source : 05a762d6cb5e5fd9856743b4db38287d7c58a487
At present it is difficult to determine whether a crash ping is from a
shutdownkill or not. By including ipc_channel_error we will be able to figure
that out.
We also as a bonus get additional insight into ipc channel error types that
lead to crashes.
MozReview-Commit-ID: FepLsSS2tAI
--HG--
extra : rebase_source : 8c17bdd63f7fadb9829df63fe50c044a020b183e
This option was added ~decade ago; AFAICT from bug archaeology, the
option was added to prevent our servers from being overwhelmed.
Somewhere over the years, however, we obtained more capable servers and
the option disappeared from mozconfigs. It seems moderately unlikely
that we'll have a need for this option again, and we could reintroduce
this patch very easily in any event. Let's go ahead and remove it.
This also removes the TelemetrySessionId field from the whitelist because that
field is already manually stripped and moved into the ping's root node.
Putting it in the whitelist is redundant.
MozReview-Commit-ID: B3WAyCSHoyR
--HG--
extra : rebase_source : 9729399a1e1c45cf1646498379d68684985134ce