|
|
Created:
3 years, 10 months ago by hbos Modified:
3 years, 9 months ago CC:
webrtc-reviews_webrtc.org, henrika_webrtc, Andrew MacDonald, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, peah-webrtc, minyue-webrtc, the sun Target Ref:
refs/heads/master Project:
webrtc Visibility:
Public. |
DescriptionFix TSAN race in webrtc::voe::Channel.
|transport_overhead_per_packet_| and |rtp_overhead_per_packet_| could
be read from and written to on different threads concurrently. This CL
introduces a lock to GUARD these variables.
NOTRY because master.tryserver.webrtc.linux_ubsan_vptr is broken, all
other tests pass.
BUG=webrtc:7231
NOTRY=True
Review-Url: https://codereview.webrtc.org/2710363003
Cr-Commit-Position: refs/heads/master@{#16900}
Committed: https://chromium.googlesource.com/external/webrtc/+/3fd31fe5023b299a531ee1ac74234aeba75026dd
Patch Set 1 : Running tsan bots before tests were disabled #Patch Set 2 : Rebase with master and re-enable the tests that were flaking on tsan #
Total comments: 2
Patch Set 3 : Merge and added TODO #
Total comments: 2
Patch Set 4 : EXCLUSIVE_LOCKS_REQUIRED used (and moved TODO to right function, whoops) #
Messages
Total messages: 35 (21 generated)
Description was changed from ========== Fix TSAN race in webrtc::voe::Channel BUG= ========== to ========== Fix TSAN race in webrtc::voe::Channel BUG=webrtc:7231 ==========
Description was changed from ========== Fix TSAN race in webrtc::voe::Channel BUG=webrtc:7231 ========== to ========== Fix TSAN race in webrtc::voe::Channel. |transport_overhead_per_packet_| and |rtp_overhead_per_packet_| could be read from and written to on different threads concurrently. This CL introduces a lock to GUARD these variables. BUG=webrtc:7231 ==========
hbos@webrtc.org changed reviewers: + nisse@webrtc.org, solenberg@webrtc.org
Please take a look, solenberg and nisse.
On 2017/02/24 14:52:06, hbos wrote: > Please take a look, solenberg and nisse. The problem is that Channel::SetTransportOverhead and Channel::OnOverheadChanged can be invoked from different threads, see bug for details.
The CQ bit was checked by hbos@webrtc.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Ping solenberg
lgtm https://codereview.webrtc.org/2710363003/diff/20001/webrtc/voice_engine/chann... File webrtc/voice_engine/channel.cc (right): https://codereview.webrtc.org/2710363003/diff/20001/webrtc/voice_engine/chann... webrtc/voice_engine/channel.cc:2760: void Channel::OnOverheadChanged(size_t overhead_bytes_per_packet) { Please add: // TODO(solenberg): Make AudioSendStream an OverheadObserver instead.
https://codereview.webrtc.org/2710363003/diff/20001/webrtc/voice_engine/chann... File webrtc/voice_engine/channel.cc (right): https://codereview.webrtc.org/2710363003/diff/20001/webrtc/voice_engine/chann... webrtc/voice_engine/channel.cc:2760: void Channel::OnOverheadChanged(size_t overhead_bytes_per_packet) { On 2017/02/28 11:13:10, the sun wrote: > Please add: > // TODO(solenberg): Make AudioSendStream an OverheadObserver instead. Done.
The CQ bit was checked by hbos@webrtc.org
The patchset sent to the CQ was uploaded after l-g-t-m from solenberg@webrtc.org Link to the patchset: https://codereview.webrtc.org/2710363003/#ps40001 (title: "Merge and added TODO")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/14239)
hta@webrtc.org changed reviewers: + hta@webrtc.org
lgtm https://codereview.webrtc.org/2710363003/diff/40001/webrtc/voice_engine/chann... File webrtc/voice_engine/channel.h (right): https://codereview.webrtc.org/2710363003/diff/40001/webrtc/voice_engine/chann... webrtc/voice_engine/channel.h:419: void UpdateOverheadForEncoder(size_t overhead_per_packet); Should there be a lock notation here saying "must be called with overhead_per_packet_lock held"? It's private, so I guess it's OK to leave it out.
https://codereview.webrtc.org/2710363003/diff/40001/webrtc/voice_engine/chann... File webrtc/voice_engine/channel.h (right): https://codereview.webrtc.org/2710363003/diff/40001/webrtc/voice_engine/chann... webrtc/voice_engine/channel.h:419: void UpdateOverheadForEncoder(size_t overhead_per_packet); On 2017/02/28 12:21:20, hta-webrtc wrote: > Should there be a lock notation here saying "must be called with > overhead_per_packet_lock held"? > > It's private, so I guess it's OK to leave it out. Good idea! There's EXCLUSIVE_LOCKS_REQUIRED. Now using that, which also meant I could remove the function parameter and calculate it inside of the function instead knowing the lock is already held.
The CQ bit was checked by hbos@webrtc.org
The patchset sent to the CQ was uploaded after l-g-t-m from solenberg@webrtc.org, hta@webrtc.org Link to the patchset: https://codereview.webrtc.org/2710363003/#ps60001 (title: "EXCLUSIVE_LOCKS_REQUIRED used (and moved TODO to right function, whoops)")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_ubsan_vptr on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_ubsan_vptr/builds...)
Description was changed from ========== Fix TSAN race in webrtc::voe::Channel. |transport_overhead_per_packet_| and |rtp_overhead_per_packet_| could be read from and written to on different threads concurrently. This CL introduces a lock to GUARD these variables. BUG=webrtc:7231 ========== to ========== Fix TSAN race in webrtc::voe::Channel. |transport_overhead_per_packet_| and |rtp_overhead_per_packet_| could be read from and written to on different threads concurrently. This CL introduces a lock to GUARD these variables. BUG=webrtc:7231 CQ_EXCLUDE_TRYBOTS=master.tryserver.webrtc.linux_ubsan_vptr ==========
The CQ bit was checked by hbos@webrtc.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
The CQ bit was unchecked by hbos@webrtc.org
Description was changed from ========== Fix TSAN race in webrtc::voe::Channel. |transport_overhead_per_packet_| and |rtp_overhead_per_packet_| could be read from and written to on different threads concurrently. This CL introduces a lock to GUARD these variables. BUG=webrtc:7231 CQ_EXCLUDE_TRYBOTS=master.tryserver.webrtc.linux_ubsan_vptr ========== to ========== Fix TSAN race in webrtc::voe::Channel. |transport_overhead_per_packet_| and |rtp_overhead_per_packet_| could be read from and written to on different threads concurrently. This CL introduces a lock to GUARD these variables. NOTRY because master.tryserver.webrtc.linux_ubsan_vptr is broken, all other tests pass. BUG=webrtc:7231 NOTRY=True ==========
The CQ bit was checked by hbos@webrtc.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1488289276410310, "parent_rev": "4974df41838367e4d50c42bef3be121c7ac6e331", "commit_rev": "3fd31fe5023b299a531ee1ac74234aeba75026dd"}
Message was sent while issue was closed.
Description was changed from ========== Fix TSAN race in webrtc::voe::Channel. |transport_overhead_per_packet_| and |rtp_overhead_per_packet_| could be read from and written to on different threads concurrently. This CL introduces a lock to GUARD these variables. NOTRY because master.tryserver.webrtc.linux_ubsan_vptr is broken, all other tests pass. BUG=webrtc:7231 NOTRY=True ========== to ========== Fix TSAN race in webrtc::voe::Channel. |transport_overhead_per_packet_| and |rtp_overhead_per_packet_| could be read from and written to on different threads concurrently. This CL introduces a lock to GUARD these variables. NOTRY because master.tryserver.webrtc.linux_ubsan_vptr is broken, all other tests pass. BUG=webrtc:7231 NOTRY=True Review-Url: https://codereview.webrtc.org/2710363003 Cr-Commit-Position: refs/heads/master@{#16900} Committed: https://chromium.googlesource.com/external/webrtc/+/3fd31fe5023b299a531ee1ac7... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/external/webrtc/+/3fd31fe5023b299a531ee1ac7... |