New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 878319 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

TSan reports a data race in webrtc::RtpVideoStreamReceiver::OnRtpPacket

Project Member Reported by glider@chromium.org, Aug 28

Issue description

See https://chromium-swarm.appspot.com/task?id=3f9875bf391b0910&refresh=10&show_raw=1:

==================
WARNING: ThreadSanitizer: data race (pid=13555)
  Write of size 8 at 0x7b8800031298 by thread T14 (mutexes: read M191256817836574216, write M191820197286646352):
    #0 webrtc::RtpVideoStreamReceiver::OnRtpPacket(webrtc::RtpPacketReceived const&) third_party/webrtc/video/rtp_video_stream_receiver.cc:283:34 (content_browsertests+0x9b91242)
    #1 non-virtual thunk to webrtc::RtpVideoStreamReceiver::OnRtpPacket(webrtc::RtpPacketReceived const&) third_party/webrtc/video/rtp_video_stream_receiver.cc (content_browsertests+0x9b917c4)
    #2 webrtc::RtpDemuxer::OnRtpPacket(webrtc::RtpPacketReceived const&) third_party/webrtc/call/rtp_demuxer.cc:157:11 (content_browsertests+0x271923c)
    #3 webrtc::RtpStreamReceiverController::OnRtpPacket(webrtc::RtpPacketReceived const&) third_party/webrtc/call/rtp_stream_receiver_controller.cc:54:19 (content_browsertests+0x271c0e7)
    #4 webrtc::internal::Call::DeliverRtp(webrtc::MediaType, rtc::CopyOnWriteBuffer, long) third_party/webrtc/call/call.cc:1281:36 (content_browsertests+0x9ad1bdc)
    #5 webrtc::internal::Call::DeliverPacket(webrtc::MediaType, rtc::CopyOnWriteBuffer, long) third_party/webrtc/call/call.cc:1305:10 (content_browsertests+0x9ad1fbe)
    #6 non-virtual thunk to webrtc::internal::Call::DeliverPacket(webrtc::MediaType, rtc::CopyOnWriteBuffer, long) third_party/webrtc/call/call.cc (content_browsertests+0x9ad2034)
    #7 cricket::WebRtcVideoChannel::OnPacketReceived(rtc::CopyOnWriteBuffer*, rtc::PacketTime const&) third_party/webrtc/media/engine/webrtcvideoengine.cc:1434:26 (content_browsertests+0x9d9a5e0)
    #8 cricket::BaseChannel::ProcessPacket(bool, rtc::CopyOnWriteBuffer const&, rtc::PacketTime const&) third_party/webrtc/pc/channel.cc:520:21 (content_browsertests+0x9439444)
    #9 CallMethod<0, 1, 2> third_party/webrtc/rtc_base/bind.h:172:12 (content_browsertests+0x9445641)
    #10 operator() third_party/webrtc/rtc_base/bind.h:163 (content_browsertests+0x9445641)
    #11 rtc::FireAndForgetAsyncClosure<rtc::MethodFunctor<cricket::BaseChannel, void (cricket::BaseChannel::*)(bool, rtc::CopyOnWriteBuffer const&, rtc::PacketTime const&), void, bool, rtc::CopyOnWriteBuffer const&, rtc::PacketTime const&> >::Execute() third_party/webrtc/rtc_base/asyncinvoker-inl.h:53 (content_browsertests+0x9445641)
    #12 rtc::AsyncInvoker::OnMessage(rtc::Message*) third_party/webrtc/rtc_base/asyncinvoker.cc:45:22 (content_browsertests+0x93e4f9d)
    #13 jingle_glue::JingleThreadWrapper::Dispatch(rtc::Message*) jingle/glue/thread_wrapper.cc:157:22 (content_browsertests+0xa0904c3)
    #14 jingle_glue::JingleThreadWrapper::RunTask(int) jingle/glue/thread_wrapper.cc:279:7 (content_browsertests+0xa090edd)
    #15 Invoke<void (jingle_glue::JingleThreadWrapper::*)(int), const base::WeakPtr<jingle_glue::JingleThreadWrapper> &, const int &> base/bind_internal.h:516:12 (content_browsertests+0xa0914c1)
    #16 MakeItSo<void (jingle_glue::JingleThreadWrapper::*const &)(int), const base::WeakPtr<jingle_glue::JingleThreadWrapper> &, const int &> base/bind_internal.h:636 (content_browsertests+0xa0914c1)
    #17 RunImpl<void (jingle_glue::JingleThreadWrapper::*const &)(int), const std::__1::tuple<base::WeakPtr<jingle_glue::JingleThreadWrapper>, int> &, 0, 1> base/bind_internal.h:689 (content_browsertests+0xa0914c1)
    #18 base::internal::Invoker<base::internal::BindState<void (jingle_glue::JingleThreadWrapper::*)(int), base::WeakPtr<jingle_glue::JingleThreadWrapper>, int>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:671 (content_browsertests+0xa0914c1)
    #19 Run base/callback.h:99:12 (content_browsertests+0x5404c87)
    #20 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:101 (content_browsertests+0x5404c87)
    #21 base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:434:46 (content_browsertests+0x5403491)
    #22 DeferOrRunPendingTask base/message_loop/message_loop.cc:445:5 (content_browsertests+0x540398b)
    #23 base::MessageLoop::DoWork() base/message_loop/message_loop.cc:517 (content_browsertests+0x540398b)
    #24 base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:37:31 (content_browsertests+0x5407e21)
    #25 Run base/message_loop/message_loop.cc:386:12 (content_browsertests+0x5403060)
    #26 non-virtual thunk to base::MessageLoop::Run(bool) base/message_loop/message_loop.cc (content_browsertests+0x5403060)
    #27 base::RunLoop::Run() base/run_loop.cc:102:14 (content_browsertests+0x543524a)
    #28 base::Thread::Run(base::RunLoop*) base/threading/thread.cc:262:13 (content_browsertests+0x54955f9)
    #29 base::Thread::ThreadMain() base/threading/thread.cc:357:3 (content_browsertests+0x54958ae)
    #30 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:76:13 (content_browsertests+0x54ea9dd)

  Previous read of size 1 at 0x7b8800031298 by thread T20 (mutexes: write M190131038188581336, write M18298):
    #0 operator bool third_party/abseil-cpp/absl/types/optional.h:815:68 (content_browsertests+0x9b90308)
    #1 webrtc::RtpVideoStreamReceiver::GetSyncInfo() const third_party/webrtc/video/rtp_video_stream_receiver.cc:179 (content_browsertests+0x9b90308)
    #2 GetInfo third_party/webrtc/video/video_receive_stream.cc:373:34 (content_browsertests+0x9b653e3)
    #3 non-virtual thunk to webrtc::internal::VideoReceiveStream::GetInfo() const third_party/webrtc/video/video_receive_stream.cc (content_browsertests+0x9b653e3)
    #4 webrtc::RtpStreamsSynchronizer::Process() third_party/webrtc/video/rtp_streams_synchronizer.cc:84:64 (content_browsertests+0x9b8e219)
    #5 webrtc::ProcessThreadImpl::Process() third_party/webrtc/modules/utility/source/process_thread_impl.cc:193:21 (content_browsertests+0x5df815c)
    #6 webrtc::ProcessThreadImpl::Run(void*) third_party/webrtc/modules/utility/source/process_thread_impl.cc:167:48 (content_browsertests+0x5df7709)
    #7 Run third_party/webrtc/rtc_base/platform_thread.cc:183:10 (content_browsertests+0x25a9438)
    #8 rtc::PlatformThread::StartThread(void*) third_party/webrtc/rtc_base/platform_thread.cc:81 (content_browsertests+0x25a9438)

  Location is heap block of size 5416 at 0x7b8800030000 allocated by thread T14:
    #0 operator new(unsigned long) /b/swarming/w/ir/kitchen-workdir/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc:65:3 (content_browsertests+0x1a36a4d)
    #1 webrtc::internal::Call::CreateVideoReceiveStream(webrtc::VideoReceiveStream::Config) third_party/webrtc/call/call.cc:802:40 (content_browsertests+0x9ace6b9)
    #2 cricket::WebRtcVideoChannel::WebRtcVideoReceiveStream::RecreateWebRtcVideoStream() third_party/webrtc/media/engine/webrtcvideoengine.cc:2457:20 (content_browsertests+0x9d9e7c9)
    #3 cricket::WebRtcVideoChannel::WebRtcVideoReceiveStream::SetLocalSsrc(unsigned int) third_party/webrtc/media/engine/webrtcvideoengine.cc:2382:3 (content_browsertests+0x9d976a5)
    #4 cricket::WebRtcVideoChannel::AddSendStream(cricket::StreamParams const&) third_party/webrtc/media/engine/webrtcvideoengine.cc:1144:18 (content_browsertests+0x9d96fc4)
    #5 cricket::BaseChannel::UpdateLocalStreams_w(std::__1::vector<cricket::StreamParams, std::__1::allocator<cricket::StreamParams> > const&, webrtc::SdpType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) third_party/webrtc/pc/channel.cc:608:28 (content_browsertests+0x9439995)
    #6 cricket::VideoChannel::SetLocalContent_w(cricket::MediaContentDescription const*, webrtc::SdpType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) third_party/webrtc/pc/channel.cc:957:8 (content_browsertests+0x943dc28)
    #7 CallMethod<0, 1, 2> third_party/webrtc/rtc_base/bind.h:172:12 (content_browsertests+0x9444f45)
