Skip to content

Crashes while going through a large library in multithreaded mode can lead to data loss. #50

@Mihara

Description

@Mihara

When rsgain stumbles into a damaged unplayable file -- which do exist in sufficiently large libraries -- it's liable to segfault:

[102904.055817] rsgain[277209]: segfault at 0 ip 00007fd13ca704d3 sp 00007ffd20513768 error 4 in libswresample.so.3.5.100[7fd13ca60000+16000]
[102904.055840] Code: 00 00 0f 85 59 ff ff ff 48 8d 34 96 48 8d 0c 91 48 8d 3c 97 48 f7 da 66 0f 6f 2d d8 80 00 00 66 0f 6f 04 96 66 0f 6f 4c 96 10 <66> 0f 6f 14 91 66 0f 6f5c 91 10 0f 59 c5 0f 59 cd 0f 59 d5 0f 59

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions