New issue
Advanced search Search tips

Issue 701910 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 1
Type: Bug



Sign in to add a comment

Wrap BLOCK_SHUTDOWN tasks in MakeCriticalClosure() in task_scheduler/

Project Member Reported by gab@chromium.org, Mar 15 2017

Issue description

As SequencedWorkerPool did: https://cs.chromium.org/chromium/src/base/threading/sequenced_worker_pool.cc?type=cs&sq=package:chromium&q=base::MakeCriticalClosure+file:sequenced_worker_pool.cc&l=711

Let's fix and merge to M58? This is important for iOS from what I understand.

@rob to triage since we may need to do something special to merge on iOS?
 
Yeah, we should support this.

Are we seeing issuing in the wild because we didn't wrap CriticalClosure? The task is still not guaranteed to complete, with or without CriticalClosure.

Comment 2 by gab@chromium.org, Mar 20 2017

I haven't heard of an explicit issue but I assume any such issue would be fairly subtle. Let's just do it to maintain status quo.

Mind setting up CL and merge?
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6442d6e4c7b405310f22a1e8c191faf6e1763425

commit 6442d6e4c7b405310f22a1e8c191faf6e1763425
Author: robliao <robliao@chromium.org>
Date: Tue Mar 21 20:14:56 2017

Add CriticalClosure to BLOCK_SHUTDOWN Tasks

iOS relies on CriticalClosure to notify the system that Chrome is doing
important work when Chrome is backgrounded.

BUG= 701910 

Review-Url: https://codereview.chromium.org/2761653004
Cr-Commit-Position: refs/heads/master@{#458529}

[modify] https://crrev.com/6442d6e4c7b405310f22a1e8c191faf6e1763425/base/task_scheduler/task.cc

Status: Untriaged (was: Started)
Marking Untriaged for iOS Triage.

iOS Triage: Would you like this merged upwards after canarying?
Cc: justincohen@chromium.org rohitrao@chromium.org
Status: Assigned (was: Untriaged)
Is there something broken in stable or beta that needs this fix?

rohitrao what do you think?
As far as I can tell, the main impact is if Chrome goes into the background, a tasks running as BLOCK_SHUTDOWN won't notify iOS that they're running.

At the same time, iOS can still terminate Chrome if it takes too long to run these things, so I suspect we need to be robust to these things anyways.

Comment 8 by gab@chromium.org, Mar 22 2017

The main thing is tasks using SequencedWorkerPool were previously getting this and we lost that in the redirection unintentionally. We don't know whether this matters but this brings back status quo (and it'd thus be safer to merge IMO).
Merging sounds reasonable to me, thanks!  There is no special merge process for public iOS code; we just follow the same process as desktop.
Labels: Merge-Request-58
Sounds good. We'll get that started now. We want M57 and M58?

> git tag --contains 6442d6e4c7b405310f22a1e8c191faf6e1763425
59.0.3048.0 (Current Version)
59.0.3048.1
59.0.3048.2

We're currently on canary without any known issues.
Project Member

Comment 11 by sheriffbot@chromium.org, Mar 22 2017

Labels: -Merge-Request-58 Hotlist-Merge-Approved Merge-Approved-58
Your change meets the bar and is auto-approved for M58. Please go ahead and merge the CL to branch 3029 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 12 by bugdroid1@chromium.org, Mar 22 2017

Labels: -merge-approved-58 merge-merged-3029
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a1e301be6e15073bea6354ef31a011a5f456a545

commit a1e301be6e15073bea6354ef31a011a5f456a545
Author: Robert Liao <robliao@chromium.org>
Date: Wed Mar 22 21:36:48 2017

Add CriticalClosure to BLOCK_SHUTDOWN Tasks

iOS relies on CriticalClosure to notify the system that Chrome is doing
important work when Chrome is backgrounded.

BUG= 701910 

Review-Url: https://codereview.chromium.org/2761653004
Cr-Commit-Position: refs/heads/master@{#458529}
(cherry picked from commit 6442d6e4c7b405310f22a1e8c191faf6e1763425)

Review-Url: https://codereview.chromium.org/2770873003 .
Cr-Commit-Position: refs/branch-heads/3029@{#371}
Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471}

[modify] https://crrev.com/a1e301be6e15073bea6354ef31a011a5f456a545/base/task_scheduler/task.cc

Labels: Merge-Request-57

Comment 14 by gab@chromium.org, Mar 23 2017

Labels: -Merge-Request-57
I don't think anything runs in TaskScheduler by default in M57 and experiment is not live beyond Dev channel so M57 is clear without merge I think.
Labels: -ReleaseBlock-Stable
Status: Fixed (was: Assigned)
One of the earliest migration CLs is M58 
D:\src>git tag --contains e43dc3eb142ce7a0cfb53da544dc373ef9ac6888
58.0.3005.0

So this doesn't need to be ReleaseBlock-Stable or M57. Clearing RBS and marking fixed.

Sign in to add a comment