Bug 15208 - Embedded branch: Server spawns redundant scanner processes
: Embedded branch: Server spawns redundant scanner processes
Status: RESOLVED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.5.0
: PC Ubuntu Linux
: P3 normal (vote)
: 7.6.0
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-29 12:43 UTC by Joerg Schwieder
Modified: 2011-01-14 13:45 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Schwieder 2009-11-29 12:43:00 UTC
The embedded branch server on ubuntu 8.04 lts is not able to scan because it spawns redundant scanner processes.

What I see is that independent of whether a scanner process is already running, a new scanner process becomes started every two minutes. Initially, two are being started at once.

The two processes (either the two started upon server startup or each two of the later ones) lock up each others' database and then exit.

This results in no scan ever being completed. Scan works fine when I stop the server once a single scanner is running before another one kicks in.

Some logs:

[09-11-29 11:51:15.6712] main::main (202) Starting Squeezebox Server scanner (v7.5.0, r29492, Fri Nov 27 04:33:24 PST 2009) perl 5.008008
[09-11-29 11:51:17.9743] Slim::Utils::SQLiteHelper::checkDataSource (214) Warning: Scanner database found, checking for a newer scan...
[09-11-29 11:51:17.9846] Slim::Utils::SQLiteHelper::checkDataSource (228) Warning: A scan is currently in progress or the scanner crashed, ignoring scanner database
[09-11-29 11:51:18.4121] Slim::Schema::Storage::throw_exception (82) Error: DBI Exception: DBD::SQLite::st execute failed: database is locked [for Statement "INSERT INTO metainformation ( name) VALUES ( ? )"]
[09-11-29 11:51:18.4138] 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 1006)
   frame 2: DBIx::Class::Storage::DBI::__ANON__ (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 1287)
   frame 3: DBIx::Class::Storage::DBI::_dbh_execute (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 590)
   frame 4: (eval) (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 581)
   frame 5: DBIx::Class::Storage::DBI::dbh_do (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 1297)
   frame 6: DBIx::Class::Storage::DBI::_execute (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 1328)
   frame 7: DBIx::Class::Storage::DBI::insert (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Row.pm line 330)
   frame 8: DBIx::Class::Row::insert (/usr/share/squeezeboxserver/lib/DBIx/Class/ResultSet.pm line 2306)
   frame 9: DBIx::Class::ResultSet::create (/usr/share/squeezeboxserver/lib/DBIx/Class/ResultSet.pm line 2367)
   frame 10: DBIx::Class::ResultSet::find_or_create (/usr/share/perl5/Slim/Music/Import.pm line 260)
   frame 11: Slim::Music::Import::setIsScanning (/usr/sbin/squeezeboxserver-scanner line 293)
   frame 12: main::main (/usr/sbin/squeezeboxserver-scanner line 545)

[09-11-29 11:51:18.4158] Slim::Schema::Storage::throw_exception (82) Error: Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::st execute failed: database is locked [for Statement "INSERT INTO metainformation ( name) VALUES ( ? )"] at /usr/share/perl5/Slim/Schema/Storage.pm line 86
[09-11-29 11:51:18.4173] 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 598)
   frame 2: DBIx::Class::Storage::DBI::dbh_do (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 1297)
   frame 3: DBIx::Class::Storage::DBI::_execute (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 1328)
   frame 4: DBIx::Class::Storage::DBI::insert (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Row.pm line 330)
   frame 5: DBIx::Class::Row::insert (/usr/share/squeezeboxserver/lib/DBIx/Class/ResultSet.pm line 2306)
   frame 6: DBIx::Class::ResultSet::create (/usr/share/squeezeboxserver/lib/DBIx/Class/ResultSet.pm line 2367)
   frame 7: DBIx::Class::ResultSet::find_or_create (/usr/share/perl5/Slim/Music/Import.pm line 260)
   frame 8: Slim::Music::Import::setIsScanning (/usr/sbin/squeezeboxserver-scanner line 293)
   frame 9: main::main (/usr/sbin/squeezeboxserver-scanner line 545)

