Bug 15352 - Failed when running main scan
: Failed when running main scan
Status: RESOLVED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.4.2
: Infrant ReadyNAS RAIDiator (SPARC)
: P3 normal (vote)
: 7.5.x
Assigned To: Andy Grundman
: test_automation
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-20 11:13 UTC by mysqueezeserverbugs2009
Modified: 2011-01-14 13:46 UTC (History)
1 user (show)

See Also:
Category: Bug


Attachments
One of the music file which cause scanner to hang (5.48 MB, audio/x-ms-wma)
2009-12-20 11:13 UTC, mysqueezeserverbugs2009
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mysqueezeserverbugs2009 2009-12-20 11:13:07 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!
Comment 1 Chris Owens 2010-01-29 10:05:44 UTC
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 2 mysqueezeserverbugs2009 2010-01-29 12:36:02 UTC
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"
Comment 3 mysqueezeserverbugs2009 2010-01-29 12:41:06 UTC
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.
Comment 4 Chris Owens 2010-02-01 09:27:04 UTC
qa to reproduce.  Andy thinks a 'Clear database and rescan everything' will fix it.
Comment 5 mysqueezeserverbugs2009 2010-02-02 10:37:23 UTC
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.
Comment 6 KDF 2010-02-10 12:21:15 UTC
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.
Comment 7 Chris Owens 2010-03-08 11:17:24 UTC
Moving P3 and lower bugs to next release target