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

Issue 1736763006: Fix for intermittent tsan2 errors from SendRtpToRtpOnThread and SendSrtpToSrtpOnThread. (Closed)

Created:
4 years, 10 months ago by ossu
Modified:
4 years, 9 months ago
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 for intermittent tsan2 errors from SendRtpToRtpOnThread and SendSrtpToSrtpOnThread. Changed the channel unittest to use locking when reading/writing the result variable. To do this, I had to move the result into the thread object, which in turn required me to properly handle the lifetime of the thread object, since it cannot disappear while we want to read the result. It is still possible to have the result being written to a local variable, but it will only be updated as the thread object is destroyed. It is used to for the implementation of CallOnThreadAndWaitForDone. The old CallOnThread is gone and replaced by ScopedCallThread instead. BUG=webrtc:5524 Committed: https://crrev.com/292d658b2035a5ec6c7611bf2cd85e33168f07c7 Cr-Commit-Position: refs/heads/master@{#12027}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rewrote the result handling using locking instead of std::atomic<>. #

Patch Set 3 : Removed suppressions for SendSrtpToSrtpOnThread #

Total comments: 4

Patch Set 4 : Moved two stars. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -37 lines) Patch
M webrtc/build/sanitizers/tsan_suppressions_webrtc.cc View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M webrtc/pc/channel_unittest.cc View 1 2 3 4 chunks +66 lines, -32 lines 0 comments Download

Messages

Total messages: 35 (16 generated)
ossu
Made a small fix for the data race in SendRtpToRtpOnThread and SendSrtpToSrtpOnThread in channel_unittest.cc. It ...
4 years, 9 months ago (2016-03-01 15:00:38 UTC) #3
Taylor Brandstetter
lgtm, as long as there's not some second reason to avoid <atomic> (besides performance) that's ...
4 years, 9 months ago (2016-03-01 20:03:42 UTC) #5
pthatcher1
+tommi for his opinion on std::atomic<> I'm fine with this CL if he is fine ...
4 years, 9 months ago (2016-03-02 00:12:17 UTC) #7
tommi (sloooow) - chröme
std::atomic is still on the explicitly-banned list in Chromium, so let's wait for the feature ...
4 years, 9 months ago (2016-03-03 11:44:28 UTC) #9
tommi (sloooow) - chröme
On 2016/03/03 11:44:28, tommi-chromium wrote: > std::atomic is still on the explicitly-banned list in Chromium, ...
4 years, 9 months ago (2016-03-03 11:44:43 UTC) #10
ossu
On 2016/03/03 11:44:43, tommi-chromium wrote: > On 2016/03/03 11:44:28, tommi-chromium wrote: > > std::atomic is ...
4 years, 9 months ago (2016-03-03 13:06:21 UTC) #11
ossu
Looked at atomicops but found it more straight-forward to use locking, since either solution would ...
4 years, 9 months ago (2016-03-04 10:48:42 UTC) #14
Taylor Brandstetter
lgtm; thanks a bunch for taking the time to address flaky tests. Also, you might ...
4 years, 9 months ago (2016-03-04 16:25:21 UTC) #15
ossu
No problem! I had a little time to spend and I just know how annoying ...
4 years, 9 months ago (2016-03-04 16:34:34 UTC) #16
ossu
Alright. Pushed this through trybots and they seem happy. Could someone with owner status please ...
4 years, 9 months ago (2016-03-15 13:31:44 UTC) #17
pthatcher1
lgtm I'd prefer you simplify it into one class, but I won't block being able ...
4 years, 9 months ago (2016-03-15 16:38:20 UTC) #18
ossu
https://codereview.webrtc.org/1736763006/diff/40001/webrtc/pc/channel_unittest.cc File webrtc/pc/channel_unittest.cc (right): https://codereview.webrtc.org/1736763006/diff/40001/webrtc/pc/channel_unittest.cc#newcode412 webrtc/pc/channel_unittest.cc:412: CallThread(ChannelTest<T>* obj, Method method, bool *result = nullptr) On ...
4 years, 9 months ago (2016-03-16 09:51:46 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736763006/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736763006/100001
4 years, 9 months ago (2016-03-16 13:39:01 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/4177)
4 years, 9 months ago (2016-03-16 13:45:20 UTC) #26
ossu
Added kjellander as reviewer, since we need an owner of the suppressions to give their ...
4 years, 9 months ago (2016-03-16 14:05:50 UTC) #28
kjellander_webrtc
On 2016/03/16 14:05:50, ossu wrote: > Added kjellander as reviewer, since we need an owner ...
4 years, 9 months ago (2016-03-17 06:43:51 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736763006/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736763006/100001
4 years, 9 months ago (2016-03-17 09:28:03 UTC) #31
commit-bot: I haz the power
Committed patchset #4 (id:100001)
4 years, 9 months ago (2016-03-17 09:31:18 UTC) #33
commit-bot: I haz the power
4 years, 9 months ago (2016-03-17 09:31:21 UTC) #35
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/292d658b2035a5ec6c7611bf2cd85e33168f07c7
Cr-Commit-Position: refs/heads/master@{#12027}

Powered by Google App Engine
This is Rietveld 408576698