New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 766852 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task



Sign in to add a comment

Migrate MinidumpUploadJobService from JobScheduler to BackgroundTaskScheduler

Project Member Reported by fgor...@chromium.org, Sep 19 2017

Issue description

In 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.
 
 
Cc: ivanpe@chromium.org
Ivan, any chance we get it done?
Let me know if you need any help with this one. (Switching to BTS makes scheduling work on pre-M versions of Android BTW.

Comment 2 by ivanpe@chromium.org, Feb 20 2018

Cc: mark@chromium.org
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?

Comment 3 by mark@chromium.org, Feb 20 2018

Cc: gsennton@chromium.org yfried...@chromium.org isherman@chromium.org
gsennton implemented it and isherman componentized it. Any takers?
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.

Comment 5 by ivanpe@chromium.org, Feb 20 2018

Cc: jperaza@chromium.org
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?
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™?

Comment 8 by ivanpe@chromium.org, 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.
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.
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.

Comment 11 by mark@chromium.org, 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?
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.
Status: WontFix (was: Untriaged)
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.
Great. I am still OK with not fixing that one.

Sign in to add a comment