android-components icon indicating copy to clipboard operation
android-components copied to clipboard

Submit GeckoView crashes with EXTRA_CRASH_BACKGROUND == true automatically

Open jamienicol opened this issue 5 years ago • 5 comments

In https://phabricator.services.mozilla.com/D132809 an extra field EXTRA_CRASH_BACKGROUND will be added to GeckoView crash intents, specifying that the crash occurred in a background process causing minimal if any disruption to the user. For example the GPU process (which is currently being implemented). The intention is that we can choose to submit these reports automatically rather than displaying the crash reporter UI to the user.

cc @csadilek

┆Issue is synchronized with this Jira Task

jamienicol avatar Dec 03 '21 17:12 jamienicol

bz-1743454 has now landed in mozilla-central. We made a slight change to the API I wrote in the first comment. Instead of adding a new boolean EXTRA_CRASH_BACKGROUND field alongside EXTRA_CRASH_FATAL, we have deprecated EXTRA_CRASH_FATAL and added a new EXTRA_CRASH_PROCESS_TYPE.

This is a String, whose value will be equal to one of the constants:

  • CRASHED_PROCESS_TYPE_MAIN - corresponds to the old fatal == true
  • CRASHED_PROCESS_TYPE_FOREGROUND_CHILD - content process crash, corresponds to the old fatal == false
  • CRASHED_PROCESS_TYPE_BACKGROUND_CHILD - this is the new type used by GPU process crashes which we want to automatically submit.

jamienicol avatar Dec 09 '21 10:12 jamienicol

From speaking to Travis Long about data collection, and Gabriele Svelto about minidumps, it seems to me like we will not be able to submit these automatically. The minidumps contain too much sensitive information, and it's infeasible to attempt to strip said information from them. It might be possible to get data approval to submit automatically on Nightly, as we do on Desktop, but that would be a huge hurdle on the Release channel.

I think the best way forward is to present the user a non-intrusive UI asking them to submit the report. While the UI may be slightly annoying, the alternative at this stage is not shipping the GPU process at all. Which would mean the same crashes occurring in the parent process rather than the GPU process, and therefore causing the entire app to crash. Which would certainly be much more annoying to the user.

jamienicol avatar Dec 15 '21 11:12 jamienicol

Discussed this with @csadilek . Right now, content crashes display a tab blocking UI that lets the user submit a crash report and restore the tab. This UI works well for content crashes as it doesn't stop the user from switching tab and tell them which tab(s) is responsible for the crash.

For GPU process crashes, however, we don't have a tab to point to and we don't really need to block the user from interacting with the page, so I think what we should do is intercept the intent for BACKGROUND_CHILD crashes (which are basically GPU crashes right now) and show a notification, otherwise letting users interact with the browser as normal. The notification would have a button on it that lets the user submit the crash report if they so desire.

The notification might say something like "Sorry. A problem occurred in Firefox ". Here's a screenshot for the main process crash, we would probably want to do something very similar.

Would that work for you @jamienicol @Mugurell ?

agi avatar Mar 14 '22 20:03 agi

Yep, that sounds really good to me!

jamienicol avatar Mar 14 '22 20:03 jamienicol

Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1792899

Change performed by the Move to Bugzilla add-on.

csadilek avatar Sep 29 '22 22:09 csadilek