crash while rescan -- database is locked

Bug #870128 reported by Feanor
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Critical
Unassigned
1.10
Won't Fix
Critical
Unassigned
1.11
Fix Released
Critical
Steven Boswell
1.9
Won't Fix
Critical
Unassigned

Bug Description

archlinux
mixxx 1.9.0
64bit core2 duo

I was rescanning the music directory while playing a song with autoDj when mixxx crashed

...
Debug: [Main]: WARNING: Inconsistent state in TrackDAO. Track is clean while TrackDAO thinks it is dirty. Correcting.
Debug: [Main]: WARNING: Inconsistent state in TrackDAO. Track is clean while TrackDAO thinks it is dirty. Correcting.
Debug: [Main]: SidebarModel::clicked() index= QModelIndex(0,0,0x1b7f620,SidebarModel(0x1b7f620) )
Debug: [Main]: MixxxLibraryFeature::activate()
Debug: [Main]: WTrackTableView::loadTrackModel() LibraryTableModel(0x1b7a350)
Debug: [Main]: WLibrary::switchToView "WTrackTableView"
Debug: [Main]: WSearchLineEdit::restoreSearch( "" )
Debug: [Main]: SidebarModel::rightClicked() index= QModelIndex(0,0,0x1b7f620,SidebarModel(0x1b7f620) )
Debug: [Main]: MixxxLibraryFeature::activate()
Debug: [Main]: WTrackTableView::loadTrackModel() LibraryTableModel(0x1b7a350)
Debug: [Main]: WLibrary::switchToView "WTrackTableView"
Debug: [Main]: WSearchLineEdit::restoreSearch( "" )
Debug: [Main]: SidebarModel::clicked() index= QModelIndex(0,0,0x1b7f620,SidebarModel(0x1b7f620) )
Debug: [Main]: MixxxLibraryFeature::activate()
Debug: [Main]: WTrackTableView::loadTrackModel() LibraryTableModel(0x1b7a350)
Debug: [Main]: WLibrary::switchToView "WTrackTableView"
Debug: [Main]: WSearchLineEdit::restoreSearch( "" )
Debug: [Main]: SidebarModel::rightClicked() index= QModelIndex(0,0,0x1b7f620,SidebarModel(0x1b7f620) )
Debug: [Main]: MixxxLibraryFeature::activate()
Debug: [Main]: WTrackTableView::loadTrackModel() LibraryTableModel(0x1b7a350)
Debug: [Main]: WLibrary::switchToView "WTrackTableView"
Debug: [Main]: WSearchLineEdit::restoreSearch( "" )
Warning: [LibraryScanner 3]: QSqlDatabasePrivate::removeDatabase: connection 'LIBRARY_SCANNER' is still in use, all queries will cease to work.
Warning: [LibraryScanner 3]: QSqlDatabasePrivate::addDatabase: duplicate connection name 'LIBRARY_SCANNER', old connection removed.
Debug: [LibraryScanner 3]: LibraryHashDAO::initialize LibraryScanner(0x20fe470, name = "LibraryScanner 3") "LIBRARY_SCANNER"
Debug: [LibraryScanner 3]: CueDAO::initialize LibraryScanner(0x20fe470, name = "LibraryScanner 3") "LIBRARY_SCANNER"
Debug: [LibraryScanner 3]: TrackDAO::initialize LibraryScanner(0x20fe470, name = "LibraryScanner 3") "LIBRARY_SCANNER"
Debug: [LibraryScanner 3]: upgrade filename is "/home/michael/.mixxx/DBUPGRADED"
Debug: [LibraryScanner 3]: Legacy importer took 0 ms
Debug: [LibraryScanner 3]: Recursively scanning library.
Debug: [Main]: "getTrack(1389)" QSqlError(5, "Der Datensatz konnte nicht abgeholt werden", "database is locked")
[1] 2128 segmentation fault (core dumped) mixxx

description: updated
RJ Skerry-Ryan (rryan)
tags: added: critical
tags: added: crash
removed: critical
Changed in mixxx:
importance: Undecided → Critical
tags: added: analyze library-scanner
RJ Skerry-Ryan (rryan)
tags: added: scanner
removed: library-scanner
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hi Feanor,

Hopefully this is fixed in our new 1.9.2 release. If you could, please test our latest 1.9.2 pre-release binaries here:

http://builds.mixxx.org/builds/release-1.9.x/

Thanks for the report,
RJ Ryan

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Sorry, there are no packages for arch -- you may need to build from source. I think there is an AUR mixxx package which tracks our trunk so you could just try that.

Revision history for this message
Feanor (michael.pusterhofer) wrote :

I tested 1.10.0-beta1 and I managed to crash mixxx again

1. select Playlists view
2. rescan lib
3. select Library view

