[GH-ISSUE #677] Memory Leak? #388

Closed
opened 2026-02-27 19:30:21 +03:00 by kerem · 5 comments
Owner

Originally created by @Johannesd3 on GitHub (Mar 20, 2021).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/677

When running Librespot (release mode) and skipping through playlists, the used memory increases slowly but steady. It starts with 2-3MB, but after a while I was able to reach 8MB.

It seems to happen in both the dev and the tokio_migration branch.

Originally created by @Johannesd3 on GitHub (Mar 20, 2021). Original GitHub issue: https://github.com/librespot-org/librespot/issues/677 When running Librespot (release mode) and skipping through playlists, the used memory increases slowly but steady. It starts with 2-3MB, but after a while I was able to reach 8MB. It seems to happen in both the `dev` and the `tokio_migration` branch.
kerem closed this issue 2026-02-27 19:30:21 +03:00
Author
Owner

@kingosticks commented on GitHub (Mar 20, 2021):

8MB sounds like approx. two 'normal' length tracks worth of compressed audio data. Could this be the track prefetching working correctly?

<!-- gh-comment-id:803316161 --> @kingosticks commented on GitHub (Mar 20, 2021): 8MB sounds like approx. two 'normal' length tracks worth of compressed audio data. Could this be the track prefetching working correctly?
Author
Owner

@Johannesd3 commented on GitHub (Mar 20, 2021):

I just stopped at 8MB, probably it's possible to reach more. Every time I skip a track, memory usage grows by something between nothing and 0.5MB.

<!-- gh-comment-id:803318554 --> @Johannesd3 commented on GitHub (Mar 20, 2021): I just stopped at 8MB, probably it's possible to reach more. Every time I skip a track, memory usage grows by something between nothing and 0.5MB.
Author
Owner

@kingosticks commented on GitHub (Mar 20, 2021):

Maybe share your cache settings and which backend also.

<!-- gh-comment-id:803318948 --> @kingosticks commented on GitHub (Mar 20, 2021): Maybe share your cache settings and which backend also.
Author
Owner

@Johannesd3 commented on GitHub (Mar 20, 2021):

I'm using rodio-backend under Windows, no cache enabled.

I tried different configurations out, and it's possible (but I'm not really sure) this is an issue of lewton. With tremor it doesn't exceed 3MB permanently.

Edit: I've reached 3.7MB with tremor, while Iewton seems to stop at this limit too now. It's really hard to reproduce as it doesn't behave deterministic.

<!-- gh-comment-id:803324104 --> @Johannesd3 commented on GitHub (Mar 20, 2021): I'm using rodio-backend under Windows, no cache enabled. I tried different configurations out, and it's possible (but I'm not really sure) this is an issue of lewton. With tremor it doesn't exceed ~3MB~ permanently. Edit: I've reached 3.7MB with tremor, while Iewton seems to stop at this limit too now. It's really hard to reproduce as it doesn't behave deterministic.
Author
Owner

@Johannesd3 commented on GitHub (Mar 20, 2021):

Actually I think it's only an issue in dev and I just imagined the same thing happens in tokio_migration when the numbers rose a little. And in dev it happens with both lewton and tremor. So wherever the problem lies, it will probably be fixed by #665.

<!-- gh-comment-id:803356102 --> @Johannesd3 commented on GitHub (Mar 20, 2021): Actually I think it's only an issue in `dev` and I just imagined the same thing happens in `tokio_migration` when the numbers rose a little. And in `dev` it happens with both `lewton` and `tremor`. So wherever the problem lies, it will probably be fixed by #665.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#388
No description provided.