Menu

#325 libavcodec crash results in scanning stopping

v1.0 (example)
open
nobody
None
5
2020-01-05
2020-01-05
No

If minidlna crashes deep in libavcodec, media file scanning simply stops, with no information about what could have happened.

In my case, the problem was with a version of libavcodec that was compiled with unsupported CPU features, resulting in a SIGILL during scanning.

Ideally, as the scanner is usually forked (around start_scanner()), a bit of memory would be statically allocated (enough to hold the filename of the crashy file for example), the metadata code would update the currently processed filename in that section of RAM. If SIGILL, SIGSEGV are then caught by signal handlers, it would allow throwing a human-readable error that'd say "Scanner crashed, libavcodec crashed when handling " followed by the filename.

The reproducer would be to have lav_open() crash on a specific file in a test directory, and check whether an error is thrown when that file is processed, rather than silently failing.

Discussion


Log in to post a comment.