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

Issue 779250 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue webrtc:8473



Sign in to add a comment

Throttle SetRemoteDescription callbacks to avoid racing conditions.

Project Member Reported by hbos@chromium.org, Oct 27 2017

Issue description

blink's RTCPeerConnection & friends operate on the main thread, webrtc's SetRemoteDescription and its various callbacks operate on the webrtc signaling thread.

Currently, in each callback we jump back to the main thread to do things. This causes race conditions because it's possible that things happen in-between the same SRD's callbacks are being invoked.

The solution is to throttle callbacks. When SRD is ready to resolve, that's when we jump over to the main thread and process all the callbacks synchronously.
 

Comment 1 by hbos@chromium.org, Oct 27 2017

I think we need a webrtc::PeerConnectionObserver callback that is invoked after when SRD is complete in a way guaranteed to be invoked before any subsequent SRD call begins processing and firing callbacks.

This is needed to tell which callbacks firing belong to which SRD call. The only current callback is webrtc::SetSessionDescriptionObserver::OnSuccess/OnFailure which 1) is not tied to the webrtc::PeerConnectionObserver and 2) because of a superflous Post is not guaranteed to be invoked before any other SRD call's callbacks start firing.

Comment 2 by hbos@chromium.org, Oct 30 2017

Or if removing the Post doesn't break anything we can invoke SetSessionDescription::OnSuccess immediately, the PeerConnectionInterface does say "The |observer| callback will be called when done.", nothing about it doing a Post.

Comment 3 by hbos@chromium.org, Oct 30 2017

Blockedon: webrtc:8473
If we pursue  https://crbug.com/webrtc/8473  this becomes obsolete, making it blocked on for now.

Comment 4 by hbos@chromium.org, Nov 5 2017

Blocking: -777999 -777777
Status: WontFix (was: Started)

Sign in to add a comment