| commit | 426f0590b6e4ae4541ac30fe898e5fdfcde4a7d5 | [log] [tgz] |
|---|---|---|
| author | Tommi <tommi@webrtc.org> | Sun Sep 14 09:24:49 2025 |
| committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Sep 15 09:47:21 2025 |
| tree | 35fe247d61bea7bf2b69d5afced64ab7ac0d4bc1 | |
| parent | 34e3cb8457d01b225aa885870055b39ae62b20df [diff] |
Fix threading issue in "fake" (test) DescriptionObservers This fixes a problem affecting PeerConnectionWrapper and other classes using FakeSetLocalDescriptionObserver and FakeSetRemoteDescriptionObserver whereby callbacks would arrive on a different thread than the test thread. This has caused some flake in tests, but mostly has been masked by other synchronous blocking calls between the test thread and signaling thread. The pattern was that the fake observer object was being polled from the test thread until an operation completed on the signaling thread, leading to tsan errors such as detected here: https://chromium-swarm.appspot.com/task?id=735c37c9a2b00011&o=true&w=true Brief (and trimmed) example stacks: WARNING: ThreadSanitizer: data race (pid=259249) Write of size 1 at 0x721000023d70 by thread T1: ... #2 FakeSetLocalDescriptionObserver::OnSetLocalDescriptionComplete(...) #3 SdpOfferAnswerHandler::DoSetLocalDescription(...) ... #5 rtc_operations_chain_internal::OperationWithFunctor<...>::Run() #6 ChainOperation<(lambda at ../../pc/sdp_offer_answer.cc:1678:7)> #7 SdpOfferAnswerHandler::SetLocalDescription(...) ... Previous read of size 1 at 0x721000023d70 by main thread: ... #1 called pc/test/mock_peer_connection_observers.h:356:39 #2 operator() pc/peer_connection_wrapper.cc:183:3 #3 operator() test/wait_until.h:84:24 ... #6 WaitUntil(FunctionView<bool ()>, WaitUntilSettings) #7 WaitUntil<(lambda at ../../pc/peer_connection_wrapper.cc:183:3)> #8 PeerConnectionWrapper::SetLocalDescription(...) ... Bug: none Change-Id: Iadc4634fe78d5d1b252b1a3c05d7ae9c5b76922c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/409340 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#45651}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.