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

Issue 1439613004: Fix a data race in the thread unit tests. (Closed)

Created:
5 years, 1 month ago by nisse-webrtc
Modified:
5 years, 1 month ago
Reviewers:
magjed_webrtc, tommi
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Fix a data race in the thread unit tests. The flag used in thread_unittest.cc:FunctorB is subject to a (mostly harmless) data race. In a tsan build, reproduce using out/Release/rtc_unittests --gtest_filter=AsyncInvokeTest.FireAndForget There are additional tsan warnings, not all deterministic, when running all the rtc_unittets: Some data races related to destructors, and a locking-order-inversion warning. Hence applying this patch does not make the unit tests tsan-clean. I should also add that this is my very first cl, so I'm not at all familiar with the process. Committed: https://crrev.com/d9b75bef5d0749ea94b31cedab0105c241938954 Cr-Commit-Position: refs/heads/master@{#10645}

Patch Set 1 #

Total comments: 19

Patch Set 2 : Update with formatting, explicit constructor, use of CritScope. #

Total comments: 2

Patch Set 3 : Fixed member naming, make constructor explicit, fix assignment return type. #

Total comments: 4

Patch Set 4 : Addressed final(?) nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -39 lines) Patch
M webrtc/base/thread_unittest.cc View 1 2 3 8 chunks +71 lines, -39 lines 0 comments Download

Messages

Total messages: 18 (4 generated)
magjed_webrtc
https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc File webrtc/base/thread_unittest.cc (right): https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc#newcode154 webrtc/base/thread_unittest.cc:154: { You are not following the C++ style guide. ...
5 years, 1 month ago (2015-11-11 15:50:44 UTC) #3
tommi
great start! I'll wait for the next patch set. Btw, you can try running this ...
5 years, 1 month ago (2015-11-11 16:00:03 UTC) #4
nisse-webrtc
https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc File webrtc/base/thread_unittest.cc (right): https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc#newcode154 webrtc/base/thread_unittest.cc:154: { On 2015/11/11 15:50:44, magjed_webrtc wrote: > You are ...
5 years, 1 month ago (2015-11-12 08:39:05 UTC) #5
tommi
https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc File webrtc/base/thread_unittest.cc (right): https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc#newcode156 webrtc/base/thread_unittest.cc:156: AtomicFlag(bool value) : flag(value) {} On 2015/11/12 08:39:05, nisse ...
5 years, 1 month ago (2015-11-12 08:49:52 UTC) #6
magjed_webrtc
https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc File webrtc/base/thread_unittest.cc (right): https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc#newcode154 webrtc/base/thread_unittest.cc:154: { On 2015/11/12 08:39:05, nisse wrote: > On 2015/11/11 ...
5 years, 1 month ago (2015-11-12 09:20:51 UTC) #7
nisse-webrtc
https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc File webrtc/base/thread_unittest.cc (right): https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc#newcode156 webrtc/base/thread_unittest.cc:156: AtomicFlag(bool value) : flag(value) {} On 2015/11/12 08:49:52, tommi ...
5 years, 1 month ago (2015-11-12 09:58:23 UTC) #8
tommi
https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc File webrtc/base/thread_unittest.cc (right): https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc#newcode156 webrtc/base/thread_unittest.cc:156: AtomicFlag(bool value) : flag(value) {} On 2015/11/12 09:20:51, magjed_webrtc ...
5 years, 1 month ago (2015-11-12 10:16:31 UTC) #9
magjed_webrtc
lgtm https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc File webrtc/base/thread_unittest.cc (right): https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc#newcode156 webrtc/base/thread_unittest.cc:156: AtomicFlag(bool value) : flag(value) {} On 2015/11/12 09:58:23, ...
5 years, 1 month ago (2015-11-12 11:04:39 UTC) #10
nisse-webrtc
On 2015/11/12 10:16:31, tommi (webrtc) wrote: > https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc > File webrtc/base/thread_unittest.cc (right): > > https://codereview.webrtc.org/1439613004/diff/1/webrtc/base/thread_unittest.cc#newcode156 ...
5 years, 1 month ago (2015-11-12 11:04:57 UTC) #11
tommi
lgtm with these nits addressed https://codereview.webrtc.org/1439613004/diff/40001/webrtc/base/thread_unittest.cc File webrtc/base/thread_unittest.cc (right): https://codereview.webrtc.org/1439613004/diff/40001/webrtc/base/thread_unittest.cc#newcode154 webrtc/base/thread_unittest.cc:154: class AtomicFlag { AtomicBool ...
5 years, 1 month ago (2015-11-13 14:22:24 UTC) #12
nisse-webrtc
https://codereview.webrtc.org/1439613004/diff/40001/webrtc/base/thread_unittest.cc File webrtc/base/thread_unittest.cc (right): https://codereview.webrtc.org/1439613004/diff/40001/webrtc/base/thread_unittest.cc#newcode154 webrtc/base/thread_unittest.cc:154: class AtomicFlag { On 2015/11/13 14:22:23, tommi (webrtc) wrote: ...
5 years, 1 month ago (2015-11-13 15:07:12 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1439613004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1439613004/60001
5 years, 1 month ago (2015-11-16 08:03:21 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 1 month ago (2015-11-16 08:54:11 UTC) #17
commit-bot: I haz the power
5 years, 1 month ago (2015-11-16 08:54:18 UTC) #18
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/d9b75bef5d0749ea94b31cedab0105c241938954
Cr-Commit-Position: refs/heads/master@{#10645}

Powered by Google App Engine
This is Rietveld 408576698