-
Notifications
You must be signed in to change notification settings - Fork 20
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
Crashes while going through a large library in multithreaded mode can lead to data loss. #50
Comments
Based on your log, the segfault is occurring in the FFmpeg library swresample. Do you know which file is causing the segfault? Are you able to reproduce it? |
I have since (foolishly) deleted all the files on which it choked, but I've just started a full re-generation of replaygain in my library. If it trips on one that was previously ignored because it already had replaygain tags, I'll get back to you with it, but I can't make any promises otherwise. |
...Alas, no other files which crashed rsgain were found. |
...And then I suddenly acquired a new file on which rsgain always segfaults. :) https://transfer.sh/JO59AY/foo.mp3 Beware, this link has an expiration date. |
@Mihara Thanks for that file. I was able to reproduce the segfault. After investigation, I believe this is a bug in FFmpeg as I had previously suspected. The decoder is giving a corrupt audio frame without returning an error code. Nevertheless, I was able to implement a workaround to detect corrupt audio frames and ignore them c27fa5e. |
When rsgain stumbles into a damaged unplayable file -- which do exist in sufficiently large libraries -- it's liable to segfault:
Unfortunately, if that happens while it's running in multithreaded mode, and the other thread is saving replaygain tags, the crash can lose you data -- unrelated, undamaged files get renamed.
It would be nice if this sort of segfault was caught and damaged files reported instead, because that makes multithreaded mode unusable.
The text was updated successfully, but these errors were encountered: