Bugzilla – Bug 15352
Failed when running main scan
Last modified: 2011-01-14 13:46:56 UTC
Created attachment 6395 [details] One of the music file which cause scanner to hang During my music collection scan, the scanner fails on a lot of files. No other files could then be scanned. Here is the scanner log, I also attached the faulty file ([NoDRM]-Objectif_Terre.wma) [09-12-20 19:45:15.4909] main::main (184) Starting Squeezebox Server scanner (v7.4.2, r29655, Sun Dec 20 04:04:11 PST 2009) perl 5.008008 [09-12-20 19:45:23.2013] Slim::Music::Import::runImporter (567) Starting Slim::Music::MusicFolderScan scan [09-12-20 19:46:03.4858] Slim::Utils::Scanner::scanDirectory (320) Found 1195 files in /media/Music [09-12-20 19:46:03.5136] Slim::Utils::Scanner::scanDirectory (333) Scanning: /media/Music/Musiques Achetés - mp3/The Pogues_Dirty Old Town.mp3 [09-12-20 19:46:04.6483] Slim::Utils::Scanner::scanDirectory (333) Scanning: /media/Music/Musiques Achetés - Sans Licences/Achat 20081222/[NoDRM]-Objectif_Terre.wma [09-12-20 19:46:04.8155] Slim::Schema::Storage::throw_exception (82) Error: DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`slimserver/tracks`, CONSTRAINT `tracks_ibfk_1` FOREIGN KEY (`album`) REFERENCES `albums` (`id`) ON DELETE CASCADE) [for Statement "INSERT INTO tracks (bitrate,drm,audio_size,samplesize,remote,titlesort,audio,timestamp,url,lossless,channels,samplerate,secs,filesize,content_type,album,tracknum,titlesearch,title,disc,year) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"] [09-12-20 19:46:04.8250] Slim::Schema::Storage::throw_exception (82) Backtrace: frame 0: Slim::Utils::Log::logBacktrace (/usr/share/perl5/Slim/Schema/Storage.pm line 82) frame 1: Slim::Schema::Storage::throw_exception (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 957) frame 2: DBIx::Class::Storage::DBI::__ANON__ (/usr/share/perl5/Slim/Schema.pm line 1001) frame 3: Slim::Schema::newTrack (/usr/share/perl5/Slim/Schema.pm line 1228) frame 4: Slim::Schema::updateOrCreate (/usr/share/perl5/Slim/Utils/Scanner.pm line 347) frame 5: Slim::Utils::Scanner::scanDirectory (/usr/share/perl5/Slim/Music/MusicFolderScan.pm line 79) frame 6: Slim::Music::MusicFolderScan::startScan (/usr/share/perl5/Slim/Music/Import.pm line 569) frame 7: Slim::Music::Import::runImporter (/usr/share/perl5/Slim/Music/Import.pm line 374) frame 8: Slim::Music::Import::runScan (/usr/sbin/squeezeboxserver-scanner line 294) frame 9: (eval) (/usr/sbin/squeezeboxserver-scanner line 288) frame 10: main::main (/usr/sbin/squeezeboxserver-scanner line 439) [09-12-20 19:46:04.8487] main::main (300) Error: Failed when running main scan: [Carp::Clan::__ANON__(): DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`slimserver/tracks`, CONSTRAINT `tracks_ibfk_1` FOREIGN KEY (`album`) REFERENCES `albums` (`id`) ON DELETE CASCADE) [for Statement "INSERT INTO tracks (bitrate,drm,audio_size,samplesize,remote,titlesort,audio,timestamp,url,lossless,channels,samplerate,secs,filesize,content_type,album,tracknum,titlesearch,title,disc,year) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"] at /usr/share/perl5/Slim/Schema/Storage.pm line 86 ] [09-12-20 19:46:04.8558] main::main (301) Error: Skipping post-process & Not updating lastRescanTime!
Could I trouble you to try to paste in the directory name here in a comment? In your description below it gets transformed to "/media/Music/Musiques Achetés" which doesn't seem likely to be the true text. Thanks!
Comment on attachment 6395 [details] One of the music file which cause scanner to hang The directory name is with some French special characters :-): "/media/Music/Musiques Achetées"
So you need to read this from the log: /media/Music/Musiques Achetées - mp3/The Pogues_Dirty Old Town.mp3 /media/Music/Musiques Achetées - Sans Licences/Achat 20081222/[NoDRM]-Objectif_Terre.wma Many thanks to take care of my issue.
qa to reproduce. Andy thinks a 'Clear database and rescan everything' will fix it.
Hello, I just read your comment "'Clear database and rescan everything' will fix it". and then think this additionnal information could be usefull (or not :-)): I already try to either "scan again for added or modified files" and "clean database and analyse everything again" options in the user interface. Both produced similar crashes in the scanner. In addition, as my original Netgear device get broken, I switched to i386 with Debian 5.03 on it ... and still experiment the same issue. Many thanks again for your help.
see also: bug 3643 bug 15092 similar type log reports. clearly an issue with an attempt to prod data into the db that doesn't match what is expected.
Moving P3 and lower bugs to next release target