PeerConnectionObserver can spontaneously go away when network is lost

RESOLVED FIXED in Firefox 68

Status

()

defect
P2
normal
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: bwc, Assigned: bwc)

Tracking

unspecified
mozilla68
Points:
---

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

Noticed this while trying to repro bug 1546562 on a local build. My daily-use nightly reproduced the bug fine, but the local build never fired an ICE disconnected event. I went poking around for some preference that I might have left set, and switching from system proxy settings to no proxy got the signal to fire. Very odd.

I've investigated this further, and it seems that sometimes the loss of network can cause the PeerConnectionObserver to spontaneously go away, without the PeerConnection being closed. Specifically, calls like these yield a nullptr:

https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp#1191

Does loss of network break some step of this?

https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp#1156-1166

Or is the PeerConnectionObserver actually going away here?

Summary: Using system proxy settings seems to prevent ICE disconnected events from firing → PeerConnectionObserver can spontaneously go away when network is lost

Try looks fine. I might be able to remove some more code.

Attachment #9060719 - Attachment description: Bug 1546691: (WIP) Try to avoid the PCObserver going away spontaneously when network is lost. → Bug 1546691: Avoid the PCObserver going away spontaneously when network is lost.

Try looks like a mess, but it is already known intermittents.

Pushed by bcampen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e46a4bcb07b7
Avoid the PCObserver going away spontaneously when network is lost. r=mjf
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Regressions: 1550540
QA Whiteboard: [qa-68b-p2]
You need to log in before you can comment on or make changes to this bug.