jasonmc / forked-daapd

A re-write of the firefly media server (mt-daapd). It's released under GPLv2+. Please note that this git repository is a mirror of the official one at git://git.debian.org/~jblache/forked-daapd.git
http://blog.technologeek.org/2009/06/12/217
GNU General Public License v2.0
326 stars 45 forks source link

Filescanner gets hung up on certain non-audio filetypes #83

Open natlownes opened 12 years ago

natlownes commented 12 years ago

I can watch the filescanner threads each scan audio files perfectly, but it looks like when one encounters certain types of files, it looks like they all die after scanning what they were doing, leaving the one that discovered the offending file to pin the CPU.

sudo lsof -u daapd |grep storage

Output:

forked-da 30724 daapd   67r   REG               0,17    35349 13238644 /mnt/storage/nat/music/mp3/Juston Stens and the Get Real Gang/Mac - Add to iTunes.app/Contents/Resources/English.lproj
/MainMenu.nib (sv0.int.looting.biz:/mnt/storage/nat/)
forked-da 30724 daapd   82r   DIR               0,17     4096 13238400 /mnt/storage/nat/music/mp3/Juston Stens and the Get Real Gang/Mac - Add to iTunes.app/Contents/Resources/English.lproj
 (sv0.int.looting.biz:/mnt/storage/nat/)

This is has been running for about a week. I noticed it at first doing this with Thumbs.db files, so I deleted all those, now it's choking on these.

Maybe a solution might be to allow a configuration option to only scan for files with particular extensions? If you think that's something, I wouldn't mind diving in and trying to put together a patch.

freultwah commented 12 years ago

This is happening here, as well. It started with a PDF file (heh heh), when I zipped it and restarted the process, it then hung on some DOC file, and after zipping that one up, the next one it choked on was a Thumbs.db, and after that, a LOG file. The strange thing is that not all PDFs, DB-s, DOCs or LOGs seemed to cause it, but certain sequences in files or some such force the filescanner go haywire. For example, log files with Latin codepages get scanned without problems, but I found it choked on a file full of Cyrillic letters in an 8 bit character set.

I agree with your proposal to have a config option to scan only certain files.

forked-daapd 0.19 (non-gcd) libav 0.8

StephenAtty commented 11 years ago

I've coded this in on my 0.19gcd setup - actually its a list of file types NOT to scan, and I'm also adding in the option NOT to completely rebuild the database on server start up. Not sure what the difference between 0.19 and 0.19gcd is - so not sure if diffs would help people.