New issue
Advanced search Search tips

Issue 811415 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: ----



Sign in to add a comment

TestSimpleTaskRunner::RunUntilIdle doesn't lock |pending_tasks_|

Project Member Reported by sheriff-...@appspot.gserviceaccount.com, Feb 12 2018

Issue description

Filed by sheriff-o-matic@appspot.gserviceaccount.com on behalf of liberato@google.com

AdSamplerTriggerTest.ReportRejectedByTriggerManager in components_unittests failing on chromium.memory/Linux TSan Tests

Builders failed on: 
- Linux TSan Tests: 
  https://build.chromium.org/p/chromium.memory/builders/Linux%20TSan%20Tests


 
Cc: -liberato@google.com liber...@chromium.org
Labels: OS-Linux
Owner: fdoray@chromium.org
fdoray@ : assigning to you from the task_scheduler owner's list at random for further triage.

seems like everything that touches |pending_tasks_| in TestSimpleTaskRunner takes |lock_|, except RunUntilIdle.  it checks empty() unlocked.  TSan is getting angry about it in various tests.

at least, that's what it looks like to me.
Status: Assigned (was: Available)

Comment 3 by fdoray@chromium.org, Feb 12 2018

Status: Started (was: Assigned)
Started: https://chromium-review.googlesource.com/c/chromium/src/+/914735
Labels: -Sheriff-Chromium
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 13 2018

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

commit 5d8bc4ffb7597a0331adbe43d9d8ec6eaf3ade46
Author: Francois Doray <fdoray@chromium.org>
Date: Tue Feb 13 14:05:15 2018

Remove access race in TestSimpleTaskRunner::RunUntilIdle().

Before this CL, TestSimpleTaskRunner::RunUntilIdle() accessed
|pending_tasks_| without holding a lock. This is racy since
|pending_tasks_| can be written from another thread (e.g. from
PostDelayedTask()).

Bug:  811415 
Change-Id: Ie0bac8f466ffd4f32fce1088449402480cdaeba7
Reviewed-on: https://chromium-review.googlesource.com/914735
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536350}
[modify] https://crrev.com/5d8bc4ffb7597a0331adbe43d9d8ec6eaf3ade46/base/test/test_simple_task_runner.cc

Comment 6 by fdoray@chromium.org, Feb 13 2018

Status: Fixed (was: Started)

Sign in to add a comment