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

Issue 1263223002: Adding locking to webrtc::voe::Channel to fix race conditions (Closed)

Created:
5 years, 4 months ago by Taylor Brandstetter
Modified:
5 years, 4 months ago
CC:
hlundin-webrtc, henrika_webrtc, tterriberry_mozilla.com, webrtc-reviews_webrtc.org
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Adding locking to webrtc::voe::Channel to fix race conditions Some members are accessed from the video processing thread for the VoEVideoSync interface, and thus need to be protected. This is a problem that TSan sometimes reports. Also moved UpdatePlayoutTimestamp to private section since it's only needed internally. And renamed least_required_delay_ms to LeastRequiredDelayMs, since it no longer just returns a cached value. BUG=webrtc:4663 Committed: https://crrev.com/743758816853df2040a21c5652b0d0e238b1512f Cr-Commit-Position: refs/heads/master@{#9706}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Getting rid of cached "least_required_delay_ms_" #

Patch Set 3 : Tightening critical sections #

Patch Set 4 : Using GUARDED_BY, scoped_ptr, and newer naming conventions #

Patch Set 5 : Fixing typo that was somehow introduced.. #

Total comments: 1

Patch Set 6 : Responding to comment #

Total comments: 8

Patch Set 7 : Moved LeastRequiredDelayMs definition to cc file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -64 lines) Patch
M webrtc/voice_engine/channel.h View 1 2 3 4 5 6 4 chunks +7 lines, -7 lines 0 comments Download
M webrtc/voice_engine/channel.cc View 1 2 3 4 5 6 7 chunks +70 lines, -56 lines 0 comments Download
M webrtc/voice_engine/voe_video_sync_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 29 (10 generated)
Taylor Brandstetter
Hi Tina, I'm working on getting a test working under TSan, and found what seem ...
5 years, 4 months ago (2015-08-03 21:13:10 UTC) #2
tlegrand-webrtc
On 2015/08/03 at 21:13:10, deadbeef wrote: > Hi Tina, > > I'm working on getting ...
5 years, 4 months ago (2015-08-04 06:50:27 UTC) #4
hlundin-webrtc
One comment, but I'll let solenberg@ remain the sole reviewer. https://codereview.webrtc.org/1263223002/diff/1/webrtc/voice_engine/channel.h File webrtc/voice_engine/channel.h (right): https://codereview.webrtc.org/1263223002/diff/1/webrtc/voice_engine/channel.h#newcode484 ...
5 years, 4 months ago (2015-08-04 06:56:46 UTC) #5
the sun
https://codereview.webrtc.org/1263223002/diff/1/webrtc/voice_engine/channel.cc File webrtc/voice_engine/channel.cc (right): https://codereview.webrtc.org/1263223002/diff/1/webrtc/voice_engine/channel.cc#newcode3939 webrtc/voice_engine/channel.cc:3939: CriticalSectionScoped cs(&video_sync_critsect_); Can you grab this just prior to ...
5 years, 4 months ago (2015-08-04 09:36:47 UTC) #6
hlundin-webrtc
https://codereview.webrtc.org/1263223002/diff/1/webrtc/voice_engine/channel.h File webrtc/voice_engine/channel.h (right): https://codereview.webrtc.org/1263223002/diff/1/webrtc/voice_engine/channel.h#newcode278 webrtc/voice_engine/channel.h:278: CriticalSectionScoped cs(&video_sync_critsect_); On 2015/08/04 09:36:47, the sun wrote: > ...
5 years, 4 months ago (2015-08-04 09:52:10 UTC) #8
Taylor Brandstetter
https://codereview.webrtc.org/1263223002/diff/1/webrtc/voice_engine/channel.cc File webrtc/voice_engine/channel.cc (right): https://codereview.webrtc.org/1263223002/diff/1/webrtc/voice_engine/channel.cc#newcode3939 webrtc/voice_engine/channel.cc:3939: CriticalSectionScoped cs(&video_sync_critsect_); On 2015/08/04 09:36:47, the sun wrote: > ...
5 years, 4 months ago (2015-08-05 03:04:48 UTC) #10
the sun
On 2015/08/05 03:04:48, Taylor Brandstetter wrote: > https://codereview.webrtc.org/1263223002/diff/1/webrtc/voice_engine/channel.cc > File webrtc/voice_engine/channel.cc (right): > > https://codereview.webrtc.org/1263223002/diff/1/webrtc/voice_engine/channel.cc#newcode3939 ...
5 years, 4 months ago (2015-08-05 08:49:03 UTC) #11
the sun
https://codereview.webrtc.org/1263223002/diff/80001/webrtc/voice_engine/channel.cc File webrtc/voice_engine/channel.cc (right): https://codereview.webrtc.org/1263223002/diff/80001/webrtc/voice_engine/channel.cc#newcode3627 webrtc/voice_engine/channel.cc:3627: unsigned int playout_timestamp_rtp; Nits: use uint32_t (type of the ...
5 years, 4 months ago (2015-08-05 08:49:12 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1263223002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1263223002/100001
5 years, 4 months ago (2015-08-05 17:31:04 UTC) #15
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/320)
5 years, 4 months ago (2015-08-05 17:32:19 UTC) #17
Taylor Brandstetter
On 2015/08/05 17:32:19, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 4 months ago (2015-08-05 17:46:41 UTC) #18
the sun
On 2015/08/05 17:46:41, Taylor Brandstetter wrote: > On 2015/08/05 17:32:19, commit-bot: I haz the power ...
5 years, 4 months ago (2015-08-06 08:12:56 UTC) #19
Henrik Grunell WebRTC
LGTM. I think you should add to the CL description that a function is removed ...
5 years, 4 months ago (2015-08-12 15:03:22 UTC) #21
Henrik Grunell WebRTC
On 2015/08/12 15:03:22, Henrik Grunell (webrtc) wrote: > LGTM. > > I think you should ...
5 years, 4 months ago (2015-08-12 15:04:34 UTC) #22
Taylor Brandstetter
Thanks Henrik. My bad for not mailing you earlier; I'm still getting used to the ...
5 years, 4 months ago (2015-08-12 19:49:04 UTC) #23
Henrik Grunell WebRTC
lgtm https://codereview.webrtc.org/1263223002/diff/100001/webrtc/voice_engine/channel.cc File webrtc/voice_engine/channel.cc (right): https://codereview.webrtc.org/1263223002/diff/100001/webrtc/voice_engine/channel.cc#newcode3924 webrtc/voice_engine/channel.cc:3924: CriticalSectionScoped cs(video_sync_lock_.get()); On 2015/08/12 19:49:04, Taylor Brandstetter wrote: ...
5 years, 4 months ago (2015-08-13 08:25:02 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1263223002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1263223002/120001
5 years, 4 months ago (2015-08-13 18:26:39 UTC) #27
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 4 months ago (2015-08-13 19:09:15 UTC) #28
commit-bot: I haz the power
5 years, 4 months ago (2015-08-13 19:09:28 UTC) #29
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/743758816853df2040a21c5652b0d0e238b1512f
Cr-Commit-Position: refs/heads/master@{#9706}

Powered by Google App Engine
This is Rietveld 408576698