Migrate MinidumpUploadJobService from JobScheduler to BackgroundTaskScheduler |
|||||
Issue descriptionIn order to make code consistent across all components scheduling in the background, please migrate the MinidumpUploadJobService to BackgroundTaskScheduler. Good examples are already available in offline pages and prefetch. Bonus points: MinidumpUploadJobService will also work on pre-M versions.
,
Feb 20 2018
I'm guessing that this is a request to update THE minidump upload code in Chromium? Hey, Mark, can you please triage this one? Who would be a good person to work on it?
,
Feb 20 2018
gsennton implemented it and isherman componentized it. Any takers?
,
Feb 20 2018
My understanding is that we're planning to replace Breakpad on Android with Crashpad, soon™. If that's accurate, then I believe that the current minidump uploading logic will all become obsolete. If so, I don't think it's worth doing this cleanup – it's added code churn and potential for errors, without the long-term benefit of a cleaner and more consistent codebase (vs. the status quo of removing the code relatively soon). All that said, I considered using BackgroundTaskScheduler at the time that I implemented the MinidumpUploadJobService. At the time, after discussion with Tommy Nyquist, we concluded that BackgroundTaskScheduler was not sufficiently covered on the edge cases for something as critical as crash report uploading. Unfortunately, I don't recall the specific details/edge-cases that were relevant. And, I would guess that the BackgroundTaskScheduler code has evolved since then. If anyone picks up this work, I would recommend carefully considering whether BackgroundTaskScheduler now offers full feature parity, across all devices, including ones without GMS Core installed. Though, if nobody objects, I would prefer to close this as WontFix, given the upcoming Crashpad migration.
,
Feb 20 2018
,
Feb 20 2018
If we are removing this code, there is no point in migrating. Are we not collecting crashes from versions prior to M in the background then?
,
Feb 20 2018
We use a separate mechanism to schedule crash report uploads on versions prior to M. (This mechanism stopped being supported in Android N, which is why we moved over to using the JobScheduler API for newer platforms.) The overall controller code is roughly https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadService.java Mark, can you confirm that Crashpad for Android is expected to go live soon™?
,
Feb 20 2018
Joshua will attempt to integrate Crashpad into Clank either this week or early next week, so yes, Crashpad is expected to go live real soon.
,
Feb 21 2018
The last bits needed for a transition to Crashpad for Android are being finished up now, but it is not yet capable of upload on Android, so I expect this will still be needed in the short term.
,
Feb 21 2018
I'm not super familiar with the crashpad code. Does it support uploading crashes when only Java has been loaded? Sometimes in Android we have crashes that happen so early that we have not loaded native (C++) code yet.
,
Feb 21 2018
Crash report upload has been handled on the Chrome/Clank side instead of the Breakpad side until now, and to make the transition to Crashpad more quickly, we’re going to leave this model in place when we replace Breakpad with Crashpad in Clank. We certainly can subsequently take ownership of upload on the Crashpad side of things. I think that this is desirable. But this isn’t as imminent as the switchover to Crashpad. The question is: how badly do you want to get this off of JobScheduler? Is it critical to do in the short term, or is it enough to wait for Crashpad to take over upload on its own, even if that means waiting a bit longer?
,
Feb 21 2018
It is not critical that we do the switch. What is different about switching to Background Task Scheduler, is that it would use appropriate mechanism for pre-M with GMSCore. If there is already a suitable mechanism in place for that case, I would not push for switching, but if things could be improved, perhaps it is worth looking into. Nothing is needed badly.
,
Feb 21 2018
Thanks! If I'm understanding correctly, it sounds like BackgroundTaskScheduler still requires GMSCore on pre-M platforms. Is that accurate? If so, we definitely don't want to switch to it, as doing so would regress crash reporting for users who do not have GMSCore installed (which, IIUC, is common for some significant parts of our userbase). I'm going to go ahead and close this out as WontFix. I think that what's in place right now probably strikes a pretty good balance between using the "proper" APIs when they're available, and falling back to something functional, albeit less efficient, when that's not available. Longer term, it would definitely be best for the Crashpad team to take ownership of upload on Android.
,
Feb 21 2018
Here is what UMA tells me about user counts with and without GMSCore: https://uma.googleplex.com/p/chrome/histograms/?endDate=20180220&dayCount=1&histograms=GooglePlayServices.ConnectionResult&fixupData=true&uniqueUsers=true&showMax=true&filters=platform%2Ceq%2CA%2Cchannel%2Ceq%2C4%2Cosflavor%2Cone_of%2CAndroid_JellyBean%7CAndroid_KitKat%7CAndroid_Lollipop%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial
,
Feb 21 2018
That's fair, though keep in mind that many of the users who do not have GMSCore available might also not be reporting UMA metrics: https://uma.googleplex.com/p/chrome/histograms/?endDate=20180220&dayCount=1&histograms=GooglePlayServices.ConnectionResult&fixupData=true&uniqueUsers=true&showMax=true&filters=platform%2Ceq%2CA%2Cchannel%2Ceq%2C4%2Cosflavor%2Cone_of%2CAndroid_JellyBean%7CAndroid_KitKat%7CAndroid_Lollipop%2Ccountry%2Ceq%2CCN%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial
,
Feb 22 2018
Great. I am still OK with not fixing that one. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by fgor...@chromium.org
, Feb 19 2018