#160 MySQL and SVN.675

open
None
5
2010-07-07
2010-07-07
sinnerFA
No

I had built and configured fuppes to use MySQL and when it starts up initially it indexed all my files...
Now every time I start the service it craps out with the following error:

mysql: query error select * from OBJECTS where TYPE > 100 and (UPDATED_AT is NULL or UPDATED_AT < MODIFIED_AT) and DEVICE is NULL and REF_ID = 0
Unknown column 'MODIFIED_AT' in 'where clause'
fuppesd: database_mysql.cpp:411: virtual bool CMySQLQuery::select(std::string): Assertion `true == false' failed.

Discussion

  • sinnerFA
    sinnerFA
    2010-07-07

    I manually ran the SQL command and double checked the table structure and determined that the "MODIFIED_AT" field does not exist..

    This appears to be a MySql-specific "error"

     
  • sinnerFA
    sinnerFA
    2010-07-07

    • priority: 5 --> 2
     
  • sinnerFA
    sinnerFA
    2010-07-07

    • priority: 2 --> 1
     
  • sinnerFA
    sinnerFA
    2010-07-07

    Also found additional fields that were missing from the Object_Details Table:

    A_TRACK_NUMBER
    AV_ALBUM
    AV_ARTIST
    AV_GENRE
    DESCRIPTION
    AUDIO_CODEC
    VIDEO_CODEC
    STREAM_MIME_TYPE

    And on top of that once the DB stops receiving DB CRUD's it now gets a "Lost Connection during Query Error" heres the details:

    "update object 1 of 11322 :: Hump de Bump.mp3
    ObjectDetails::operator=(const AudioItem& audioItem)
    CLOSE_WRITE EVENT: /mnt/nas/Music/Red Hot Chili Peppers/Stadium Arcadium/Hump de Bump.mp3
    mysql: query error select * from OBJECTS where REF_ID = 0 and DEVICE is NULL and PATH = '/mnt/nas/Music/Red Hot Chili Peppers/Stadium Arcadium/' and FILE_NAME = 'Hump de Bump.mp3'
    Lost connection to MySQL server during query
    fuppesd: database_mysql.cpp:411: virtual bool CMySQLQuery::select(std::string): Assertion `true == false' failed.
    update object 1 of 11322 :: Hump de Bump.mp3"

    Seems like the connection is being closed prior to completion of query... Will investigate.

     
  • sinnerFA
    sinnerFA
    2010-07-07

    • priority: 1 --> 5
     
  • sinnerFA
    sinnerFA
    2010-07-07

    • assigned_to: nobody --> u-voelkel
     
  • sinnerFA
    sinnerFA
    2010-07-15

    I have noticed that during the initial scan everything is entered into the repository, but once it goes to the update sequence, which is run after the initial scan, it starts to drop entries on the Objects Table and then times out due to SQL error... If you start-up the service again, it removes the next song and terminates the service. So it points to an issue with the update sequence.

     
  • sinnerFA
    sinnerFA
    2010-07-15

    database_mysql_sql.h with updates to fix Table errors

     
    Attachments
  • sinnerFA
    sinnerFA
    2010-07-17

    It appears as though the order of issues spawn from the "start update thread", which is post virtual container creation on initial DB construction/loading..

    start update thread
    update object 1 of 4363 :: <FILE_NAME_1>
    UPDATE AUDIO FILE: <FILE_NAME_1>
    ObjectDetails::operator=(const AudioItem& audioItem)
    ...
    update object 2 of 4363 :: <FILE_NAME_2>
    UPDATE AUDIO FILE: <FILE_NAME_2>
    ObjectDetails::operator=(const AudioItem& audioItem)
    CLOSE_WRITE EVENT: <FILE_NAME_1>

    Next SQL Call dies with a "Lost connection to MySQL server during query"

    I check the fuppes MySql DB connections and for this DB it is disconnected....

     
  • sinnerFA
    sinnerFA
    2010-07-19

    Here is the bt via GDB:

    #0 0x00007ffff61d0a75 in raise () from /lib/libc.so.6
    #1 0x00007ffff61d45c0 in abort () from /lib/libc.so.6
    #2 0x00007ffff61c9941 in __assert_fail () from /lib/libc.so.6
    #3 0x00007ffff5b7ca41 in CMySQLQuery::select (this=<value optimized out>, sql=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at database_mysql.cpp:411
    #4 0x00007ffff6d0a56c in SQLQuery::select (this=0x7fffe4001320, sql=<value optimized out>)
    at lib/ContentDirectory/DatabaseConnection.cpp:55
    #5 0x00007ffff6d21559 in fuppes::DbObject::createFromFileName (fileName=<value optimized out>, qry=0x7fffe4001320,
    layout=<value optimized out>) at lib/ContentDirectory/DatabaseObject.cpp:94
    #6 0x00007ffff6d866da in FileAlterationHandler::modifyFile (this=<value optimized out>, event=<value optimized out>)
    at lib/ContentDirectory/FileAlterationHandler.cpp:270
    #7 0x00007ffff6d87a73 in FileAlterationHandler::famEvent (this=0x617580, event=0x7fffec897c20)
    at lib/ContentDirectory/FileAlterationHandler.cpp:105
    #8 0x00007ffff6d80e82 in CFileAlterationMonitor::famEvent (this=0x62a380, event=0x7fffec897c20)
    at lib/ContentDirectory/FileAlterationMonitor.cpp:49
    #9 0x00007ffff6d81609 in CInotifyMonitor::run (this=<value optimized out>) at lib/ContentDirectory/FileAlterationMonitor.cpp:404
    #10 0x00007ffff6d3eddb in fuppes::Thread::threadFunc (thread=0x626a) at lib/Common/Thread.cpp:233
    #11 0x00007ffff7bc59ca in start_thread () from /lib/libpthread.so.0
    #12 0x00007ffff62836fd in clone () from /lib/libc.so.6
    #13 0x0000000000000000 in ?? ()

     
  • sinnerFA
    sinnerFA
    2010-07-19

    Better BT and Thread Debugging from GDB

     
    Attachments