Track tasks and feature requests
Join 40 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterprisesRTCPeerConnection instances leak CPU even when destroyed #551
Comments
This comment has been minimized.
This comment has been minimized.
|
Thanks for the informative video! If you keep the tab open for longer, does the memory usage keep increasing? Or does it stay constant at 2GB? |
This comment has been minimized.
This comment has been minimized.
|
Yes, usage memory increase during play. And after few minutes, it make other tab slower, you can open youtube and play any HD video with full screen to see |
This comment has been minimized.
This comment has been minimized.
|
I think there's a leak in Chrome that happens when you open too many RTCPeerConnections, even if you destroy them later. Let's use this as the tracking issue for that. |
This comment has been minimized.
This comment has been minimized.
|
I think it is leak memory, not leak CPU |
This comment has been minimized.
This comment has been minimized.
|
I opened an issue on the WebRTC tracker about the CPU leak: https://bugs.chromium.org/p/webrtc/issues/detail?id=5733 |
This comment has been minimized.
This comment has been minimized.
|
hi feross, i am webtorrent user. i see that problem and report for you, but i can not solve that problem may be other people can do ? |
This comment has been minimized.
This comment has been minimized.
|
It appears that the WebRTC CPU leak issue only affected OS X/Linux users on Chrome. And, GOOD NEWS, the issue is fixed in Chrome Canary! https://bugs.chromium.org/p/webrtc/issues/detail?id=5733#c3 We can finally put this issue behind us :) |
This comment has been minimized.
This comment has been minimized.
|
we are happy :) |
This comment has been minimized.
This comment has been minimized.
|
It looks like this issue is fixed in Chrome 50 too which is the current stable version of the browser. It is very nice to be able to let a webtorrent tab open in chrome without crashing the whole app ;) Nightmare is over. |
This comment has been minimized.
This comment has been minimized.
|
Nice, glad that we're putting these annoying webrtc bugs behind us and the implementation is getting stable. |
This comment has been minimized.
This comment has been minimized.
|
@yciabaud FWIW, I still see the issue in Chrome 50. But not in Chrome 51. |
This comment has been minimized.
This comment has been minimized.
|
You can test for the issue by opening a new tab and pasting this into the console. Then wait for a few minutes. function createPeer () {
var pc = new webkitRTCPeerConnection({
iceServers: [
{
url: 'stun:23.21.150.121',
urls: 'stun:23.21.150.121'
}
]
}, {})
var channel = pc.createDataChannel(String(Math.floor(Math.random() * 1000000)), {})
channel.binaryType = 'arraybuffer'
channel.onmessage = function (event) {}
channel.onopen = function () {}
channel.onclose = function () {
console.log('channel onclose')
}
pc.onnegotiationneeded = function () {
pc.createOffer(function (offer) {
pc.setLocalDescription(offer, function (offer) {
console.log('set local description')
}, onError)
}, onError)
}
function onError (err) {
console.error(err.message)
}
setTimeout(function () {
pc.close()
channel.close()
}, 30000)
}
createPeer()
setInterval(createPeer, 3000) |
This comment has been minimized.
This comment has been minimized.
|
I ran it for 2 hours without any trouble. Looks like Chrome 50 on Linux is fixed. |
This comment has been minimized.
This comment has been minimized.
|
Ah, okay. I'm using Chrome 51 on OS X where it's not fixed yet. |
This comment has been minimized.
This comment has been minimized.
|
yes, run chrome in almost unix-like operating system has occur bugs, that is crazy !!! but i do not know what is problem, we are only wait for chrome developers to fix it |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
I check memory use by webtorrent when download on browser environment. Some issues below
This is check video on youtube