Closed Bug 1782199 Opened 2 years ago Closed 2 years ago

Unregister the WER runtime module before calling `exit()`/`_exit()`

Categories

(Toolkit :: Crash Reporting, task, P1)

Unspecified
Windows
task

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: gsvelto, Assigned: bobowen)

References

Details

Attachments

(1 file)

We currently never unregister the WER runtime module after having set it up at startup. This causes us to catch crashes happening very, very late during shutdown, even after exit() has been called. These crashes aren't particularly useful, past a certain point Firefox has cleanly shut down and anything beyond that point won't affect the user.

This could be done here where we remove the regular exception handler.

I'm adding a function to do this in bug 1682520 (to unregister an early registered module if the crashreporter is disabled by the ini file).
So, I could pick this up after that.

Depends on: 1682520
Assignee: nobody → bobowencode
Status: NEW → ASSIGNED
Priority: -- → P1

(In reply to Gabriele Svelto [:gsvelto] from comment #1)

This could be done here where we remove the regular exception handler.

I can add this here, but I notice that the comment above may not entirely hold now for the main process, because we create a ProcessRuntime (and initialize COM) in nsBrowserApp main for the skeleton UI.
I'm looking to do something similar for child processes that require COM, in an attempt to stop other DLLs interfering with COM init and win32k lockdown.

It's possible that this isn't relevant for the WER reporting given that I think we don't catch hangs at the moment.
I guess we can't unhook the old crash reporter any later, although given it is in mozglue, we possibly could destroy the ProcessRuntime created for the skeleton UI (and my upcoming changes) from XRE_main.

What do you both think?

Flags: needinfo?(gsvelto)
Flags: needinfo?(davidp99)

Unregistering the WER module can happen at a later time compared to removing the exception handler, I've got nothing against it. In fact it might be a good idea to place it as late as possible - as long as we care. When we can finally move unregistering the exception handler later I'll move that to where you placed the WER un-registration.

Flags: needinfo?(gsvelto)
Flags: needinfo?(davidp99)
Pushed by bobowencode@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7a514c537dbc
Unregister the WER runtime module before returning from main. r=gsvelto
Status: ASSIGNED → RESOLVED
Closed: 2 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: