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

Issue 834858 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Background download: reduce BackgroundTaskScheduler.schedule calls

Project Member Reported by xingliu@chromium.org, Apr 19 2018

Issue description

Version:68.0.3400 Current trunk

Before download started, BackgroundTaskScheduler.schedule is called many times according to trace events.

Step to repro:

Set kDefaultNetworkStartupDelay to 40 sec.

Start trace tool and pick download, download service, and memory infra.

BackgroundTaskScheduler schedule is called hundreds of times in a 10 sec interval. When download started, schedule call stops.
 
trace_2.json.gz
711 KB Download
trace_1.json.gz
616 KB Download
To load the trace tool, open "chrome://tracing" , press load and select the trace gz file.
The download service native code currently didn't repeatedly call schedule logic, there is something wrong with background_task_scheduler java layer, I consistently get:

cr_BkgrdTaskJS: Failed to stop job, because job with job id 78 does not exist.

Cc: carlosk@chromium.org harringtond@chromium.org
Components: UI>Browser>Offline
Labels: -Pri-1 Pri-3
Owner: ----
Status: WontFix (was: Assigned)
This only happens in limitless prefetch mode, probably not something really needed to fix, that scheduleTaskLimitless is consistently calling schedule before download system starts to work.

cc prefetch team for fyi. 


======================================================
Stack trace:
 20678 W System.err: 	at java.lang.Thread.dumpStack(Thread.java:1348)
04-19 13:23:30.698 20678 20678 W System.err: 	at org.chromium.components.background_task_scheduler.BackgroundTaskSchedulerImpl.schedule(BackgroundTaskSchedulerImpl.java:35)
04-19 13:23:30.698 20678 20678 W System.err: 	at org.chromium.chrome.browser.offlinepages.prefetch.PrefetchBackgroundTaskScheduler.scheduleTaskInternal(PrefetchBackgroundTaskScheduler.java:69)
04-19 13:23:30.698 20678 20678 W System.err: 	at org.chromium.chrome.browser.offlinepages.prefetch.PrefetchBackgroundTaskScheduler.scheduleTaskLimitless(PrefetchBackgroundTaskScheduler.java:41)
04-19 13:23:30.698 20678 20678 W System.err: 	at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
04-19 13:23:30.698 20678 20678 W System.err: 	at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:51)
04-19 13:23:30.698 20678 20678 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:106)
04-19 13:23:30.698 20678 20678 W System.err: 	at android.os.Looper.loop(Looper.java:164)
04-19 13:23:30.698 20678 20678 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6494)

04-19 13:23:30.698 20678 20678 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
04-19 13:23:30.698 20678 20678 W System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
04-19 13:23:30.698 20678 20678 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Is there any practical undesireable effect of this excessive number of calls?

Even though this only happens with limitless mode -- currently hard-coded disabled -- I would like to get it to work properly (one day) and not cause spurious issues.

Sign in to add a comment