Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Issue 2891363005: Add ScopedTaskEnvironment::ExecutionControlMode. (Closed)

Created:
3 years, 7 months ago by fdoray
Modified:
3 years, 6 months ago
CC:
chromium-reviews, gab+watch_chromium.org, robliao+watch_chromium.org, fdoray+watch_chromium.org, danakj+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add ScopedTaskEnvironment::ExecutionControlMode. This enum controls whether tasks posted within the scope of a ScopedTaskEnvironment can run as they are posted or have to wait until a call to RunUntilIdle() to run. BUG=724077 TBR=gab@chromium.org Review-Url: https://codereview.chromium.org/2891363005 Cr-Original-Commit-Position: refs/heads/master@{#473925} Committed: https://chromium.googlesource.com/chromium/src/+/fc7b5ec521b29a97e63a7cda5921aa5ed793679a Review-Url: https://codereview.chromium.org/2891363005 Cr-Commit-Position: refs/heads/master@{#475392} Committed: https://chromium.googlesource.com/chromium/src/+/b199f1bef099a0b34576f10fd57e713551e39349

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : self-review #

Total comments: 12

Patch Set 4 : CR-robliao-7-comment #

Patch Set 5 : fix-build-error #

Total comments: 22

Patch Set 6 : fix build error #

Patch Set 7 : CR gab #

Patch Set 8 : self-review #

Total comments: 6

Patch Set 9 : rebase #

