Bugzilla – Bug 10495
SC 7.3.1 raises exception on trying to execute database queries
Last modified: 2008-12-30 12:36:15 UTC
I've seen several reports of this for people using iPeng and not getting data. It seems like SC fails to open a temp file on Windows while executing a query, I cannot reproduce this since I don't have access to a Windows machine right now but I have some log files, I'll paste some of the relevant sections here. I've seen this happening on "albums" and "status" queries. Andy, I set you on CC: because I thought you are probably the right person to address this to, please excuse if that's wrong. I'm not sure what the exception means, maybe the file SC tries to open is already open, maybe the file name is illegal. I did rule out: Disk full, path not available and since it's Windows: wrong permissions. Also, don't know if it's related, but one of the customers reported that SC failed to shut down through the tray icon and he had to use the Task Manager. [08-12-29 19:23:31.3966] Slim::Web::JSONRPC::handleURI (73) handleURI(Slim::Web::HTTP::ClientConn=GLOB(0x974f928)) [08-12-29 19:23:31.3983] Slim::Web::JSONRPC::handleURI (108) POST data: [{"id":1,"method":"slim.request","params":["00:04:20:07:ef:65",["albums",0,100,"sort:album","tags:ljywag"]]}] [08-12-29 19:23:31.3998] Slim::Web::JSONRPC::handleURI (126) JSON parsed procedure: { id => 1, method => "slim.request", params => [ "00:04:20:07:ef:65", ["albums", 0, 100, "sort:album", "tags:ljywag"], ], } [08-12-29 19:23:31.4010] Slim::Web::JSONRPC::requestMethod (308) requestMethod([ "00:04:20:07:ef:65", ["albums", 0, 100, "sort:album", "tags:ljywag"], ]) [08-12-29 19:23:31.4014] Slim::Web::JSONRPC::requestMethod (330) Parsing command: Found client [00:04:20:07:ef:65] [08-12-29 19:23:31.4018] Slim::Web::JSONRPC::requestMethod (352) Dispatching... [08-12-29 19:23:41.9198] Slim::Schema::Storage::throw_exception (70) Error: Error executing 'SELECT contributor.id, contributor.name, contributor.namesort, contributor.musicmagic_mixable, contributor.namesearch, contributor.musicbrainz_id FROM contributor_album me JOIN contributors contributor ON ( contributor.id = me.contributor ) WHERE ( ( ( role IN ( ? ) ) AND ( me.album = ? ) ) ) GROUP BY contributor.id ORDER BY role desc': DBD::mysql::st execute failed: Can't create/write to file 'C:\Windows\TEMP\#sql_16e8_0.MYD' (Errcode: 13) at /<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/Storage/DBI.pm line 771. [08-12-29 19:23:41.9205] Slim::Schema::Storage::throw_exception (70) Backtrace: frame 0: Slim::Utils::Log::logBacktrace (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Schema/Storage.pm line 70) frame 1: Slim::Schema::Storage::throw_exception (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/Storage/DBI.pm line 773) frame 2: DBIx::Class::Storage::DBI::_execute (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/Storage/DBI.pm line 826) frame 3: DBIx::Class::Storage::DBI::_select (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/Storage/DBI/Cursor.pm line 118) frame 4: DBIx::Class::Storage::DBI::Cursor::all (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/ResultSet.pm line 947) frame 5: DBIx::Class::ResultSet::all (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Schema/Album.pm line 172) frame 6: Slim::Schema::Album::artistsForRoles (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Schema/Album.pm line 182) frame 7: Slim::Schema::Album::artists (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Control/Queries.pm line 553) frame 8: Slim::Control::Queries::albumsQuery (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Control/Request.pm line 1885) frame 9: (eval) (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Control/Request.pm line 1885) frame 10: Slim::Control::Request::execute (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Web/JSONRPC.pm line 354) frame 11: Slim::Web::JSONRPC::requestMethod (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Web/JSONRPC.pm line 201) frame 12: (eval) (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Web/JSONRPC.pm line 201) frame 13: Slim::Web::JSONRPC::handleURI (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Web/HTTP.pm line 537) frame 14: Slim::Web::HTTP::processHTTP (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Networking/IO/Select.pm line 268) frame 15: (eval) (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Networking/IO/Select.pm line 268) frame 16: Slim::Networking::IO::Select::select (slimserver.pl line 541) frame 17: main::idle (slimserver.pl line 486) frame 18: main::main (slimserver.pl line 88) frame 19: PerlSvc::Interactive (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>PerlSvc.pm line 99) frame 20: PerlSvc::_interactive (slimserver.pl line 0) frame 21: (eval) (slimserver.pl line 0) [08-12-29 19:23:41.9276] Slim::Control::Request::execute (1889) Error: While trying to run function coderef [Slim::Control::Queries::albumsQuery]: [Carp::Clan::__ANON__(): Error executing 'SELECT contributor.id, contributor.name, contributor.namesort, contributor.musicmagic_mixable, contributor.namesearch, contributor.musicbrainz_id FROM contributor_album me JOIN contributors contributor ON ( contributor.id = me.contributor ) WHERE ( ( ( role IN ( ? ) ) AND ( me.album = ? ) ) ) GROUP BY contributor.id ORDER BY role desc': DBD::mysql::st execute failed: Can't create/write to file 'C:\Windows\TEMP\#sql_16e8_0.MYD' (Errcode: 13) at /<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/Storage/DBI.pm line 771. ] [08-12-29 19:23:41.9307] Slim::Web::JSONRPC::requestMethod (358) Request failed with error: Bad dispatch! ... [08-12-29 19:23:41.9907] Slim::Web::JSONRPC::handleURI (108) POST data: [{"id":1,"method":"slim.request","params":["00:04:20:07:ef:65",["status","-",1,"tags:uBJjKlax"]]}] [08-12-29 19:23:41.9921] Slim::Web::JSONRPC::handleURI (126) JSON parsed procedure: { id => 1, method => "slim.request", params => ["00:04:20:07:ef:65", ["status", "-", 1, "tags:uBJjKlax"]], } [08-12-29 19:23:41.9947] Slim::Web::JSONRPC::requestMethod (308) requestMethod(["00:04:20:07:ef:65", ["status", "-", 1, "tags:uBJjKlax"]]) [08-12-29 19:23:41.9953] Slim::Web::JSONRPC::requestMethod (330) Parsing command: Found client [00:04:20:07:ef:65] [08-12-29 19:23:41.9958] Slim::Web::JSONRPC::requestMethod (352) Dispatching... [08-12-29 19:23:42.0087] Slim::Schema::Storage::throw_exception (70) Error: Error executing 'SELECT contributor.id, contributor.name, contributor.namesort, contributor.musicmagic_mixable, contributor.namesearch, contributor.musicbrainz_id FROM contributor_track me JOIN contributors contributor ON ( contributor.id = me.contributor ) WHERE ( ( ( role IN ( ? ) ) AND ( me.track = ? ) ) ) GROUP BY contributor.id ORDER BY role desc': DBD::mysql::st execute failed: Can't create/write to file 'C:\Windows\TEMP\#sql_16e8_0.MYD' (Errcode: 13) at /<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/Storage/DBI.pm line 771. [08-12-29 19:23:42.0097] Slim::Schema::Storage::throw_exception (70) Backtrace: frame 0: Slim::Utils::Log::logBacktrace (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Schema/Storage.pm line 70) frame 1: Slim::Schema::Storage::throw_exception (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/Storage/DBI.pm line 773) frame 2: DBIx::Class::Storage::DBI::_execute (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/Storage/DBI.pm line 826) frame 3: DBIx::Class::Storage::DBI::_select (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/Storage/DBI.pm line 852) frame 4: DBIx::Class::Storage::DBI::select_single (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/ResultSet.pm line 511) frame 5: DBIx::Class::ResultSet::single (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Schema/Track.pm line 103) frame 6: Slim::Schema::Track::artist (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Control/Queries.pm line 5591) frame 7: Slim::Control::Queries::_songData (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Control/Queries.pm line 4931) frame 8: Slim::Control::Queries::_addSong (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Control/Queries.pm line 3543) frame 9: Slim::Control::Queries::statusQuery (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Control/Request.pm line 1885) frame 10: (eval) (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Control/Request.pm line 1885) frame 11: Slim::Control::Request::execute (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Web/JSONRPC.pm line 354) frame 12: Slim::Web::JSONRPC::requestMethod (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Web/JSONRPC.pm line 201) frame 13: (eval) (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Web/JSONRPC.pm line 201) frame 14: Slim::Web::JSONRPC::handleURI (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Web/HTTP.pm line 537) frame 15: Slim::Web::HTTP::processHTTP (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Networking/IO/Select.pm line 268) frame 16: (eval) (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Networking/IO/Select.pm line 268) frame 17: Slim::Networking::IO::Select::select (slimserver.pl line 541) frame 18: main::idle (slimserver.pl line 486) frame 19: main::main (slimserver.pl line 88) frame 20: PerlSvc::Interactive (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>PerlSvc.pm line 99) frame 21: PerlSvc::_interactive (slimserver.pl line 0) frame 22: (eval) (slimserver.pl line 0) [08-12-29 19:23:42.0105] Slim::Control::Request::execute (1889) Error: While trying to run function coderef [Slim::Control::Queries::statusQuery]: [Carp::Clan::__ANON__(): Error executing 'SELECT contributor.id, contributor.name, contributor.namesort, contributor.musicmagic_mixable, contributor.namesearch, contributor.musicbrainz_id FROM contributor_track me JOIN contributors contributor ON ( contributor.id = me.contributor ) WHERE ( ( ( role IN ( ? ) ) AND ( me.track = ? ) ) ) GROUP BY contributor.id ORDER BY role desc': DBD::mysql::st execute failed: Can't create/write to file 'C:\Windows\TEMP\#sql_16e8_0.MYD' (Errcode: 13) at /<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>DBIx/Class/Storage/DBI.pm line 771. ] [08-12-29 19:23:42.0117] Slim::Web::JSONRPC::requestMethod (358) Request failed with error: Bad dispatch!
The standard answer for errors like that is to disable anti-virus.
Thanks. Wouldn't it make sense to have a workaround for this since it seems to be quite a common issue? Like re-trying or something or keeping a file handle open?
The MySQL driver craps out because it can't write to the file, so there isn't much we can do. Retrying would probably fail too, if the brain-dead anti-virus has decided to lock down that file.