Open Bug 1394707 Opened 7 years ago Updated 2 years ago

ice gather failed and ice connection change to failed

Categories

(Core :: WebRTC: Networking, defect, P3)

52 Branch
defect

Tracking

()

People

(Reporter: mmzhw51, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36

Steps to reproduce:

i use rtcpeerconnection to gather ice in firefox 53 x86


Actual results:

main Ice signaling state is change : have-local-offer
main set local sdp descrirtion success
main Ice connecte state is change : failed  

ice state change like this and in about:webrtc i get log:

(stun/ERR) GetAdaptersAddresses() returned error (998)

(stun/ERR) GetAdaptersAddresses() returned error (998)

(stun/ERR) GetAdaptersAddresses() returned error (998)

(stun/ERR) GetAdaptersAddresses() returned error (998)

(stun/ERR) GetAdaptersAddresses() returned error (998)

(stun/ERR) 5 failures calling GetAdaptersAddresses()

(ice/ERR) ICE(PC:1503735482630000 (id=456 url=https://189.195.105.10/webrtc/login)): unable to gather local addresses, trying default route

(generic/CRIT) Couldn't bind socket to address IP4:10.170.202.154:61682/UDP

(ice/WARNING) ICE(PC:1503735482630000 (id=456 url=https://189.195.105.10/webrtc/login)): couldn't create socket for address IP4:10.170.202.154:61682/UDP

(ice/ERR) ICE(PC:1503735482630000 (id=456 url=https://189.195.105.10/webrtc/login)): couldn't create any valid candidates

(ice/WARNING) ICE(PC:1503735482630000 (id=456 url=https://189.195.105.10/webrtc/login)): peer (PC:1503735482630000 (id=456 url=https://189.195.105.10/webrtc/login):default) has no stream matching stream 0-1503735482630000 (id=456 url=https://189.195.105.10/webrtc/login) aLevel=0

(ice/WARNING) ICE(PC:1503735482630000 (id=456 url=https://189.195.105.10/webrtc/login)): peer (PC:1503735482630000 (id=456 url=https://189.195.105.10/webrtc/login):default) has no stream matching stream 0-1503735482630000 (id=456 url=https://189.195.105.10/webrtc/login) aLevel=1


Expected results:

ice shoud gather success ,i dont know the reason,and it happened ad fortuitous,i cannot recurrent it ,i want know what case this  appearance?
Firefox 53 is no longer supported. Please test with Firefox 55 and later.
Component: Untriaged → WebRTC: Networking
Product: Firefox → Core
(In reply to Kohei Yoshino [:kohei] from comment #1)
> Firefox 53 is no longer supported. Please test with Firefox 55 and later.

no longer supported what?
I use peerconnection to send media stream and close it after 1 miniture.
repeat this operation for about 100 times.

After 100 times the peerconnection can not gather ice any more 

when I refresh all pages.I find in resource manager the firefox take up memory for 400M ,but firefox only open a empty tab?

who can tell me the reason?Is sometihing not released caused this issue?
It looks like you're tripping over bug 1309585 (which is really an OS bug), but the fallback is not working for some reason. Maybe it is a case where you've run out of file descriptors. This could also explain why your tabs are empty.

Can you attach/link some code that reproduces this issue?
Flags: needinfo?(mmzhw51)
Thoughts?
Flags: needinfo?(drno)
Yes consuming all file descriptors sounds like a plausible explanation on why it causes so much problems.

Similar to the other bug report I think we can only look into freeing FD's after PC.close().

> I use peerconnection to send media stream and close it after 1 miniture.
> repeat this operation for about 100 times.

Are you just closing the PeerConnections and hold on to references in JS so they can't get garbage collected, or do you actually release the PeerConnection objects after closing them?
Flags: needinfo?(drno)
(In reply to Nils Ohlmeier [:drno] from comment #6)
> Yes consuming all file descriptors sounds like a plausible explanation on
> why it causes so much problems.
> 
> Similar to the other bug report I think we can only look into freeing FD's
> after PC.close().
> 
> > I use peerconnection to send media stream and close it after 1 miniture.
> > repeat this operation for about 100 times.
> 
> Are you just closing the PeerConnections and hold on to references in JS so
> they can't get garbage collected, or do you actually release the
> PeerConnection objects after closing them?

I remove localstream frome peerconnection and stop all mediatracks before close the peerconnection, then empty the peerconnection boject.

init object:
window.RTCPeerConnection.prototype.addMedia = stream => {
let pc = this;
if (firefox) stream.getTracks().forEach(function(track) {pc.addTrack(track, stream);});
if (chrome) pc.addStream(stream);
};
pc = new window.RTCPeerConnection(iceservers, {'optional': [{'googSuspendBelowMinBitrate': true}, {'googCpuOveruseDetection': false}]});
pc.addMedia(localstream)





close:
window.RTCPeerConnection.prototype.removeMedia = stream => {
let pc = this;
stream.getTracks().forEach(track => { track.onended = null;});
if (firefox) pc.getSenders().forEach(track => {pc.removeTrack(track);});
else if (window.RTCPeerConnection.prototype.removeStream) pc.removeStream(stream);
};
pc.removeMedia(localstream)
pc.close()


i try anytimes and it appear only in FF53,is something i havnt release?
ff54 has no this issuse.
Flags: needinfo?(mmzhw51)
I'm sorry ,ff54、53、52 has the same issuse ,about 150 times ,ICE will gather candidate failed
From the discussion above I will confirm the bug, feel free to change it
Status: UNCONFIRMED → NEW
Rank: 25
Ever confirmed: true
Priority: -- → P2
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.