...

 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 30

The following revision refers to this bug:
  https://webrtc.googlesource.com/src.git/+/b0d4b415cc59916a300ceb478b29759bcb94cf8f

commit b0d4b415cc59916a300ceb478b29759bcb94cf8f
Author: Niels Möller <nisse@webrtc.org>
Date: Thu Aug 30 12:33:43 2018

Use a lock to protect members accessed by RtpVideoStreamReceiver::GetSyncInfo()

Proper synchronization was overlooked in
https://webrtc-review.googlesource.com/93261

Bug:  chromium:878319 , webrtc:7135
Change-Id: Ifc850c4d67a4e9dd2660dab9b6da67258338553e
Reviewed-on: https://webrtc-review.googlesource.com/96461
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24495}
[modify] https://crrev.com/b0d4b415cc59916a300ceb478b29759bcb94cf8f/video/rtp_video_stream_receiver.cc
[modify] https://crrev.com/b0d4b415cc59916a300ceb478b29759bcb94cf8f/video/rtp_video_stream_receiver.h

Status: Fixed (was: Assigned)
Hopefully fixed with above cl. Not yet rolled into chromium, though.
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed774e4540ee3afb2dd4ac22ef3fb7bcc89f7e57

commit ed774e4540ee3afb2dd4ac22ef3fb7bcc89f7e57
Author: webrtc-chromium-autoroll <webrtc-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Mon Sep 03 10:54:18 2018

