Git Product home page Git Product logo

Comments (7)

ibc avatar ibc commented on June 4, 2024

Is this report exactly the same as this one? #236
If so, why a duplicate report?

I assume it's the same. So there is something that I told in that issue which was not taken into account:

Is such a snippet code based on mediasoup-demo client side code? If so, I don't think it's cleaning up all the required stuff when closing a consumer so the leak is due to the demo app itself. I cannot consider this report valid unless proper reproducing code is provided.

We guess mediasoup-client api consume.close() did not actually destroy the track of webrtc when another peer was exiting room

There are no "peers" in mediasoup or mediasoup-client but just transports and producers and consumers. I don't know what "destroy a track" is. Definitely consumer.close() calls track.stop() (see close() method in Consumer.ts in mediasoup-client.

from mediasoup-client.

ibc avatar ibc commented on June 4, 2024

I've tried the same scenario in Google Meet and it behaves the same way. BTW free memory is just deallocated when the OS needs it, so this is a normal thing in any Linux/BSD based system.

Said that, testing these things with the mediasoup-demo doesn't have much value. I don't know if there is a leak in the mediasoup-demo code (maybe). Still I see same memory usage in Google Meet when the remote peer reconnects over and over.

From mediasoup-client side everything is ok. When consumer.close() is called, the remote track is stopped and the corresponding section of the remote SDP is later recycled/reused for a new remote consumer. Everything is good.

from mediasoup-client.

bianxg avatar bianxg commented on June 4, 2024

I test same scenario. Memory continue to grow and eventually causes the browser to crash after thousands of join and leave room.

from mediasoup-client.

ibc avatar ibc commented on June 4, 2024

I test same scenario. Memory continue to grow and eventually causes the browser to crash after thousands of join and leave room.

Can you identify where such a leak happens? Because I am 90% sure that it's a leak in the app rather than in mediasoup-client.

from mediasoup-client.

bianxg avatar bianxg commented on June 4, 2024

chrome_resource
app_resource

webrtc_internals_dump (1).txt
I think it's not leak in the app as showed from the picture.
I upload dump after 100 times join and leave room in another host.

from mediasoup-client.

ibc avatar ibc commented on June 4, 2024

Nothing in that picture indicates that the problem is in mediasoup-client.

Guys, I already spent time checking the whole mediasoup-client code and I didn't find any leak. So if I'm wrong and someone can identify a leak, please say it. I don't know what else I can do. Until now there are zero evidences telling that mediasoup-client leaks.

from mediasoup-client.

ibc avatar ibc commented on June 4, 2024

Hi guys, if someone can prove that there is a memory leak (in mediasoup-client rather than in the mediasoup-demo app), please provide proper data here demonstrating it. The only I see are some assumptions based on mediasoup-demo and some random logs and graphs that are thrown here for me to verify whether they make sense or not.

from mediasoup-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.