Bugzilla – Bug 15953
Scanner gets stuck and never stops if disk is full
Last modified: 2019-01-25 10:11:11 UTC
Running TinySC/Fab4 combo with firmware r8665. Testing with 16GB SD card with >8500 MP3 tracks (copies of audio CDs). Don't remember how many tracks total, but that's probably closer to the end. Scanner gets stuck around 8500 tracks. Tried it twice, go stuck twice. Not sure if related to SD card capacity. Message log enclosed with scanner debug switches enabled.
Created attachment 6705 [details] Message log with scanner debug enabled In chatting with Andy, it appeared that scanner is in a loop and running, so "stuck" is not a precise term.
Turns out 16GB card is full. Need to handle this case gracefully.
Andy suggests that we calculate free space in a nonblocking manner after drive mount, and stop the server if there's not enough to store the DB or artwork cache. We can also look for write errors while writing files. Felix notes that if we detect we're out of space, we could not bother with the artwork cache.
It occurs to me that maybe some kind of a placeholder file on the media to prevent the user from filling it up might be, and we would then delete that file when we start our scan. I don't know how that might work, though.
Hmm interesting idea. We could write a large-ish test file filled with zeros to see if that much disk space is available, if writing this file fails we know the disk is full. Of course we don't know how large their drive or library is so we'd have to pick a size that works for most people.
TinySC will not be updated any more.