Bugzilla – Bug 803
ogg tracks cause the server to die with an SQL error
Last modified: 2011-03-16 04:39:12 UTC
Hi, I'm using SlimServer svn revision 1828 on Linux with a mysql backend. If I try to scan a .ogg file, the server dies with an SQL error. I traced the DBI layer with "DBI_TRACE=1 ./slimserver.pl --d_sql". If I remove the .ogg files from my music directory, the scan finishes successfully. Just in case that might be a problem with my database, I dropped all the tables and let slimserver recreate the whole database; the result is the same T <- prepare_cached('INSERT INTO contributor_track (track, namesort, role, contributor) VALUES (?, ?, ?, ?) ')= DBIx::ContextualFetch::st=HASH(0x9985970) at DBI.pm line 391 T <- FETCH('Taint')= 1 at ContextualFetch.pm line 49 <- STORE('Taint' 0)= 1 at ContextualFetch.pm line 50 <- execute('1200' 'SHANIA TWAIN' ...)= 1 at ContextualFetch.pm line 51 T <- STORE('Taint' 1)= 1 at ContextualFetch.pm line 52 T <- FETCH('mysql_insertid')= '780' at DBI.pm line 649 T <- prepare_cached('UPDATE tracks SET bitrate = ?, vbr_scale = ?, age = ?, ct = ?, size = ?, rate = ?, titlesort = ?, tag = ?, fs = ?, offset = ?, channels = ?, secs = ?, tracknum = ?, album = ?, title = ?, year = ? WHERE id=? ')= DBIx::ContextualFetch::st=HASH(0x9ba8bdc) at DBI.pm line 391 T <- FETCH('Taint')= 1 at ContextualFetch.pm line 49 <- STORE('Taint' 0)= 1 at ContextualFetch.pm line 50 !! ERROR: 1064 'You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use n ear ' age = 1038843474, ct = 'ogg', size = 1720013, rate = 44.1, tit' (err#0) <- execute(64001 '' ...)= undef at ContextualFetch.pm line 51 DBD::mysql::st execute failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right synt ax to use near ' age = 1038843474, ct = 'ogg', size = 1720013, rate = 44.1, tit at /home/slimserver/SlimServer_svn/slim/trunk/server/CPAN/DBIx/Contextu alFetch.pm line 51. Can't update file:///home/slimserver/Music/S-Z/Shania%20Twain/Come%20On%20Over/Shania%20Twain%20-%20Black%20Eyes,%20Blue%20Tears.ogg: DBD::mysql::st ex ecute failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' age = 1038843474, ct = 'ogg', size = 1720013, rate = 44.1, tit at /home/slimserver/SlimServer_svn/slim/trunk/server/CPAN/DBIx/ContextualFetch.pm line 5 1. at /home/slimserver/SlimServer_svn/slim/trunk/server/Slim/DataStores/DBI/DBIStore.pm line 364 <- disconnect_all= '' at DBI.pm line 673 <- disconnect_all= (not implemented) at DBI.pm line 673 ERROR: 1064 'You have an error in your SQL syntax. Check
flagging this appropriately as a database error and redirecting to Dan (cause he must be so bored by now ;)
Hakan - can you please attach one of the ogg files to this bug? Thanks.
Created attachment 262 [details] Shania Twain - Black Eyes, Blue Tears.ogg
Comment on attachment 262 [details] Shania Twain - Black Eyes, Blue Tears.ogg The track demonstrating the problem
I'm not able to reproduce this with either SQLite or MySQL 4.1.7 Is there any other relevant information you can give me? Thanks.
I'll try to run the server with just that one track in my Music directory later today. The SQL statement looks fine (and is surely executed many times before since the server managed to scan artists A* to R*), so all I could think of is that somehow the statements that werde executed just before cause the crash...
Hakan - I'm going to close this bug. Please reopen if you are still having this problem or are able to reproduce. Thanks.
Created attachment 276 [details] backtrace from slimserver
Created attachment 277 [details] mysqld sql statement trace
Created attachment 278 [details] Shaina Twain - Dance With the One That Brought You.ogg
I think I localized the problem a little bit better. I updated my server to svn 2234, dropped and recreated the database and ran mysqld with sql statement tracing. Note that in the mysqld statement that runs just before the slimserver daemon dies, "vbr_scale" seems to be empty. Regards, Hakan
Hakan - I just checked in a fix for this. Although I wasn't able to reproduce it, even with that track, I see what's wrong. If you can sync to the latest svn, the fix is in Slim/Formats/Ogg.pm
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006. I am setting them to targets of 6.2.1 to keep them from showing up in my queries.