Bug 17354 - Scan can fail due to SQLite locking
: Scan can fail due to SQLite locking
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.6.0
: PC Linux (other)
: P1 critical with 2 votes (vote)
: 7.6.1
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-27 02:02 UTC by Ernst
Modified: 2011-08-08 08:41 UTC (History)
4 users (show)

See Also:
Category: ---


Attachments
scanner log, server log (8.58 KB, text/plain)
2011-07-27 02:02 UTC, Ernst
Details
scanner.log, server.log Version v7.6.1, r3293 (8.10 KB, text/plain)
2011-08-01 11:04 UTC, bugzilla2001-vortexbox
Details
scanner.log, server.log Version v7.6.1, r32992 (8.63 KB, text/plain)
2011-08-06 00:11 UTC, bugzilla2001-vortexbox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ernst 2011-07-27 02:02:06 UTC
Created attachment 7347 [details]
scanner log, server log

When scanning the music collection, the scan terminates when another process
accesses the database at the same time.

This can be triggered by starting a playlist, or by accessing the music folder
during the scan. 

On the squeezeserver info page, the progress bar and the count of scanned files
are no longer increased, and the music library is nearly empty.

Excerpt from the scanner log:

[11-07-27 10:35:17.0022] main::main (336) Error: Failed when running main scan: 
[Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::st execute failed: 
database is locked [for Statement "UPDATE tracks_persistent SET urlmd5 = ?, 
playCount = NULL, added = ?, url = ?, lastPlayed = NULL, musicbrainz_id = NULL, 
rating = NULL WHERE id = ?"] at /usr/share/perl5/Slim/Schema/Storage.pm line
123]

Excerpt from the server log:

[11-07-27 10:34:56.4353] Slim::Schema::Storage::throw_exception (119) 
Error: DBI Exception: DBD::SQLite::st execute failed: database is locked 
[for Statement "INSERT INTO tracks_persistent (urlmd5,url,added) VALUES
(?,?,?)"]
Comment 1 Ernst 2011-07-27 02:35:47 UTC
Seems to be related to bug #16003 which was marked
RESOLVED FIXED on 2011-05-26.

The problem occurs with:
Version: 7.6.0 - r32854 @ Mon Jul 25 10:10:04 PDT 2011
Comment 2 Ernst 2011-07-27 03:35:27 UTC
Just checked my installation, the fix for bug #16003 in Song.pm is present in 
Version: 7.6.0 - r32854 @ Mon Jul 25 10:10:04 PDT 2011. 
However, this patch does not fully fix the problem.
Comment 3 bugzilla2001-vortexbox 2011-08-01 11:04:02 UTC
Created attachment 7365 [details]
scanner.log, server.log Version v7.6.1, r3293
Comment 4 bugzilla2001-vortexbox 2011-08-06 00:11:56 UTC
Created attachment 7378 [details]
scanner.log, server.log Version v7.6.1, r32992

Error unchanged, but I found a new error in the log:

"[11-08-06 00:45:36.0376] Slim::Networking::UDP::init (39) FATAL: There is already another copy of the Squeezebox Server running on this machine. (Die Adresse wird bereits verwendet)"

On Linux: service squeezeboxserver status
-> squeezeboxserver tot, aber Subsystem gesperrt (SqueezeboxServer dead, but subsystem locked)

squeezeboxserver is running. Playing music is possible. Scan for new Items works, but not clear library and rescan.
Comment 5 Andy Grundman 2011-08-08 08:41:09 UTC
Change 33020 should fix this.