-
Notifications
You must be signed in to change notification settings - Fork 108
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
Gstreamer backend seems to leak memory #62
Comments
Interesting! To narrow down what's going wrong, can you please do some more investigation to narrow down the leak to specific actions in the audioread library? We might have a shot at fixing this if you can point to exactly what's being leaked. |
See the script. Actually, the only thing I use is |
I understand, but that still doesn't point to exactly where the leak is coming from. It would be awesome to have your help investigating exactly what gets leaked and when. |
Yes, would be nice, but not sure if I have the time now (I already spent multiple hours in debugging this issue, and need to proceed with my actual work). I think you should be able to reproduce the issue with my script. As there as so many issues with Gstreamer anyway, I would maybe even suggest to completely remove it. My solution for now is to use PySoundFile instead of audioread. Btw., that is also what librosa is recommending. |
OK! Please check back in if you ever get the chance to help. |
I'm experiencing this issue with Beets 1.4.6 on Fedora 28. I tried updating to Git master of audioread, as the unreleased version 2.1.7 contains an FD leak fix (72ed349). This change causes
I haven't been able to reproduce this issue using |
That's troubling. @RyanMarcus, have you encountered this? Perhaps, to reproduce the problem, one would need to decode several files in a row? |
I've managed to reproduce it now. The crash appears to be triggered if the .close() method is called before reading is complete. I'll open a separate MR with a fix (edit: #78) |
Huh, that's strange -- it looks like a race. When the process is started, it seems like the reading process is delegated to a thread (i.e. I haven't tested this, but it would explain why a partial read is causing the issue. |
Here is a small script to demonstrate the issue. The memory consumption constantly grows (up to 8GB).
See here for a discussion.
The text was updated successfully, but these errors were encountered: