Closed Bug 1682520 Opened 5 years ago Closed 3 years ago

Use the WER runtime exception module to catch early crashes

Categories

(Toolkit :: Crash Reporting, task)

Unspecified
Windows
task

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: gsvelto, Assigned: bobowen)

References

Details

Attachments

(2 files)

At the moment we're unable to catch crashes happening during the early stages of startup, and specifically we can't catch crashes happening in firefox.exe before we've started XPCOM initialization, because crash reporting partially depends on it. The WER runtime exception module should have no such limitations so we should try to enable it as soon as possible during startup instead of waiting until Breakpad's exception handler is in place.

See Also: → 1488990

This applies to child processes too; since we don't need to wait for XPCOM initialization there too, we can just hook up WER ASAP (we only need to parse the last parameter on the command-line).

See Also: → 1725254
No longer blocks: 1682507

I've realised that my work in bug 1759167 is going to move the COM initialization before we have crash reporting, so we would really want this bug first if possible.

The COM initialization move has already happened for the main process, because of the skeleton UI and this explains why we don't get similar COM init crashes for that process.

Assignee: nobody → bobowencode
Blocks: 1759167
Status: NEW → ASSIGNED

I have some patches to register this very early on that are working locally.
At the moment it only uses the environment variable controls, because it is so early.

Looks like there is also ini file control of this that I imagine might affect corporate installations more, so that needs some consideration.

Possibly the best we could do is unregister the module once we have read things from the ini file.

Here's a try push with patches from bug 1759167 as well.
Obviously I need to fix up the spidermonkey build.
https://treeherder.mozilla.org/jobs?repo=try&revision=30f01ce8c8eb93692a7d05a0f43fe3dd6c20b2c8

This means we can include these files in other binaries when we need earlier
access to the process type and use consistent code.

Blocks: 1782199
Attachment #9286086 - Attachment description: Bug 1682520 p1: Move GeckoProcessType and implementation of get and set into separate files. r=glandium! → Bug 1682520 p1: Move GeckoProcessType and implementation of get and set into mozglue. r=glandium!
Attachment #9286086 - Attachment description: Bug 1682520 p1: Move GeckoProcessType and implementation of get and set into mozglue. r=glandium! → Bug 1682520 p1: Move GeckoProcessType and implementation of get and set into separate files. r=glandium!
Pushed by bobowencode@gmail.com: https://hg.mozilla.org/integration/autoland/rev/dad72c7e0d7b p1: Move GeckoProcessType and implementation of get and set into separate files. r=glandium https://hg.mozilla.org/integration/autoland/rev/679e19334225 p2: Register the WER Runtime Exception Module very early in process start up. r=gsvelto,glandium

Backed out for causing build bustages on ProcessType.h

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: builds/worker/workspace/obj-build/dist/include/mozilla/ProcessType.h:33:45: error: inline function 'GeckoProcessType mozilla::GetGeckoProcessType()' declared weak [-Werror=attributes]
Flags: needinfo?(bobowencode)
Attachment #9286086 - Attachment description: Bug 1682520 p1: Move GeckoProcessType and implementation of get and set into separate files. r=glandium! → Bug 1682520 p1: Move GeckoProcessType and implementation of get and set into mozglue. r=glandium!

New try push, with the build that failed and a few more as well:
https://treeherder.mozilla.org/jobs?repo=try&revision=240f612a769c22082967b1055cadc72264800a56

Flags: needinfo?(bobowencode)
Pushed by bobowencode@gmail.com: https://hg.mozilla.org/integration/autoland/rev/9cd56f898487 p1: Move GeckoProcessType and implementation of get and set into mozglue. r=glandium https://hg.mozilla.org/integration/autoland/rev/08607f50a78a p2: Register the WER Runtime Exception Module very early in process start up. r=gsvelto,glandium
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: