Submit GeckoView crashes with EXTRA_CRASH_BACKGROUND == true automatically
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
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 oldfatal == trueCRASHED_PROCESS_TYPE_FOREGROUND_CHILD- content process crash, corresponds to the oldfatal == falseCRASHED_PROCESS_TYPE_BACKGROUND_CHILD- this is the new type used by GPU process crashes which we want to automatically submit.
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.
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
Would that work for you @jamienicol @Mugurell ?
Yep, that sounds really good to me!
Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1792899
Change performed by the Move to Bugzilla add-on.