[09-11-29 11:51:18.4187] Carp::Clan::__ANON__ (214) Warning: Carp::Clan::__ANON__(): Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::st execute failed: database is locked [for Statement "INSERT INTO metainformation ( name) VALUES ( ? )"] at /usr/share/perl5/Slim/Schema/Storage.pm line 86
[09-11-29 11:51:18.4276] Slim::Schema::Storage::throw_exception (82) Error: DBI Exception: DBD::SQLite::st execute failed: database is locked [for Statement "INSERT INTO metainformation ( name) VALUES ( ? )"]
[09-11-29 11:51:18.4293] 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 1006)
   frame 2: DBIx::Class::Storage::DBI::__ANON__ (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 1287)
   frame 3: DBIx::Class::Storage::DBI::_dbh_execute (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 590)
   frame 4: (eval) (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 581)
   frame 5: DBIx::Class::Storage::DBI::dbh_do (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 1297)
   frame 6: DBIx::Class::Storage::DBI::_execute (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 1328)
   frame 7: DBIx::Class::Storage::DBI::insert (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Row.pm line 330)
   frame 8: DBIx::Class::Row::insert (/usr/share/squeezeboxserver/lib/DBIx/Class/ResultSet.pm line 2306)
   frame 9: DBIx::Class::ResultSet::create (/usr/share/squeezeboxserver/lib/DBIx/Class/ResultSet.pm line 2367)
   frame 10: DBIx::Class::ResultSet::find_or_create (/usr/share/perl5/Slim/Music/Import.pm line 260)
   frame 11: Slim::Music::Import::setIsScanning (/usr/sbin/squeezeboxserver-scanner line 498)
   frame 12: main::cleanup (/usr/share/perl5/Slim/bootstrap.pm line 400)
   frame 13: Slim::bootstrap::sigint (/usr/share/perl5/Slim/bootstrap.pm line 434)
   frame 14: Slim::bootstrap::theEND (/usr/sbin/squeezeboxserver-scanner line 540)
   frame 15: main::END (/usr/sbin/squeezeboxserver-scanner line 0)
   frame 16: (eval) (/usr/sbin/squeezeboxserver-scanner line 0)

[09-11-29 11:51:18.4313] Slim::Schema::Storage::throw_exception (82) Error: Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::st execute failed: database is locked [for Statement "INSERT INTO metainformation ( name) VALUES ( ? )"] at /usr/share/perl5/Slim/Schema/Storage.pm line 86
[09-11-29 11:51:18.4329] 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 598)
   frame 2: DBIx::Class::Storage::DBI::dbh_do (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 1297)
   frame 3: DBIx::Class::Storage::DBI::_execute (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Storage/DBI.pm line 1328)
   frame 4: DBIx::Class::Storage::DBI::insert (/usr/share/squeezeboxserver/CPAN/DBIx/Class/Row.pm line 330)
   frame 5: DBIx::Class::Row::insert (/usr/share/squeezeboxserver/lib/DBIx/Class/ResultSet.pm line 2306)
   frame 6: DBIx::Class::ResultSet::create (/usr/share/squeezeboxserver/lib/DBIx/Class/ResultSet.pm line 2367)
   frame 7: DBIx::Class::ResultSet::find_or_create (/usr/share/perl5/Slim/Music/Import.pm line 260)
   frame 8: Slim::Music::Import::setIsScanning (/usr/sbin/squeezeboxserver-scanner line 498)
   frame 9: main::cleanup (/usr/share/perl5/Slim/bootstrap.pm line 400)
   frame 10: Slim::bootstrap::sigint (/usr/share/perl5/Slim/bootstrap.pm line 434)
   frame 11: Slim::bootstrap::theEND (/usr/sbin/squeezeboxserver-scanner line 540)
   frame 12: main::END (/usr/sbin/squeezeboxserver-scanner line 0)
   frame 13: (eval) (/usr/sbin/squeezeboxserver-scanner line 0)

[09-11-29 11:51:18.4344] main:: (0) Warning: Carp::Clan::__ANON__(): Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::st execute failed: database is locked [for Statement "INSERT INTO metainformation ( name) VALUES ( ? )"] at /usr/share/perl5/Slim/Schema/Storage.pm line 86
END failed--call queue aborted.
Comment 1 Philip Meyer 2009-11-29 14:23:22 UTC
I have also seen frequent scanner activity, even though automatic scan is turned off, when using SQLite.  When I switched to MySQL, frequent rescans seemed to stop.

I'm using Win XP.

When I start a scan, the WebUI doesn't indicate that a scan is in progress.
Comment 2 Joerg Schwieder 2009-11-29 14:49:39 UTC
Oh yes, I forgot to mention:
SQLite, Automatic rescan setting has not impact whatsoever.
Comment 3 Chris Owens 2009-12-07 09:26:04 UTC
Michael notes Andy has been doing work in this area
Comment 4 Chris Owens 2010-03-26 16:09:00 UTC
Andy do we need a separate bugzilla 'product' for embedded?  I am starting to think so.
Comment 5 Andy Grundman 2010-03-26 17:15:45 UTC
This will move to 7.6 soon.
Comment 6 Andy Grundman 2011-01-14 13:45:26 UTC
Does this still happen? Please reopen if so.