Roll src/third_party/webrtc f18b35284288..689b5874d4fb (50 commits)

https://webrtc.googlesource.com/src.git/+log/f18b35284288..689b5874d4fb


git log f18b35284288..689b5874d4fb --date=short --no-merges --format='%ad %ae %s'
2018-09-03 nisse@webrtc.org Use monotonic clock for PhysicalSocketServer timeouts.
2018-09-01 phoglund@webrtc.org Roll chromium_revision c1d4701..bbc67a1bd5 (585833:587546)
2018-09-01 phoglund@webrtc.org Remove MSVC debug bots from CQ.
2018-08-31 julien.isorce@chromium.org ScreenCapturerMac: destroy the streams and remove the DisplayStreamManager
2018-08-31 steveanton@webrtc.org Use AsyncInvoker in DtmfSender instead of MessageHandler
2018-08-31 steveanton@webrtc.org Use AsyncInvoker in DataChannel instead of MessageHandler
2018-08-31 steveanton@webrtc.org Use AsyncInvoker in JsepTransportController instead of MessageHandler
2018-08-31 steveanton@webrtc.org Use AsyncInvoker in PeerConnection instead of MessageHandler
2018-08-31 srte@webrtc.org Removes redundant starting rate.
2018-08-31 devicentepena@webrtc.org AEC3: option for using the stationarity estimator at render from the beginning of the call
2018-08-31 danilchap@webrtc.org Uninline non-trivial AudioOptions functions
2018-08-31 danilchap@webrtc.org Implement periodic cancelable task for task queue
2018-08-31 phoglund@webrtc.org Bump xcode versions for WebRTC bots.
2018-08-31 alessiob@webrtc.org Moving LappedTransform, Blocker and AudioRingBuffer.
2018-08-31 danilchap@webrtc.org Cleanup RtpPacketizerVP8 tests
2018-08-31 nisse@webrtc.org Reland "Add spatial index to EncodedImage."
2018-08-31 peah@webrtc.org AEC3: Parametrize the shadow filter output usage
2018-08-31 qingsi@google.com Add the multicast DNS message format.
2018-08-30 alessiob@webrtc.org Removing the intelligibility enhancer.
2018-08-30 wfh@chromium.org Add no_size_t_to_int_warning suppression to webrtc.
2018-08-30 brandtr@webrtc.org Revert "Reland "Optimize execution time of RTPSender::UpdateDelayStatistics""
2018-08-30 terelius@webrtc.org Reland "Optimize execution time of RTPSender::UpdateDelayStatistics"
2018-08-30 srte@webrtc.org Adds TaskQueue congestion controller tests in VideoSendStreamTest.
2018-08-30 srte@webrtc.org Adds support for frame rate control in FrameGeneratorCapturer.
2018-08-30 srte@webrtc.org Fixes breaking bug in feedback based GoogCC.
2018-08-30 phoglund@webrtc.org Roll chromium_revision 33a17747bb2..c1d47013a1 (585798:585833)
2018-08-30 nisse@webrtc.org Revert "Refactor TestAudioDeviceModule to not depend on EventTimerWrapper."
2018-08-30 nisse@webrtc.org Use a lock to protect members accessed by RtpVideoStreamReceiver::GetSyncInfo()
2018-08-30 nisse@webrtc.org Delete StreamStatistician::IsRetransmitOfOldPacket
2018-08-30 andersc@webrtc.org Obj-C SDK Cleanup
2018-08-30 nisse@webrtc.org Refactor TestAudioDeviceModule to not depend on EventTimerWrapper.
2018-08-30 danilchap@webrtc.org Cleanup RtpPacketizerVp8
2018-08-30 phoglund@webrtc.org Roll chromium_revision ca3a5e1cbb..33a17747bb (585726:585798)
2018-08-30 benwright@webrtc.org Injects FrameEncryptorInterface into RtpSender.
2018-08-29 benwright@webrtc.org This change integrates the FrameEncryptorInterface and the
2018-08-29 ssilkin@webrtc.org Move VP9 frame rate controller to separate class.
2018-08-29 nisse@webrtc.org Revert "Add spatial index to EncodedImage."
2018-08-29 nisse@webrtc.org Add spatial index to EncodedImage.
2018-08-29 devicentepena@webrtc.org AEC3: Adding a reset of the ERLE estimator after going out from the initial state.
2018-08-29 mbonadei@webrtc.org Remove clang:find_bad_constructs suppression from call:call.
2018-08-29 titovartem@webrtc.org Remove deprecated ctors of DirectTransport and its subclasses and FakeNetworkPipe
2018-08-29 valeriian@webrtc.org Adding CustomAudioAnalyzer interface in APM.
2018-08-29 devicentepena@webrtc.org AEC3: Reset the ERLE estimation after a delay change
2018-08-29 sakal@webrtc.org Use generic video header frame ID as picture ID.
2018-08-29 kthelgason@webrtc.org Add config option to run VideoCodecTest in real time.
2018-08-29 kthelgason@webrtc.org Export constants from RTCAudioSessionConfiguration.
2018-08-29 titovartem@webrtc.org Add support of overriding network simulation in video quality tests.
2018-08-29 kthelgason@webrtc.org Remove kVideoCodecUnknown completely.
2018-08-29 danilchap@webrtc.org Cleanup RtpPacketizer interface
2018-08-29 henrika@webrtc.org Increases max size of webrtc::AudioFrame from 60ms to 120ms @32kHz.