Debug: [Main]: Running Mixxx
Debug: [LibraryScanner 1]: LibraryHashDAO::initialize LibraryScanner(0x2a13060, name = "LibraryScanner 1") "LIBRARY_SCANNER"
Debug: [LibraryScanner 1]: CueDAO::initialize LibraryScanner(0x2a13060, name = "LibraryScanner 1") "LIBRARY_SCANNER"
Debug: [LibraryScanner 1]: TrackDAO::initialize LibraryScanner(0x2a13060, name = "LibraryScanner 1") "LIBRARY_SCANNER"
Debug: [LibraryScanner 1]: upgrade filename is "/home/michael/.mixxx/DBUPGRADED"
Debug: [LibraryScanner 1]: Legacy importer took 1 ms
Debug: [LibraryScanner 1]: Recursively scanning library.
Debug: [Main]: PlaylistTableModel(0x306a910) select() error: src/library/basesqltablemodel.cpp 186 "SELECT track_id,position FROM playlist_1 ORDER BY playlist_1.position ASC" QSqlError(5, "Der Datensatz konnte nicht abgeholt werden", "database is locked")
Fatal: [Main]: ASSERT: "record.indexOf(column) == m_tableColumnIndex[column]" in file src/library/basesqltablemodel.cpp, line 195

Revision history for this message
Feanor (michael.pusterhofer) wrote :

I tested trunk and I couldn't reproduce the exact same error described above, but I could crash it via the switching between views(Library Auto-DJ and Playlists)

1. Start rescanning
2. switch views
3. crash on AutoDJ view (not every time though)

Mixxx trunk "(bzr r2949; built on: Nov 4 2011 @ 21:12:14; flags: hifieq mad midiscript optimize qdebug shoutcast verbose vinylcontrol)

Debug: [Main]: Running Mixxx
Debug: [LibraryScanner 1]: LibraryHashDAO::initialize LibraryScanner(0x7fe1382233f0, name = "LibraryScanner 1") "LIBRARY_SCANNER"
Debug: [LibraryScanner 1]: CueDAO::initialize LibraryScanner(0x7fe1382233f0, name = "LibraryScanner 1") "LIBRARY_SCANNER"
Debug: [LibraryScanner 1]: TrackDAO::initialize LibraryScanner(0x7fe1382233f0, name = "LibraryScanner 1") "LIBRARY_SCANNER"
Debug: [LibraryScanner 1]: upgrade filename is "/home/michael/.mixxx/DBUPGRADED"
Debug: [LibraryScanner 1]: Legacy importer took 0 ms
Debug: [LibraryScanner 1]: Recursively scanning library.
Debug: [Main]: MixxxLibraryFeature::activate()
Debug: [Main]: LibraryTableModel(0x2b0ff40) select() took 5155 ms
Debug: [Main]: WSearchLineEdit::restoreSearch( "" )
Debug: [Main]: BaseTrackCache(0x2b0dea0) select() error: src/library/basetrackcache.cpp 369 "SELECT id FROM library_cache_view WHERE id in (850,851,852,853,854,849) " QSqlError(5, "Der Datensatz konnte nicht abgeholt werden", "database is locked")
Debug: [Main]: PlaylistTableModel(0x2dd6030) select() took 10736 ms
Debug: [Main]: PlaylistTableModel(0x2dd6030) select() error: src/library/basesqltablemodel.cpp 186 "SELECT track_id,position FROM playlist_1 ORDER BY playlist_1.position ASC" QSqlError(5, "Der Datensatz konnte nicht abgeholt werden", "database is locked")
Fatal: [Main]: ASSERT: "record.indexOf(column) == m_tableColumnIndex[column]" in file src/library/basesqltablemodel.cpp, line 195

Revision history for this message
Owen Williams (ywwg) wrote :

Would a fix for this just to be to lock down the interface during a scan? It would seem to me that making that dialog modal wouldn't be unexpected to the user.

RJ Skerry-Ryan (rryan)
summary: - crash while rescan
+ crash while rescan -- database is locked
tags: added: library sql
tags: added: sqlite
removed: sql
Revision history for this message
Steve Leonard (batman-xx) wrote :

I am able to replicate Feanor's results, with the error:

Fatal: [Main]: ASSERT: "record.indexOf(column) == m_tableColumnIndex[column]" in file src/library/basesqltablemodel.cpp, line 195

in v. 1.10.0

by clicking the rhythmbox tab, then clicking the Library tab while rhythmbox library claims to still be loading.

Revision history for this message
Max Linke (max-linke) wrote :

I can't reproduce the crash with rev.3398 anymore but running a library scan during auto-dj still poses a problem.

When the tracks are changing (click fade now several times) the queue is not updated instead the same song gets always loaded in each deck. This is related to https://bugs.launchpad.net/mixxx/+bug/1051106

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Added Steven's workaround that prevents the assertion failure. Instead the library will just show stale data.

Once we fix Bug #1051106, the stale data issue should go away.

Changed in mixxx:
status: New → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6011

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.