Patch Set 10 : CR-gab-31 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -39 lines) Patch
M base/task_scheduler/task_scheduler_impl.h View 1 2 3 4 5 6 3 chunks +15 lines, -7 lines 0 comments Download
M base/task_scheduler/task_scheduler_impl.cc View 1 2 3 4 5 6 7 8 5 chunks +10 lines, -8 lines 0 comments Download
M base/task_scheduler/task_tracker.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M base/task_scheduler/task_tracker.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M base/task_scheduler/task_tracker_posix.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M base/test/scoped_task_environment.h View 1 2 3 4 5 6 4 chunks +23 lines, -4 lines 0 comments Download
M base/test/scoped_task_environment.cc View 1 2 3 4 5 6 7 8 9 5 chunks +162 lines, -15 lines 0 comments Download
M base/test/scoped_task_environment_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +78 lines, -4 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 63 (37 generated)
fdoray
PTAL
3 years, 7 months ago (2017-05-19 18:26:15 UTC) #3
robliao
lgtm % comment https://codereview.chromium.org/2891363005/diff/40001/base/task_scheduler/task_scheduler_impl.h File base/task_scheduler/task_scheduler_impl.h (right): https://codereview.chromium.org/2891363005/diff/40001/base/task_scheduler/task_scheduler_impl.h#newcode49 base/task_scheduler/task_scheduler_impl.h:49: // |name| is used to label ...
3 years, 7 months ago (2017-05-19 20:14:47 UTC) #7
fdoray
https://codereview.chromium.org/2891363005/diff/40001/base/task_scheduler/task_scheduler_impl.h File base/task_scheduler/task_scheduler_impl.h (right): https://codereview.chromium.org/2891363005/diff/40001/base/task_scheduler/task_scheduler_impl.h#newcode49 base/task_scheduler/task_scheduler_impl.h:49: // |name| is used to label threads and histograms. ...
3 years, 7 months ago (2017-05-23 14:04:49 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2891363005/100001
3 years, 7 months ago (2017-05-23 14:40:17 UTC) #18
gab
Very nice :), comments below (split across two patch sets as I'd started on Friday...) ...
3 years, 7 months ago (2017-05-23 15:26:14 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/fc7b5ec521b29a97e63a7cda5921aa5ed793679a
3 years, 7 months ago (2017-05-23 16:13:33 UTC) #22
gab
On 2017/05/23 16:13:33, commit-bot: I haz the power wrote: > Committed patchset #6 (id:100001) as ...
3 years, 7 months ago (2017-05-23 16:16:56 UTC) #23
Marijn Kruisselbrink
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/2903633003/ by mek@chromium.org. ...
3 years, 7 months ago (2017-05-23 17:07:15 UTC) #24
findit-for-me
Findit (https://goo.gl/kROfz5) identified this CL at revision 473925 as the culprit for failures in the ...
3 years, 7 months ago (2017-05-23 17:08:08 UTC) #25
fdoray
gab@: PTAnL https://codereview.chromium.org/2891363005/diff/40001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/2891363005/diff/40001/base/task_scheduler/task_tracker.cc#newcode392 base/task_scheduler/task_tracker.cc:392: return subtle::Acquire_Load(&num_pending_undelayed_tasks_); On 2017/05/23 15:26:13, gab wrote: ...
3 years, 7 months ago (2017-05-25 19:17:34 UTC) #28
gab
lgtm w/ comments/questions https://codereview.chromium.org/2891363005/diff/140001/base/test/scoped_task_environment.cc File base/test/scoped_task_environment.cc (right): https://codereview.chromium.org/2891363005/diff/140001/base/test/scoped_task_environment.cc#newcode167 base/test/scoped_task_environment.cc:167: (execution_control_mode_ == ExecutionMode::ASYNC || != QUEUED ...
3 years, 7 months ago (2017-05-25 19:28:57 UTC) #30
gab
https://codereview.chromium.org/2891363005/diff/40001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/2891363005/diff/40001/base/task_scheduler/task_tracker.cc#newcode392 base/task_scheduler/task_tracker.cc:392: return subtle::Acquire_Load(&num_pending_undelayed_tasks_); On 2017/05/25 19:17:33, fdoray wrote: > On ...
3 years, 7 months ago (2017-05-25 19:29:29 UTC) #31
fdoray
https://codereview.chromium.org/2891363005/diff/40001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/2891363005/diff/40001/base/task_scheduler/task_tracker.cc#newcode392 base/task_scheduler/task_tracker.cc:392: return subtle::Acquire_Load(&num_pending_undelayed_tasks_); On 2017/05/25 19:29:29, gab wrote: > On ...
3 years, 7 months ago (2017-05-25 20:06:44 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2891363005/180001
3 years, 7 months ago (2017-05-25 20:08:32 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/464990)
3 years, 7 months ago (2017-05-25 22:47:36 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2891363005/180001
3 years, 7 months ago (2017-05-25 23:25:22 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/465116)
3 years, 7 months ago (2017-05-26 00:59:57 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2891363005/180001
3 years, 7 months ago (2017-05-26 12:07:00 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/465530)
3 years, 7 months ago (2017-05-26 13:29:46 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2891363005/180001
3 years, 7 months ago (2017-05-26 13:39:04 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/465568)
3 years, 7 months ago (2017-05-26 15:06:38 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2891363005/180001
3 years, 6 months ago (2017-05-29 21:45:27 UTC) #57
commit-bot: I haz the power
Committed patchset #10 (id:180001) as https://chromium.googlesource.com/chromium/src/+/b199f1bef099a0b34576f10fd57e713551e39349
3 years, 6 months ago (2017-05-29 23:00:15 UTC) #60
rohitrao (ping after 24h)
Hi fdoray and gab! We've been seeing hangs/timeouts in iOS unittests since about when this ...
3 years, 6 months ago (2017-06-06 15:02:39 UTC) #61
fdoray
On 2017/06/06 15:02:39, rohitrao (ping after 24h) wrote: > Hi fdoray and gab! > > ...
3 years, 6 months ago (2017-06-06 17:08:04 UTC) #62
rohitrao (ping after 24h)
3 years, 6 months ago (2017-06-08 03:02:16 UTC) #63
Message was sent while issue was closed.
On 2017/06/06 17:08:04, fdoray wrote:
> On 2017/06/06 15:02:39, rohitrao (ping after 24h) wrote:
> > Hi fdoray and gab!
> > 
> > We've been seeing hangs/timeouts in iOS unittests since about when this CL
> > landed.  Does this CL actually change any behavior, or does it just add the
> enum
> > without enabling the new mode?
> > 
> > Is it possible that a broken unittest could be waiting for a task without
ever
> > calling RunUntilIdle(), resulting in the task never being run and the test
> > waiting forever?
> 
> This CL is almost a no-op when the new mode isn't enabled. It is *almost* a
> no-op because MessageLoop task observers are invoked one more time than before
> when ScopedTaskEnvironment::RunUntilIdle is called.
> 
> Do you have specific examples of test timeouts?

To close the loop on this, this is tracked in
https://bugs.chromium.org/p/chromium/issues/detail?id=728216.  The underlying
issue turned out to be a race condition in
ScopedTaskEnvironment::RunUntilIdle().

Powered by Google App Engine
This is Rietveld 408576698