Created with:
  gclient setdep -r src/third_party/webrtc@689b5874d4fb

The AutoRoll server is located here: https://autoroll.skia.org/r/webrtc-chromium-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux_chromium_archive_rel_ng;luci.chromium.try:mac_chromium_archive_rel_ng

BUG=chromium:None,chromium:851883,chromium:None,chromium:None,chromium:None,chromium:None,chromium:879451,chromium:588506,chromium:None,chromium:878319,chromium:None,chromium:None,chromium:None
TBR=webrtc-chromium-sheriffs-robots@google.com

Change-Id: Ie676e811ca23db391939ff0facf56f6aa46abbcd
Reviewed-on: https://chromium-review.googlesource.com/1201666
Reviewed-by: webrtc-chromium-autoroll <webrtc-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: webrtc-chromium-autoroll <webrtc-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#588372}
[modify] https://crrev.com/ed774e4540ee3afb2dd4ac22ef3fb7bcc89f7e57/DEPS

Labels: Merge-Request-70
I'd like to merge the cherry-pick https://webrtc-review.googlesource.com/c/src/+/97329 to M70.
Labels: OS-Android OS-Chrome OS-iOS OS-Linux OS-Mac OS-Windows
Project Member

Comment 6 by sheriffbot@chromium.org, Sep 3

Labels: -Merge-Request-70 Merge-Review-70 Hotlist-Merge-Review
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-70 Merge-Approved-70
Labels: -Merge-Approved-70 Merge-Merged
Components: Blink>WebRTC>Network

Sign in to add a comment