Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash while rescan -- database is locked #6011

Closed
mixxxbot opened this issue Aug 22, 2022 · 9 comments
Closed

crash while rescan -- database is locked #6011

mixxxbot opened this issue Aug 22, 2022 · 9 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: michael.pusterhofer
Date: 2011-10-07T16:49:35Z
Status: Fix Released
Importance: Critical
Launchpad Issue: lp870128
Tags: analyze, crash, library, scanner, sqlite


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
@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2011-10-31T04:36:12Z


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

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2011-10-31T04:38:13Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: michael.pusterhofer
Date: 2011-11-04T19:55:56Z


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

@mixxxbot
Copy link
Collaborator Author

Commented by: michael.pusterhofer
Date: 2011-11-04T20:29:02Z


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

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2011-11-04T20:51:09Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: batman-xx
Date: 2011-12-26T14:09:14Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2012-09-18T21:21:02Z


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

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2013-04-12T15:53:32Z


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.

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant