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

Issue 1222123002: Fix a race in ThreadLocalStorage::StaticSlot::initialized which triggers a TSAN error. (Closed)

Created:
5 years, 5 months ago by Anand Mistry (off Chromium)
Modified:
5 years, 5 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a race in ThreadLocalStorage::StaticSlot::initialized which triggers a TSAN error. Also fix a data race with ThreadData::status_. TSan doesn't see this race explicitly, but it contributes to a race with the use of StaticSlot in ThreadData::tls_index_. BUG=268941 TESTED=Ran base_unittests. TSAN errors before: lots, oodles, slathers, acres After: Zip, zilch, nadda Committed: https://crrev.com/42d16882080508876676ef164c1f7a863ca1fbf3 Cr-Commit-Position: refs/heads/master@{#339219}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Fix races with ThreadData::status_. #

Patch Set 3 : Rebase #

Patch Set 4 : Fix MSVC compile warning. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -20 lines) Patch
M base/threading/thread_local_storage.h View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
M base/threading/thread_local_storage.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M base/tracked_objects.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M base/tracked_objects.cc View 1 7 chunks +12 lines, -11 lines 0 comments Download
M build/sanitizers/tsan_suppressions.cc View 1 2 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (7 generated)
Alexander Potapenko
Thanks for working on this! https://codereview.chromium.org/1222123002/diff/1/base/tracked_objects.cc File base/tracked_objects.cc (right): https://codereview.chromium.org/1222123002/diff/1/base/tracked_objects.cc#newcode368 base/tracked_objects.cc:368: CHECK(tls_index_.initialized()); This one is ...
5 years, 5 months ago (2015-07-02 08:22:41 UTC) #2
Anand Mistry (off Chromium)
I think removing the suppression triggered a different (but maybe related) tsan error. I'll take ...
5 years, 5 months ago (2015-07-02 08:49:11 UTC) #3
Alexander Potapenko
Yeah, I've just checked that, the error is a different one.
5 years, 5 months ago (2015-07-02 09:24:17 UTC) #4
Anand Mistry (off Chromium)
5 years, 5 months ago (2015-07-03 01:34:50 UTC) #6
Anand Mistry (off Chromium)
https://codereview.chromium.org/1222123002/diff/1/base/tracked_objects.cc File base/tracked_objects.cc (right): https://codereview.chromium.org/1222123002/diff/1/base/tracked_objects.cc#newcode735 base/tracked_objects.cc:735: status_ = kInitialStartupState; I've been thinking about this, and ...
5 years, 5 months ago (2015-07-04 13:09:55 UTC) #7
Anand Mistry (off Chromium)
Ping! Comments?
5 years, 5 months ago (2015-07-13 00:41:43 UTC) #8
Nico
(the ping is for glider, right?)
5 years, 5 months ago (2015-07-13 02:36:52 UTC) #9
Anand Mistry (off Chromium)
On 2015/07/13 02:36:52, Nico wrote: > (the ping is for glider, right?) Yes, for now... ...
5 years, 5 months ago (2015-07-13 03:01:58 UTC) #10
Alexander Potapenko
https://codereview.chromium.org/1222123002/diff/1/base/tracked_objects.cc File base/tracked_objects.cc (right): https://codereview.chromium.org/1222123002/diff/1/base/tracked_objects.cc#newcode735 base/tracked_objects.cc:735: status_ = kInitialStartupState; On 2015/07/04 13:09:55, Anand Mistry wrote: ...
5 years, 5 months ago (2015-07-13 09:26:17 UTC) #11
Anand Mistry (off Chromium)
https://codereview.chromium.org/1222123002/diff/1/base/tracked_objects.cc File base/tracked_objects.cc (right): https://codereview.chromium.org/1222123002/diff/1/base/tracked_objects.cc#newcode735 base/tracked_objects.cc:735: status_ = kInitialStartupState; On 2015/07/13 09:26:17, Alexander Potapenko wrote: ...
5 years, 5 months ago (2015-07-15 08:00:01 UTC) #12
Anand Mistry (off Chromium)
I ran base_perftests and it looks like the results are too noisy to say whether ...
5 years, 5 months ago (2015-07-16 01:50:01 UTC) #13
Alexander Potapenko
On 2015/07/16 01:50:01, Anand Mistry wrote: > I ran base_perftests and it looks like the ...
5 years, 5 months ago (2015-07-16 08:19:16 UTC) #14
Nico
can you update the cl description to also include the status_ change? with that, lgtm
5 years, 5 months ago (2015-07-16 20:49:54 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1222123002/40001
5 years, 5 months ago (2015-07-17 01:25:23 UTC) #18
eugenis
On 2015/07/17 01:25:23, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
5 years, 5 months ago (2015-07-17 01:58:01 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/17669) win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, ...
5 years, 5 months ago (2015-07-17 02:01:48 UTC) #21
Anand Mistry (off Chromium)
On 2015/07/17 01:58:01, eugenis wrote: > On 2015/07/17 01:25:23, commit-bot: I haz the power wrote: ...
5 years, 5 months ago (2015-07-17 02:28:26 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1222123002/60001
5 years, 5 months ago (2015-07-17 02:31:42 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 5 months ago (2015-07-17 03:58:13 UTC) #26
commit-bot: I haz the power
5 years, 5 months ago (2015-07-17 03:59:05 UTC) #27
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/42d16882080508876676ef164c1f7a863ca1fbf3
Cr-Commit-Position: refs/heads/master@{#339219}

Powered by Google App Engine
This is Rietveld 408576698