Closed
Bug 1266007
Opened 10 years ago
Closed 7 years ago
PeerConnection creation and CreateOffer taking excessively long
Categories
(Core :: WebRTC: Networking, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: zhengpeng122, Unassigned)
References
Details
(Whiteboard: [Waiting on data from Bug 1275102 - 2016/07/11])
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
Steps to reproduce:
For FireFox version 42--47:
statics shows that users call this scripts when about 15% of them have no any response,I want to koow how to solve the question.
For FireFox version <= 41 , FireFox >=48 the lost rate is lower
able createOfferSdp(from real users statics data)
version total sucess fail_rate
my webrtc JS Scripts:
var peer ;
var PeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
var iceServers = [];
var optional = {
optional: []
};
var constraints = {
'offerToReceiveAudio': true,
'offerToReceiveVideo': true
};
var promiseCreateOffer = function() {
try{
peer = new PeerConnection(iceServers, optional);
}
catch(err){
console.log('error ',err);
return ;
}
peer.createOffer(constraints).then(
function(offer) {
return peer.setLocalDescription(offer);
})
.then(function() {
console.log('ok ',peer.localDescription);
},
function(){
// when promise rejected state,called
console.log('rejected ');
},function(){
//when promise progress state become rejected,called
console.log('progress ');
}
)
.catch(function(reason) {
// An error occurred
console.log('onSdpError: ', reason);
});
}
//called to create sdpOffer to recvive video and audio
promiseCreateOffer();
Actual results:
For FireFox version 42 to 47:
my static data show that users call this scripts when about 15% of them have no any response,I want to know how to solve this problem.
Expected results:
call js peerconnection createOffer method, no matter success or fail, i shoule get a response, but the current case i get no response at all in some case.
Summary: webrtc → webrtc Js createOffer method in some case has no response
Do you have a live testcase, please?
Component: Untriaged → WebRTC: Networking
Flags: needinfo?(zhengpeng122)
Product: Firefox → Core
Comment 2•10 years ago
|
||
Do you happen to have any data on which OS this is happening?
I'm asking because we are aware of quite some error scenarios on Windows. E.g. up to Fx 45 if a user had given one of it's network interface a long UTF8 user friendly name createOffer() would fail with "failed to create UDP candidates with error 6" in the log on about:webrtc. And there are a couple of more problems especially on Windows which we have fixed. Unfortunately I don't think that for any of these you can improve the likeliness of getting an SDP via JS code.
The other thing which might be interesting is that you don't attach any media to your PeerConnection, but just create a recvonly offer. It is possible that we have some unknown bug specifically in that area. But as Loic requested already we would need a test case or at least some log file to get an idea what is going wrong there.
thanks for yours consideration, this is my test js code embeded in my websites,for static how many peoples createSdp ok and fail, and the os platform is windows.
Flags: needinfo?(zhengpeng122)
because the static data from the real users , so i can not get the log info ,and i can not know the detail reasons
append my web static data
date,firefox_version,creatSdpRequest,getLocalsdpSucess,getlocalSdpFailRate
2016-04-16 ,29,1,0,100%
2016-04-16 ,8804,1,0,100%
2016-04-16 ,48,32,30,6.25%
2016-04-16 ,47,84,73,13.1%
2016-04-16 ,46,10529,9321,11.47%
2016-04-16 ,45,48500,43178,10.97%
2016-04-16 ,44,11540,9810,14.99%
2016-04-16 ,43,14474,12182,15.84%
2016-04-16 ,42,4229,3455,18.3%
2016-04-16 ,41,3950,3925,0.63%
2016-04-16 ,40,4050,4019,0.77%
2016-04-16 ,39,3428,3398,0.88%
2016-04-16 ,38,3716,3664,1.4%
2016-04-16 ,37,4025,3968,1.42%
2016-04-16 ,36,2,2,0%
2016-04-16 ,9,1,1,0%
Flags: needinfo?(zhengpeng122)
test case is: add my js code on you website ,to static user createsdo data,the result is above data show
Flags: needinfo?(zhengpeng122)
(In reply to Loic from comment #1)
> Do you have a live testcase, please?
os: windows platform
this is my test js code embeded in my websites,for static how many peoples createSdp ok and fail,so the real no response i judge by my web users' statics data
Comment 8•10 years ago
|
||
The only thing that can block CreateOffer right now is GMP init. Is it possible that GMP init is hanging on windows sometimes?
Comment 9•10 years ago
|
||
Also, how are these statistics being recorded? Are you just incrementing a counter when you call createoffer, and another counter when the promise is settled? How would your statistics gathering cope if the user closes the page between the call to createoffer and the promise resolution/rejection (granted, this is a really tight window in most circumstances)?
Flags: needinfo?(zhengpeng122)
Comment 10•10 years ago
|
||
I'm also wondering how do you make sure these statistics show unique users. My assumption is that if for example a user with Fx 45 and a long Unicode network interface name keeps re-visting your page (or clicking on other pages - not clear to me if these are aggregated stats for a whole domain or just one single page) he will add pretty quickly lots of failures to your stats.
In other words assuming your stats are not unique per user stats, then they probably do not represent all of the Firefox users very well.
In general there are a few things which can fail during interface gathering (which starts with the createOffer call if I'm not mistaken), e.g. if a personal firewall prevents that Firefox creates UDP sockets or if calls to the OS for gathering the list of interface names fails, which especially in older Firefox versions might result in no SDP offer being generated.
But there is nothing you can do about any of these errors from JS code. And if you can't provide us with log files then we can't help you to reduce the failures, which I assume is what you want to achieve.
BTW how do the stats look like for Chrome?
Comment 11•10 years ago
|
||
(In reply to Nils Ohlmeier [:drno] from comment #10)
> I'm also wondering how do you make sure these statistics show unique users.
> My assumption is that if for example a user with Fx 45 and a long Unicode
> network interface name keeps re-visting your page (or clicking on other
> pages - not clear to me if these are aggregated stats for a whole domain or
> just one single page) he will add pretty quickly lots of failures to your
> stats.
> In other words assuming your stats are not unique per user stats, then they
> probably do not represent all of the Firefox users very well.
>
> In general there are a few things which can fail during interface gathering
> (which starts with the createOffer call if I'm not mistaken), e.g. if a
> personal firewall prevents that Firefox creates UDP sockets or if calls to
> the OS for gathering the list of interface names fails, which especially in
> older Firefox versions might result in no SDP offer being generated.
> But there is nothing you can do about any of these errors from JS code. And
> if you can't provide us with log files then we can't help you to reduce the
> failures, which I assume is what you want to achieve.
>
> BTW how do the stats look like for Chrome?
None of this stuff will cause CreateOffer to hang though. It can cause immediate ICE failure, but that's separate.
Comment 12•10 years ago
|
||
(In reply to Byron Campen [:bwc] (PTO Apr 15) from comment #11)
> None of this stuff will cause CreateOffer to hang though. It can cause
> immediate ICE failure, but that's separate.
zp is the problem that you are seeing that createOffer() hangs, or that you simply get no offer?
Comment 13•10 years ago
|
||
drno: would failure of the GetAdaptersInfo on Windows show up this way?
zp: is there a correlation of the OS the user is on? Or to Firefox version? (The GetAdaptersInfo-when-over-2GB bug should be fixed now, and other stats back it up)
Flags: needinfo?(drno)
| Reporter | ||
Comment 14•10 years ago
|
||
Thanks all yours help and suggestion, and i am to appologized for not telling so detail,
now i decide to sort my test code and data,and would like to offer more when needed,
for chrome test will latter to do and show the test result.
I am a webrtc liveshow developer, and mediaserver for webrtc meida relay,
when users visit my liveshow pages , will use webrtc to get meidastreams from mediaserver,
i found my users use webrtc to visit livevideos and 15% lost during creating webrtcOffer,so i write a signal
js sdp test code which is embed in the liveshow pages to static webrtc fail reasons.
一 Test steps
steps 1-9 to record createOffer progress.
all steps chained by liveUUID as the unique mark for latter version statics,and which is gengerated
by follow formulae:
liveid = WEBID + UUID
WEBID: when user visits website any pages alloced from webserver ,
and storage in web browser cookie for mark the unique users,
it will the same until user clear the browser catch.
UUID: generate by general UUID methold (time + code),to make every time when user request livepage, diffent for every time visit
static format key and valve:
static data {
type: 'others', //kind
modId: 'webrtc', //module
country: getConf('country'), // country
position: 'onWebrtctestTimerGetSignalingState', //msg type
liveuuid: uniqueEveryvisitLivePageID //liveuuid
time: new Date().getTime() - nowCreatSdpTime //from begin create timer
state: peer.signalingState, //some may have
count: webrtcTimerCount, //some mayhave
error: catchError //error record
}
send createOffer static data by http get request to my hive query platform.
http format:
http://my.web.sites?key1=value;key2=value
example:
http://xxxxx/img/gut.gif?type=others&modId=webrtc&country=id&position=getLocalSdp-sucess&mediaId=undefined&time=132&liveuuid=D6F336E2B91E70F7E74BA0A12798ABCF%3AFG%3D1-85907a90-b213-40b6-bab4-4afa6c1a6301&r=1460948627737&level=2&page=hiclub-room&channel=
detial steps as follows, and the same with js code:
1.create peerconnection
TestNewPeerConnection
2. createOffer Start
TestCreateOfferStart
3. catch create peerconnection error
TestNewPeerConnectionFail
CatchTestNewPeerConnectionFail
4. createOffer begin
promiseTestCreateOffer
5. call peer.createOffer function
6. callback
6.1 onOfferSucess
promiseTestCreateOfferSucess
x<=3 s
x>=3 && x<5 s
x>=5 && x<8 s
x>8 s
6.2 onOfferResolve
6.3 onOfferReject
promiseTestCreateOfferReject
6.4 onOfferInPorgress
promiseTestCreateOfferProgress
7. catch error
promiseTestCreateOfferCatchFail
8. on timer check getsdp sucess or fail
5s onWebrtctestTimerGetSignalingState
10s onWebrtctestTimerGetSignalingState
15s onWebrtctestTimerGetSignalingState
20s onWebrtctestTimerGetSignalingState
25s onWebrtctestTimerGetSignalingState
30s onWebrtctestTimerGetSignalingState
9. createOffer end
TestCreateOfferEnd
二 Full JS test code
append my full js test code, and sendUT is my static interface, it will modify for your own test.
// uuid generate function
function WebrtcUUID() {
var self = this;
self.getCookie = function (name) {
if (document.cookie.length > 0) {
var start = document.cookie.indexOf(name + '=');
console.log('getCookie ', name, start);
if (start !== -1) {
start = start + name.length + 1;
var end = document.cookie.indexOf(';', start);
if (end === -1) {
end = document.cookie.length;
}
console.log('getCookie start=' + start + 'end=' + end);
return unescape(document.cookie.substring(start, end));
}
}
return '';
};
self.getRandomInt = function (x) {
if (x < 0) {
return NaN;
}
if (x <= 30) {
return (0 | Math.random() * (1 << x));
}
if (x <= 53) {
return (0 | Math.random() * (1 << 30)) + (0 | Math.random() * (1 << x - 30)) * (1 << 30);
}
return NaN;
};
self.getIntAligner = function (radix) {
return function (num, length) {
var str = num.toString(radix);
var i = length - str.length;
var z = '0';
for (; i > 0; i >>>= 1, z += z) {
if (i & 1) {
str = z + str;
}
}
return str;
};
};
self.generate = function () {
var rand = self.getRandomInt;
var hex = self.getIntAligner(16);
return hex(rand(32), 8)
+ '-' + hex(rand(16), 4)
+ '-' + hex(0x4000 | rand(12), 4)
+ '-' + hex(0x8000 | rand(14), 4)
+ '-' + hex(rand(48), 12);
};
}
//my test js creat webrtc code
var UT = function(){
//static function to send static data
}
var getConf = function(){
//country code
}
function TESTRTCPeerConnection(config) {
var options = {
iceServers: null,
onOfferSDP: null,
onOfferSDPError: null,
onICE: null,
onAnswerSdpSucess: null,
onAnswerSdpError: null,
onRemoteStreamEnded: null,
onRemoteStream: null
};
var peer;
window.moz = !!navigator.mozGetUserMedia;
var w = window;
var PeerConnection = w.mozRTCPeerConnection || w.webkitRTCPeerConnection || w.RTCPeerConnection;
var SessionDescription = w.mozRTCSessionDescription || w.RTCSessionDescription;
var IceCandidate = w.mozRTCIceCandidate || w.RTCIceCandidate;
var iceServers = [];
iceServers.push({
url: 'stun:stun.l.google.com:19302',
urls: 'stun:stun.l.google.com:19302'
});
var self = this;
var getCandidate = false;
iceServers = {
iceServers: iceServers
};
var optional = {
optional: []
};
var nowCreatSdpTime = 0;
// timer
var webrtcTimer = null;
var webrtcTimerCount = 0;
var webrtcTimerCountMax = 6;
self.sendUT = function (msg) {
msg.liveuuid = config.liveuuid;
console.log('TestWebrtcSendUT=', msg);
UT.send(msg); //send my config http get request to my web
};
self.setWebrtcTestTimer = function () {
self.clearWebrtcTestTimer();
self.webrtcTimer = setInterval(self.onWebrtcTestTimer, 5000);
};
self.clearWebrtcTestTimer = function () {
if (self.webrtcTimer) {
clearTimeout(self.webrtcTimer);
}
self.webrtcTimer = null;
};
self.onWebrtcTestTimer = function () {
console.log('[TESTRTCPeerConnection] onWebrtcTestTimer ');
if (webrtcTimerCount > webrtcTimerCountMax) {
self.clearWebrtcTestTimer();
console.log('[TESTRTCPeerConnection] onWebrtcTestTimer end ', webrtcTimerCount);
return;
}
webrtcTimerCount++;
console.log('[TESTRTCPeerConnection] onWebrtcTestTimer ', webrtcTimerCount);
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'onWebrtctestTimerGetSignalingState',
state: peer.signalingState,
count: webrtcTimerCount,
time: new Date().getTime() - nowCreatSdpTime
});
self.setWebrtcTestTimer();
};
try {
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'TestNewPeerConnection'
});
peer = new PeerConnection(iceServers, optional);
if (!peer) {
console.error('[TESTRTCPeerConnection]peer new fail');
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'TestNewPeerConnectionFail'
});
return;
}
} catch (err) {
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'CatchTestNewPeerConnectionFail',
error: err
});
return;
}
peer.onicecandidate = function (event) {
if (event.candidate) {
if (options.onICE) {
options.onICE(event.candidate);
}
if (getCandidate === false) {
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'TestOnIceCandidateEvent',
time: new Date().getTime() - nowCreatSdpTime
});
getCandidate = true;
}
console.log('[TESTRTCPeerConnection] candidate:', JSON.stringify(event.candidate));
}
};
peer.onsignalingstatechange = function (state) {
console.log('[TESTRTCPeerConnection] onsignalingstatechange', state);
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'TestOnSignalingstatechange',
state: peer.signalingState,
time: new Date().getTime() - nowCreatSdpTime
});
};
peer.onaddstream = function (event) {
var remoteMediaStream = event.stream;
// onRemoteStreamEnded(MediaStream)
remoteMediaStream.onended = function () {
if (options.onRemoteStreamEnded) {
options.onRemoteStreamEnded(remoteMediaStream);
}
};
// onRemoteStream(MediaStream)
if (options.onRemoteStream) {
options.onRemoteStream(remoteMediaStream);
}
console.log('[TESTRTCPeerConnection] on:add:stream', remoteMediaStream);
};
var constraints = {
offerToReceiveAudio: true,
offerToReceiveVideo: true
};
self.createOffer = function () {
peer.createOffer(function (sessionDescription) {
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'TestCreateOfferSucess',
time: new Date().getTime() - nowCreatSdpTime
});
try {
peer.setLocalDescription(sessionDescription);
} catch (error) {
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'CatchTestCreateOfferSucessError',
time: new Date().getTime() - nowCreatSdpTime
});
}
console.log('[TESTRTCPeerConnection] offer-sdp', sessionDescription.sdp);
},
function (message) {
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'TestCreateOfferFail',
time: new Date().getTime() - nowCreatSdpTime
});
console.error('[TESTRTCPeerConnection] onSdpError:', message);
},
constraints);
};
self.promiseCreateOffer = function () {
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'promiseTestCreateOffer',
time: new Date().getTime() - nowCreatSdpTime
});
peer.createOffer(constraints).then(
function (offer) {
console.log('[TESTRTCPeerConnection] promiseCreateOffer onSdp sucess:', offer);
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'promiseTestCreateOfferSucess',
time: new Date().getTime() - nowCreatSdpTime
});
return peer.setLocalDescription(offer);
})
.then(
function () {
console.log('[TESTRTCPeerConnection] promiseCreateOffer onSdp: ', peer.localDescription);
},
function () {
// promise is rejected
console.log('[TESTRTCPeerConnection] promiseCreateOffer rejected ');
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'promiseTestCreateOfferReject',
time: new Date().getTime() - nowCreatSdpTime
});
},
function () {
// promise is inprogress
console.log('[TESTRTCPeerConnection] promiseCreateOffer progress ');
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'promiseTestCreateOfferProgress',
time: new Date().getTime() - nowCreatSdpTime
});
})
.catch(function (reason) {
// An error occurred, so handle the failure to connect
console.log('[TESTRTCPeerConnection] promiseCreateOffer onSdpError: ', reason);
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'promiseTestCreateOfferCatchFail',
time: new Date().getTime() - nowCreatSdpTime,
error: reason
});
});
};
self.addAnswerSDP = function (sdp) {
var answer = new SessionDescription({
type: 'answer',
sdp: sdp
});
console.log('[TESTRTCPeerConnection] adding answer-sdp', sdp);
peer.setRemoteDescription(answer, self.onAnswerSdpSuccess, self.onAnswerSdpError);
};
self.onAnswerSdpSuccess = function (msg) {
console.log('[TESTRTCPeerConnection] onSdpSuccess', msg);
if (options.onAnswerSdpSuccess) {
options.onAnswerSdpSuccess(msg);
}
};
self.onAnswerSdpError = function (error) {
console.log('[TESTRTCPeerConnection] onAnswerSdpError', error);
if (options.onAnswerSdpError) {
options.onAnswerSdpError(error);
}
};
self.addICE = function (candidate) {
peer.addIceCandidate(new IceCandidate({
sdpMLineIndex: candidate.sdpMLineIndex,
candidate: candidate.candidate
}));
console.log('[TESTRTCPeerConnection] adding-ice', candidate.candidate);
};
nowCreatSdpTime = new Date().getTime();
console.log('[TESTRTCPeerConnection] createoffer start ', nowCreatSdpTime);
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'TestCreateOfferStart'
});
if (window.moz) { //firefox
self.promiseCreateOffer();
} else {
self.createOffer(); //chrome
}
console.log('[TESTRTCPeerConnection] createoffer end ', (new Date().getTime()) - nowCreatSdpTime);
self.sendUT({
type: 'others',
modId: 'webrtc',
country: getConf('country'),
position: 'TestCreateOfferEnd',
time: (new Date().getTime()) - nowCreatSdpTime
});
self.setWebrtcTestTimer();
}
// test code
if (navigator.userAgent.match(/Firefox\/(\d{2})/)[1] < 37){
return;
}
//firefox version >= 37 will test
var liveWebrtcUUID = ''; //webrtc uuid
var uuidObj = new WebrtcUUID();
var baiduid = uuidObj.getCookie('WEBLIVEID');
liveWebrtcUUID = baiduid + '-' + uuidObj.generate();
// test webrtc
var testwebrtc = new TESTRTCPeerConnection({
liveuuid: liveWebrtcUUID
});
三 static result
1. all steps statics:
static all steps msg counts,the results as follows,
my website liveroom daily pv is about 117377.
static time :2016-04-21-00:00 ---- 2016-04-21-23:59
create peerconnection
rate = msid_Number / TestNewPeerConnection_Number
// TestNewPeerConnection
117377
// TestNewPeerConnectionFail and rate
NULL NULL
// CatchTestNewPeerConnectionFail and rate
109 9.286316740076846E-4
createOffer
rate = msid_Number / TestCreateOfferStart_Number
// TestCreateOfferStart
116967
// promiseTestCreateOfferSucess and rate
104616 0.8944061145451281
// promiseTestCreateOfferSucess <=3s
96343 0.8236767635315944
// promiseTestCreateOfferSucess 3-5s
4642 0.03968640727726624
// promiseTestCreateOfferSucess 5-8s
1989 0.017004796224576162
// promiseTestCreateOfferSucess >8s
1633 0.013961202732394607
// promiseTestCreateOfferReject and rate
2 1.7098839843716603E-5
// promiseTestCreateOfferProgress and rate
NULL NULL
// promiseTestCreateOfferCatchFail and rate
NULL NULL
// TestCreateOfferEnd and rate
116178 0.9932545076816538
2. static by firefox version
static firefox version createSdp rate using liveuuid:
a. choose step TestCreateOfferStart and
group by liveuuid and version
b. choose step promiseTestCreateOfferSucess
group by liveuuid and version
c. step TestCreateOfferStart and step promiseTestCreateOfferSucess
left join on liveuuid and version
d. last group by vesion
//my hive sql
select a.version ,count(a.uid) as wsouv,
count(b.uid) as gLsdpuv,
(count(a.uid)-count(b.uid))/count(a.uid) as getlv
from
( select
event_urlparams['liveuuid'] as uid,
regexp_extract(event_useragent,'Firefox/([0-9]+)',1 ) as version
from
log_2nd_gener.udwetl_hiclubclick
where event_day = <date>
and event_urlparams['position'] = 'TestCreateOfferStart'
and event_urlparams['page']='hiclub-room'
and event_useragent like '%Firefox%'
and globalhao123_type = 'others'
and event_urlparams['modId'] = 'webrtc'
and event_urlparams['liveuuid'] is not null
group by regexp_extract(event_useragent,'Firefox/([0-9]+)',1 ),event_urlparams['liveuuid']
)a
left outer join
( select
event_urlparams['liveuuid'] as uid,
regexp_extract(event_useragent,'Firefox/([0-9]+)',1 ) as version
from
log_2nd_gener.udwetl_hiclubclick
where event_day = <date>
and globalhao123_type = 'others'
and event_urlparams['modId'] = 'webrtc'
and event_urlparams['position'] = 'promiseTestCreateOfferSucess'
and event_useragent like '%Firefox%'
and globalhao123_type = 'others'
and event_urlparams['liveuuid'] is not null
group by regexp_extract(event_useragent,'Firefox/([0-9]+)',1 ),event_urlparams['liveuuid']
)b on a.version=b.version and a.uid=b.uid
group by a.version
and the results as follows:
version totalCreatSdpRequest totalCreatSdpSucess lostRate
36 4 4 0.0
37 4430 4334 0.02167042889390519
38 3752 3645 0.0285181236673774
39 3528 3438 0.025510204081632654
40 3925 3831 0.02394904458598726
41 3897 3821 0.019502181164998716
42 4321 3576 0.1724137931034483
43 13967 11429 0.18171404023770316
44 11010 9222 0.16239782016348775
45 51728 45502 0.12036034642746675
46 11585 10265 0.11394044022442815
47 60 53 0.11666666666666667
48 36 35 0.027777777777777776
9 10 9 0.1
The End.
Thank you for your consideration and I will be looking forward to your reply.
Comment 15•10 years ago
|
||
(In reply to Randell Jesup [:jesup] from comment #13)
> drno: would failure of the GetAdaptersInfo on Windows show up this way?
Yes the problems around GetAdaptersInfo result in no offer being created. That's what I was trying describe in some on my previous comments. I don't know if it results in createOffer() throwing an exception, I would need to check. But on the other hand zp's code I think would also classify an exception from setLocalDescription into the promiseTestCreateOfferCatchFail category. And even if createOffer() returns an empty SDP in case of GetAdaptersInfo I'm pretty sure setLocalDescription() will not like an empty input.
But our own logs/stats suggest that the problem around GetAdaptersInfo should disappear with Fx 46.
Flags: needinfo?(drno)
| Reporter | ||
Comment 16•10 years ago
|
||
41 3897 3821 0.019502181164998716
42 4321 3576 0.1724137931034483
47 60 53 0.11666666666666667
48 36 35 0.027777777777777776
what are the
FireFox version 41 and 42 difference
FireFox version 47 and 48 difference, can lead the creatOffer no response ?
| Reporter | ||
Comment 17•10 years ago
|
||
chrome statics by version
version totalRequest sdpsucess lostRate
38 226 203 0.10176991150442478
39 419 389 0.07159904534606205
40 491 454 0.07535641547861507
41 95 88 0.07368421052631578
42 270 252 0.06666666666666667
43 1602 1458 0.0898876404494382
44 805 743 0.07701863354037267
45 603 563 0.06633499170812604
46 1101 1014 0.07901907356948229
47 1255 1147 0.08605577689243028
48 2340 2182 0.06752136752136752
49 21248 19390 0.08744352409638555
50 5549 4947 0.10848801585871329
51 365 343 0.06027397260273973
52 17 17 0.0
and the result show is better than firefox
Updated•10 years ago
|
Flags: needinfo?(drno)
Flags: needinfo?(docfaraday)
Comment 18•10 years ago
|
||
(In reply to Nils Ohlmeier [:drno] from comment #15)
> (In reply to Randell Jesup [:jesup] from comment #13)
> > drno: would failure of the GetAdaptersInfo on Windows show up this way?
>
> Yes the problems around GetAdaptersInfo result in no offer being created.
> That's what I was trying describe in some on my previous comments. I don't
> know if it results in createOffer() throwing an exception, I would need to
> check. But on the other hand zp's code I think would also classify an
> exception from setLocalDescription into the promiseTestCreateOfferCatchFail
> category. And even if createOffer() returns an empty SDP in case of
> GetAdaptersInfo I'm pretty sure setLocalDescription() will not like an empty
> input.
>
> But our own logs/stats suggest that the problem around GetAdaptersInfo
> should disappear with Fx 46.
I'm not sure how this is the case. That code all runs on STS, and createOffer does not wait for anything STS-related to happen.
Comment 19•10 years ago
|
||
(In reply to zp from comment #14)
> // TestCreateOfferStart
> 116967
>
> // promiseTestCreateOfferSucess and rate
> 104616 0.8944061145451281
> // promiseTestCreateOfferSucess <=3s
> 96343 0.8236767635315944
> // promiseTestCreateOfferSucess 3-5s
> 4642 0.03968640727726624
> // promiseTestCreateOfferSucess 5-8s
> 1989 0.017004796224576162
> // promiseTestCreateOfferSucess >8s
> 1633 0.013961202732394607
>
> // promiseTestCreateOfferReject and rate
> 2 1.7098839843716603E-5
> // promiseTestCreateOfferProgress and rate
> NULL NULL
> // promiseTestCreateOfferCatchFail and rate
> NULL NULL
> // TestCreateOfferEnd and rate
> 116178 0.9932545076816538
This is a little shocking. More than half of the time this is taking more than 3 seconds. You are measuring the amount of time it takes to construct the PeerConnection though, which can take time on mobile due to the crypto key generation. It might be useful to check what platform the failures are happening on. Also, given the delays, it is totally plausible that the user is simply closing the page.
>
> 2. static by firefox version
>
> static firefox version createSdp rate using liveuuid:
>
> a. choose step TestCreateOfferStart and
> group by liveuuid and version
> b. choose step promiseTestCreateOfferSucess
> group by liveuuid and version
> c. step TestCreateOfferStart and step promiseTestCreateOfferSucess
> left join on liveuuid and version
> d. last group by vesion
>
> //my hive sql
>
> select a.version ,count(a.uid) as wsouv,
> count(b.uid) as gLsdpuv,
> (count(a.uid)-count(b.uid))/count(a.uid) as getlv
> from
> ( select
> event_urlparams['liveuuid'] as uid,
> regexp_extract(event_useragent,'Firefox/([0-9]+)',1 ) as version
> from
> log_2nd_gener.udwetl_hiclubclick
> where event_day = <date>
> and event_urlparams['position'] = 'TestCreateOfferStart'
I would be using promiseTestCreateOffer here, because basing this selection on user-agent string is a bit unreliable. Might not make a difference, but is worth a try.
> and event_urlparams['position'] = 'promiseTestCreateOfferSucess'
> and event_useragent like '%Firefox%'
> and globalhao123_type = 'others'
> and event_urlparams['liveuuid'] is not null
> group by regexp_extract(event_useragent,'Firefox/([0-9]+)',1
> ),event_urlparams['liveuuid']
> )b on a.version=b.version and a.uid=b.uid
> group by a.version
>
So this is only getting you how many times createOffer was called, vs how many times it succeeded. What happens when we add in promiseTestCreateOfferReject? Are we seeing failures, or are we seeing hangs?
Flags: needinfo?(docfaraday)
| Reporter | ||
Comment 20•10 years ago
|
||
// promiseTestCreateOfferReject and rate
> 2 1.7098839843716603E-5
> // promiseTestCreateOfferProgress and rate
> NULL NULL
> // promiseTestCreateOfferCatchFail and rate
> NULL NULL
reject and fail number is very low
Comment 21•10 years ago
|
||
Ok, then I would be willing to bet that the primary problem is due to the page being closed before the creation of the PeerConnection, and creation of the offer, completes. The question now is, why is this taking so long? GMP init could be taking a long time I suppose, and I could see how having some telemetry for this would be useful. Telemetry for the time taken for the major JSEP operations could be handy too.
What does the average delay look like on 41 vs 42?
Updated•10 years ago
|
Whiteboard: [needinfo]
Comment 22•10 years ago
|
||
Byron -- Did the frequency of this increase when we switched to using trickle only? Is there anything more to investigate here?
Flags: needinfo?(docfaraday)
Whiteboard: [needinfo] → [needinfo 2016/05/12 to Bwc]
Comment 23•10 years ago
|
||
We went trickle only a really long time ago, before these stats were gathered, so probably not. It would be nice to investigate the reason it is taking so long to spin up a PC and create an offer. We should add some telemetry.
Flags: needinfo?(docfaraday)
Updated•10 years ago
|
Summary: webrtc Js createOffer method in some case has no response → PeerConnection creation and CreateOffer taking excessively long
Comment 24•10 years ago
|
||
Byron, Nils -- Following up on Comment 23 from Byron: Can we add some telemetry to get better visibility into the long spin up time? Shall we confirm and prioritize this bug?
Flags: needinfo?(docfaraday)
Whiteboard: [needinfo 2016/05/12 to Bwc] → [needinfo 2016/05/23 to Bwc, drno]
Comment 25•10 years ago
|
||
Well, the telemetry would be required to confirm any problem. We could open a separate bug.
Flags: needinfo?(docfaraday)
Updated•10 years ago
|
Whiteboard: [needinfo 2016/05/23 to Bwc, drno] → [Waiting on data from Bug 1275102 - 2016/07/11]
Updated•7 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(zhengpeng122)
Flags: needinfo?(drno)
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•