Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OOM because chunks get buffered indefinitely #708

Closed
entropia1 opened this issue Oct 8, 2020 · 2 comments
Closed

OOM because chunks get buffered indefinitely #708

entropia1 opened this issue Oct 8, 2020 · 2 comments
Labels
bug next release fixed in develop branch and will be part of the next release

Comments

@entropia1
Copy link

I have snapclient running on Linux, connected to a USB audio device. Whenever I turn off the audio device, it gets disconnected entirely, so ALSA doesn‘t know about it anymore. The first thing you notice is a whole lot of error messages like the following:

[Error] (Alsa) Exception in initAlsa: Can't open front:CARD=Device,DEV=0, error: No such device

The bigger problem, though, is that snapclient continues to buffer audio chunks, but never gets to use any of them, so the system quickly runs out of memory.

@badaix
Copy link
Owner

badaix commented Oct 8, 2020

Actually, snapclient discards chunks older than 5 seconds. Does it really run out of memory on your system?

@entropia1
Copy link
Author

entropia1 commented Oct 8, 2020

I logged the stream_‘s chunks_.size() right where the above error gets logged and it kept increasing. It gets reset whenever I reconnect the USB device and playback resumes.

@badaix badaix added the bug label Oct 9, 2020
@badaix badaix added the next release fixed in develop branch and will be part of the next release label Oct 12, 2020
@badaix badaix closed this as completed in 1367664 Oct 13, 2020
@badaix badaix reopened this Oct 13, 2020
@badaix badaix closed this as completed Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug next release fixed in develop branch and will be part of the next release
Projects
None yet
Development

No branches or pull requests

2 participants