Bug 803 - ogg tracks cause the server to die with an SQL error
: ogg tracks cause the server to die with an SQL error
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: unspecified
: PC Linux (other)
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-25 10:04 UTC by Hakan Tandogan
Modified: 2011-03-16 04:39 UTC (History)
0 users

See Also:
Category: ---


Attachments
Shania Twain - Black Eyes, Blue Tears.ogg (1.64 MB, application/octet-stream)
2005-01-30 10:34 UTC, Hakan Tandogan
Details
backtrace from slimserver (929 bytes, text/plain)
2005-02-26 02:30 UTC, Hakan Tandogan
Details
mysqld sql statement trace (460 bytes, text/plain)
2005-02-26 02:30 UTC, Hakan Tandogan
Details
Shaina Twain - Dance With the One That Brought You.ogg (1.06 MB, application/octet-stream)
2005-02-26 02:33 UTC, Hakan Tandogan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hakan Tandogan 2005-01-25 10:04:55 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
Comment 1 KDF 2005-01-25 13:03:56 UTC
flagging this appropriately as a database error and redirecting to Dan (cause he
must be so bored by now ;)
Comment 2 Dan Sully 2005-01-28 17:11:27 UTC
Hakan - can you please attach one of the ogg files to this bug?

Thanks.
Comment 3 Hakan Tandogan 2005-01-30 10:34:45 UTC
Created attachment 262 [details]
Shania Twain - Black Eyes, Blue Tears.ogg
Comment 4 Hakan Tandogan 2005-01-30 10:37:59 UTC
Comment on attachment 262 [details]
Shania Twain - Black Eyes, Blue Tears.ogg

The track demonstrating the problem
Comment 5 Dan Sully 2005-01-30 10:52:01 UTC
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.
Comment 6 Hakan Tandogan 2005-01-30 11:36:19 UTC
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...
Comment 7 Dan Sully 2005-02-25 16:42:57 UTC
Hakan - I'm going to close this bug. Please reopen if you are still having this
problem or are able to reproduce.

Thanks.
Comment 8 Hakan Tandogan 2005-02-26 02:30:02 UTC
Created attachment 276 [details]
backtrace from slimserver
Comment 9 Hakan Tandogan 2005-02-26 02:30:27 UTC
Created attachment 277 [details]
mysqld sql statement trace
Comment 10 Hakan Tandogan 2005-02-26 02:33:17 UTC
Created attachment 278 [details]
Shaina Twain - Dance With the One That Brought You.ogg
Comment 11 Hakan Tandogan 2005-02-26 02:37:18 UTC
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
Comment 12 Dan Sully 2005-02-26 10:53:30 UTC
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
Comment 13 Chris Owens 2006-06-16 14:40:52 UTC
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.