Background download: reduce BackgroundTaskScheduler.schedule calls |
||
Issue descriptionVersion: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.
,
Apr 19 2018
Currently following this doc: https://chromium.googlesource.com/chromium/src/+/68.0.3399.2/docs/memory/debugging_memory_issues.md#Taking-a-Heap-Dump
,
Apr 19 2018
To load the trace tool, open "chrome://tracing" , press load and select the trace gz file.
,
Apr 19 2018
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.
,
Apr 19 2018
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)
,
Apr 20 2018
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 |
||
Comment 1 by xingliu@chromium.org
, Apr 19 2018616 KB
616 KB Download