Summary: | Amarok crashes when doing full collection scan with local mysql server (amarok git) | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Jussi Kekkonen <jussi.kekkonen> |
Component: | Collections/Local | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | andresbajotierra, aronasorman, bugs.kde.org3, david, dimsuz, florian, johannes, mitchell, mkyral, mtscetin, rdieter, s.zelman, seajey.serg, stefan.ubuntu, stuffcorpse, ub1x, w4t3rkill |
Priority: | VHI | ||
Version: | 2.3-GIT | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.3.0 | |
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
DrKonqi output and --debug output Full logs for all three cases Patch against 2.2.2 tag |
Description
Jussi Kekkonen
2009-12-29 15:13:41 UTC
This could be related to the glibc bug : bug 196207. Check this: - Quit Amarok - Start Konsole - Type "export QT_NO_GLIB=1" + Enter - Type "export MALLOC_CHECK_=" + Enter - Type "amarok" + Enter - Use Amarok and check if it crashes or not If it doesn't crash, then it is likely to be bug 196207. Nope, that doesn't help it, still crashes pretty similarly. Unfortunately it's a pretty unhelpful backtrace in that I don't see the signal handler being called anywhere. A couple things I *do* notice: - It doesn't seem to be crashing during the scan -- it seems to be crashing just after, when some other part of Amarok is being updated. So it might be a crash in e.g. the collection browser. - Those errors in your debug output are odd, because they're simply when copying over information from a temp table to a non-temp table. There should be absolutely no discrepancy between the columns. Has the scanning *ever* worked for you with the local server? My guess is that there is some sort of permissions problem or some such thing such that the DB is not actually usable, and somewhere down the line it's causing a crash. Created attachment 39494 [details]
New crash information added by DrKonqi
Looks like I just got the same backtrace.
Though I can't say what was in the console output.
And also this happened during incremental scan. What happenned:
1. Amarok was running (playing random playlist)
2. At the same time I was splitting one of my flac files into a smaller flacs using cue file and cuebreakpoints+shnsplit tools (in konsole)
3. As a result new flac files were constantly appearing inside my ~/Music directory
4. I think that amarok noticed that and started updating its database
5. It crashed (this crash I am reporting now)
6. I restarted amarok and it crashed again with the similar backtrace
Amarok is compiled from sources on 31 Dec 2009, git commit 25a1924e3f896c6fd8fa55d54ad9c2448240e43f
(In reply to comment #3) > Unfortunately it's a pretty unhelpful backtrace in that I don't see the signal > handler being called anywhere. By the way, speaking of previous reported backtrace seems like Jeff is mistaken: the signal handler is present there indeed: Thread 10 (Thread 0xaabffb90 (LWP 13416)): [KCrash Handler] #6 0xb7fed430 in __kernel_vsyscall () #7 0xb64068a0 in raise () from /lib/tls/i686/cmov/libc.so.6 #8 0xb6408268 in abort () from /lib/tls/i686/cmov/libc.so.6 #9 0xb644a483 in ?? () from /lib/tls/i686/cmov/libc.so.6 #10 0xb644c455 in free () from /lib/tls/i686/cmov/libc.so.6 #11 0xb66010b1 in operator delete () from /usr/lib/libstdc++.so.6 #12 0xacdffb36 in ~ScanResultProcessor (this=0xaabfec14) at <snipped> I have the same stack in my report. (In reply to comment #5) > (In reply to comment #3) > > Unfortunately it's a pretty unhelpful backtrace in that I don't see the signal > > handler being called anywhere. > By the way, speaking of previous reported backtrace seems like Jeff is > mistaken: the signal handler is present there indeed: > > Thread 10 (Thread 0xaabffb90 (LWP 13416)): > [KCrash Handler] Yes, someone pointed this out to me. I was looking for a line like [Signal handler called] -- I didn't realize KCrash was replacing it. Hi, I got the same crash (the same backtrace). Gentoo Qt: 4.6.0 KDE Development Platform: 4.3.85 (KDE 4.3.85 (KDE 4.4 Beta2)) kde4-config: 1.0 I'm not sure whether this is possible as m_urlsHashByUid is defined as QHash foreach( QStringList *list, m_urlsHashByUid ) delete list; But even I commented it out, I got crash later: Thread 4 (Thread 0x7fad57e19710 (LWP 19016)): [KCrash Handler] #5 QBasicAtomicInt::ref (this=0xa00000001) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121 #6 0x00007fad63ea6f91 in QList<QString>::operator= (this=0x7fad57e17940, l=...) at /usr/include/qt4/QtCore/qlist.h:411 #7 0x00007fad63ea6fd9 in QStringList::operator= (this=0xa00000001) at /usr/include/qt4/QtCore/qstringlist.h:67 #8 0x00007fad63eb6a04 in ScanResultProcessor::urlId (this=0x7fad57e18280, url=..., uid=...) at /var/portage/distfiles/git-src/amarok/src/collection/sqlcollection/ScanResultProcessor.cpp:671 #9 0x00007fad63eb7691 in ScanResultProcessor::addTrack (this=0x7fad57e18280, trackData=..., albumArtistId=661) at /var/portage/distfiles/git-src/amarok/src/collection/sqlcollection/ScanResultProcessor.cpp:413 #10 0x00007fad63eb8a19 in ScanResultProcessor::processDirectory (this=0x7fad57e18280, data=...) at /var/portage/distfiles/git-src/amarok/src/collection/sqlcollection/ScanResultProcessor.cpp:274 #11 0x00007fad63eaa44f in XmlParseJob::run (this=0x2f18cf0) at /var/portage/distfiles/git-src/amarok/src/collection/sqlcollection/ScanManager.cpp:776 #12 0x00007fad78ecf0fc in ?? () from /usr/lib64/libthreadweaver.so.4 #13 0x00007fad78ecf421 in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4 #14 0x00007fad78ece39f in ?? () from /usr/lib64/libthreadweaver.so.4 #15 0x00007fad78ece829 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4 #16 0x00007fad7d2e9295 in ?? () from /usr/lib64/qt4/libQtCore.so.4 #17 0x00007fad79869547 in start_thread () from /lib/libpthread.so.0 #18 0x00007fad7bf44abd in clone () from /lib/libc.so.6 #19 0x0000000000000000 in ?? () I got the crash also when I cancel collection scanning or I exit Amarok during the scanning. Does anyone know of a specific way to reproduce this? It's very hard for me to make sense of what could be going on here because I have no idea how to trigger the crash. I just do a full scan. It is probably related to some files in collection. When I selected a directory with only several files, all were scanned and shown in collection. But after a while, Amarok crashed on different error in CoverFetcher. *** Bug 221106 has been marked as a duplicate of this bug. *** bt from bug 221106 [KCrash Handler] #5 0x00007fe49be0705d in ?? () from /lib/libc.so.6 #6 0x00007fe49be086a8 in ?? () from /lib/libc.so.6 #7 0x00007fe49be0b9bc in free () from /lib/libc.so.6 #8 0x00007fe49d399985 in QHashData::free_helper(void (*)(QHashData::Node*)) () from /usr/lib/libQtCore.so.4 #9 0x00007fe481e7113b in QHash<int, QStringList*>::freeData (this=0x7fe473666588, x=0x295cca0) at /usr/include/qt4/QtCore/qhash.h:567 #10 0x00007fe481e6dc52 in ~QHash (this=0x7fe473666588) at /usr/include/qt4/QtCore/qhash.h:284 #11 0x00007fe481e6086e in ~ScanResultProcessor (this=0x7fe4736664d0) at /opt/amarok/src/collection/sqlcollection/ScanResultProcessor.cpp:51 #12 0x00007fe481e5cf57 in XmlParseJob::run (this=0x2940b00) at /opt/amarok/src/collection/sqlcollection/ScanManager.cpp:855 #13 0x00007fe49a06e67d in ?? () from /usr/lib/libthreadweaver.so.4 #14 0x00007fe49a06e97e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4 #15 0x00007fe49a06d9ef in ?? () from /usr/lib/libthreadweaver.so.4 #16 0x00007fe49a06df88 in ThreadWeaver::Thread::run() () from /usr/lib/libthreadweaver.so.4 #17 0x00007fe49d37def5 in ?? () from /usr/lib/libQtCore.so.4 #18 0x00007fe4970b373a in start_thread () from /lib/libpthread.so.0 #19 0x00007fe49be6169d in clone () from /lib/libc.so.6 #20 0x0000000000000000 in ?? () The backtraces do indicate a dupe of https://bugs.kde.org/show_bug.cgi?id=196207 since they point to free(). Everyone CCed with this bug, please report: 1) Your Qt version 2) Your KDE version I have a feeling that this is related to one or the other, most likely Qt 4.6. *** Bug 220422 has been marked as a duplicate of this bug. *** Application: amarok (2.2-GIT) KDE Platform Version: 4.3.85 (KDE 4.3.85 (KDE 4.4 Beta2)) Qt Version: 4.6.0 Operating System: Linux 2.6.31-17-generic i686 Distribution: Ubuntu 9.10 *** Bug 221225 has been marked as a duplicate of this bug. *** from bug 221225 Application that crashed: amarok Version of the application: 2.2-GIT KDE Version: 4.3.4 (KDE 4.3.4) Qt Version: 4.5.2 Operating System: Linux 2.6.31-17-generic x86_64 Distribution: Ubuntu 9.10 So it seems it's not kde 4.4 or qt 4.6 related. Does https://bugs.kde.org/show_bug.cgi?id=220532#c1 fix the problem for anyone? (In reply to comment #18) > Does https://bugs.kde.org/show_bug.cgi?id=220532#c1 fix the problem for anyone? I tested, but did not help in my case. Another question: does everyone with this problem get the same issue in their debug output: amarok: [ERROR!] GREPME MySQL query failed! Column count doesn't match value count at row 1 on "INSERT INTO images SELECT * FROM images_temp;" amarok: [ERROR!] GREPME MySQL query failed! Column count doesn't match value count at row 1 on "INSERT INTO directories SELECT * FROM directories_temp;" Got a tip from Myriam: Please ensure that you have updated to libc6 2.10.1-0ubuntu16 which provides glibc-2.10-1. Apparently these are now in backports as of this morning or so, and may fix this bug (makes some sense as so far everyone seems to be a *buntu user). (In reply to comment #20) > Another question: does everyone with this problem get the same issue in their > debug output: > > amarok: [ERROR!] GREPME MySQL query failed! Column count doesn't match > value count at row 1 on "INSERT INTO images SELECT * FROM images_temp;" > amarok: [ERROR!] GREPME MySQL query failed! Column count doesn't match > value count at row 1 on "INSERT INTO directories SELECT * FROM > directories_temp;" Yes, it is there. amarok: BEGIN: void DaapCollectionFactory::connectToManualServers() amarok: END__: void DaapCollectionFactory::connectToManualServers() - Took 6.9e-05s amarok: [MountPointManager] [WARNING!] NOT-IMPLEMENTED: void MountPointManager::startStatisticsUpdateJob() amarok: BEGIN: void CurrentEngine::stoppedState() amarok: END__: void CurrentEngine::stoppedState() - Took 0.00041s amarok: Initialized thread, count== 2 amarok: [ERROR!] "GREPME MySQL-server query failed! No database selected on SELECT urls.deviceid, urls.rpath, urls.uniqueid, tracks.id, tracks.title, tracks.comment, tracks.tracknumber, tracks.discnumber, statistics.score, statistics.rating, tracks.bitrate, tracks.length, tracks.filesize, tracks.samplerate, statistics.createdate, statistics.accessdate, statistics.playcount, tracks.filetype, tracks.bpm, tracks.createdate, tracks.albumgain, tracks.albumpeakgain, tracks.trackgain, tracks.trackpeakgain, artists.name, artists.id, albums.name, albums.id, albums.artist, genres.name, genres.id, composers.name, composers.id, years.name, years.id FROM tracks INNER JOIN urls ON tracks.url = urls.id LEFT JOIN artists ON tracks.artist = artists.id LEFT JOIN albums ON tracks.album = albums.id LEFT JOIN genres ON tracks.genre = genres.id LEFT JOIN composers ON tracks.composer = composers.id LEFT JOIN years ON tracks.year = years.id LEFT JOIN statistics ON urls.id = statistics.url WHERE 1 AND ( 1 AND NOT tracks.title = '' ) ORDER BY statistics.accessdate DESC LIMIT 5 OFFSET 0 ;" amarok(31719)/kio (KDirListerCache) KDirListerCache::listDir: Entry currently being listed: KUrl("trash:/") by (KDirLister(0x15c1200) ) amarok(31719)/kio (Slave) KIO::Slave::createSlave: createSlave "trash" for KUrl("trash:/") amarok(31719)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on "local:/tmp/ksocket-marian/amarokn31719.slave-socket" amarok(31719)/kio (Slave) KIO::Slave::createSlave: createSlave "file" for KUrl("file:///home/data/mp3/new/Tomas-Kocko-a-Orchestr_-_Do-tanca") amarok(31719)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on "local:/tmp/ksocket-marian/amarokm31719.slave-socket" amarok: Initialized thread, count== 3 amarok: [ERROR!] "GREPME MySQL-server query failed! No database selected on SELECT DISTINCT albums.name, albums.id, albums.artist FROM albums WHERE 1 AND albums.artist IS NULL ;" amarok: [ERROR!] "GREPME MySQL-server query failed! No database selected on SELECT DISTINCT artists.name, artists.id FROM artists INNER JOIN tracks ON tracks.artist = artists.id LEFT JOIN albums ON tracks.album = albums.id WHERE 1 AND albums.artist IS NOT NULL ;" My glibc6 version on gentoo is 2.11-r1. I tested it on different computer. I switched to external mysql database and there was no amarokdb database. So I created it and now are in log these errors: amarok: BEGIN: void DatabaseUpdater::checkTables(bool) amarok: [ERROR!] Tried to query an uninitialized m_db! amarok: END__: void DatabaseUpdater::checkTables(bool) - Took 0.00016s amarok: END__: void ScanManager::checkTables(bool) - Took 0.00039s amarok: BEGIN: void ScanManager::cleanTables() amarok: [ERROR!] Tried to query an uninitialized m_db! amarok: [ERROR!] Tried to query an uninitialized m_db! amarok: [ERROR!] Tried to query an uninitialized m_db! amarok: [ERROR!] Tried to query an uninitialized m_db! amarok: [ERROR!] Tried to query an uninitialized m_db! amarok: [ERROR!] Tried to query an uninitialized m_db! Please see comment #21... (In reply to comment #24) > Please see comment #21... See comment 22 below ;-) > My glibc6 version on gentoo is 2.11-r1. (In reply to comment #25) > > > My glibc6 version on gentoo is 2.11-r1. Then it's not an Ubuntu specific problem, and definitely not the glibc bug either, since 2.11-r1 in gentoo contains the patch. Does the crash only happens with a full rescan or incremental too? And could someone test with an older version like 2.2.1? Just to check if it's a regression in amarok. (In reply to comment #26) > Does the crash only happens with a full rescan or incremental too? Incremental scan looks OK. At least did not fail until I forced full scan. > And could someone test with an older version like 2.2.1? Just to check if it's > a regression in amarok. I compiled 2.2.1. Several full scans without problem. In collected about 5600 tracks. Then I compiled last git version. After start a incremental scan finished without problem, collection contained 7300 tracks. Full scan failed. But it looks like different error: Thread 6 (Thread 0x7f7c21629710 (LWP 19272)): [KCrash Handler] #5 QBasicAtomicInt::ref (this=0x7f7c21627f70, url=..., uid=...) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121 #6 QList<QString>::operator= (this=0x7f7c21627f70, url=..., uid=...) at /usr/include/qt4/QtCore/qlist.h:411 #7 operator= (this=0x7f7c21627f70, url=..., uid=...) at /usr/include/qt4/QtCore/qstringlist.h:67 #8 ScanResultProcessor::urlId (this=0x7f7c21627f70, url=..., uid=...) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/ScanResultProcessor.cpp:664 #9 0x00007f7c26b60ac4 in ScanResultProcessor::addTrack (this=0x7f7c21627f70, trackData=..., albumArtistId=<value optimized out>) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/ScanResultProcessor.cpp:413 #10 0x00007f7c26b6b98f in ScanResultProcessor::processDirectory (this=0x7f7c21627f70, data=<value optimized out>) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/ScanResultProcessor.cpp:274 #11 0x00007f7c26b556fa in XmlParseJob::run (this=0x1560080) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/ScanManager.cpp:776 #12 0x00000039b380e001 in ThreadWeaver::JobRunHelper::runTheJob (this=<value optimized out>, th=<value optimized out>, job=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Job.cpp:106 #13 0x00000039b380e1d9 in ThreadWeaver::Job::execute (this=<value optimized out>, th=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Job.cpp:135 #14 0x00000039b380d64f in ThreadWeaver::ThreadRunHelper::run (this=<value optimized out>, parent=<value optimized out>, th=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Thread.cpp:95 #15 0x00000039b380d794 in ThreadWeaver::Thread::run (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Thread.cpp:142 #16 0x00000039adc791d5 in QThreadPrivate::start (arg=<value optimized out>) at thread/qthread_unix.cpp:244 #17 0x000000311d006894 in start_thread () from /lib/libpthread.so.0 #18 0x000000311c4d0f9d in clone () from /lib/libc.so.6 #19 0x0000000000000000 in ?? () Last messages from log: amarok: END__: virtual bool PlaylistFileProvider::import(const KUrl&) - Took 9.4e-05s amarok: END__: bool PlaylistManager::import(const QString&) - Took 0.00024s amarok: BEGIN: bool PlaylistManager::import(const QString&) amarok: BEGIN: virtual bool PlaylistFileProvider::import(const KUrl&) amarok: Playlist "/home/data/mp3/Q/queen/Queen/QUEEN04/PLAYLIST.M3U" was already imported amarok: END__: virtual bool PlaylistFileProvider::import(const KUrl&) - Took 0.00014s amarok: END__: bool PlaylistManager::import(const QString&) - Took 0.00027s QSocketNotifier: Invalid socket 6 and type 'Read', disabling... amarok: Fatal IO error: client killed kio_http(19290)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(19290)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(19301)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(19302)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(19303)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(19293)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(19305)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(19292)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(19291)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: (In reply to comment #27) > > I compiled 2.2.1. Several full scans without problem. In collected about 5600 > tracks. Then I compiled last git version. After start a incremental scan > finished without problem, collection contained 7300 tracks. Full scan failed. > If you have some time to spend you could do a git bisect between 2.2.1 and master :) I don't suppose anyone is willing to git bisect this. I don't see what could be wrong in the code, and I have no idea how to reproduce it. Mikko: jinx! By the by: if someone does git bisect this, please be sure to look for *just this crash* as there may be collection wonkiness from various changes. So if you run into a problem, be sure to vet it to make sure it's actually this one. (In reply to comment #28) > (In reply to comment #27) > > > > I compiled 2.2.1. Several full scans without problem. In collected about 5600 > > tracks. Then I compiled last git version. After start a incremental scan > > finished without problem, collection contained 7300 tracks. Full scan failed. > > > > If you have some time to spend you could do a git bisect between 2.2.1 and > master :) Will try evening. In meantime I deleted the database and start with new one. Now I got original bt. Last messages in log. amarok: BEGIN: virtual bool PlaylistFileProvider::import(const KUrl&) amarok: Playlist "/home/data/mp3/R/Roxette/The_RoxBox-4CD-2006/400-roxette-the-roxbox-2006.m3u" was already imported amarok: END__: virtual bool PlaylistFileProvider::import(const KUrl&) - Took 9.4e-05s amarok: END__: bool PlaylistManager::import(const QString&) - Took 0.00017s amarok: Success. Committing result to database. amarok: BEGIN: void ScanManager::slotFinished() amarok: END__: void ScanManager::slotFinished() - Took 0.0001s amarok: BEGIN: void DatabaseUpdater::cleanPermanentTables() amarok: END__: void DatabaseUpdater::cleanPermanentTables() - Took 0.00095s amarok: BEGIN: void ScanResultProcessor::copyHashesToTempTables() amarok: obtained max_allowed_packet is "1048576" amarok: urls key size is 7105 amarok: tracks key size is 7106 amarok: END__: void ScanResultProcessor::copyHashesToTempTables() - Took 1s amarok: temp_tracks: ("7106") amarok: tracks before commit: ("0") amarok: BEGIN: void DatabaseUpdater::copyToPermanentTables() amarok: END__: void DatabaseUpdater::copyToPermanentTables() - Took 0.55s amarok: BEGIN: virtual void Dynamic::BiasedPlaylist::invalidate() amarok: END__: virtual void Dynamic::BiasedPlaylist::invalidate() - Took 7.2e-05s amarok: tracks after commit: ("7106") amarok: BEGIN: void DatabaseUpdater::removeTemporaryTables() amarok: END__: void DatabaseUpdater::removeTemporaryTables() - Took 0.039s amarok: Sending changed signal amarok: BEGIN: CollectionTreeItem::CollectionTreeItem(const Meta::DataList&, CollectionTreeItem*, CollectionTreeItemModelBase*) amarok: END__: CollectionTreeItem::CollectionTreeItem(const Meta::DataList&, CollectionTreeItem*, CollectionTreeItemModelBase*) - Took 0.00016s amarok: BEGIN: virtual void Dynamic::BiasedPlaylist::invalidate() amarok: END__: virtual void Dynamic::BiasedPlaylist::invalidate() - Took 7.9e-05s kio_http(21566)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21553)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21554)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21553)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21555)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21554)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21555)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21570)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21556)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21564)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21570)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21556)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21565)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21564)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: kio_http(21565)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = amarok path = <unknown> pid = 21510 Tagging of 2.2.2., which was supposed to happen today, has been delayed 24h to investigate this bug more. If anyone of you has a few spare minutes please help bisecting it and/or ping jefferai in #amarok on freenode. Thanks :) Please do the following. If you can replicate this crash with a totally clean database (wipe), then it will actually help a lot in trying to figure this out, as I can rule out certain code paths. Start amarok --debug. Let Amarok load up, then close it. Now, wipe the DB. Then do amarok --debug again, and this time capture the *full* output. (Either clear your scrollback, then copy and paste to a file, or try --nofork and start with something like "amarok --debug --nofork 2>&1 1>amarokoutput.txt"). Please also get me the backtrace associated with that particular run -- attach each as a file to this bug report. We've delayed tagging by 24 hours to try to get this solved, so the faster the turnaround time that someone can provide, and the more of you that can work with me on this, the better. Also, as Lydia said, try to find me at #amarok as jefferai if you can do some real-time debugging with me. Created attachment 39594 [details]
DrKonqi output and --debug output
I have now added the DrKonqi output and the command line output. The break is at line 243 for those two outputs.
(In reply to comment #34) > Please do the following. If you can replicate this crash with a totally clean > database (wipe), then it will actually help a lot in trying to figure this out, > as I can rule out certain code paths. > > Start amarok --debug. Let Amarok load up, then close it. Now, wipe the DB. Then > do amarok --debug again, and this time capture the *full* output. (Either clear > your scrollback, then copy and paste to a file, or try --nofork and start with > something like "amarok --debug --nofork 2>&1 1>amarokoutput.txt"). Please also > get me the backtrace associated with that particular run -- attach each as a > file to this bug report. > I did it, but it failed on different error in /usr/lib64/libmysqlclient.so.16. Unfortunately I had not mysql compiled with debug infos, so bt contains ?? :-( I just compiling mysql with debug infos, will try again. After next start, amarok shows 7185 tracks in collection. I really don't know what to think about :-( Seems like I'm not able to reproduce the crash with blank database now :-( With wipe database, amarok crashes at 98% with bt below. It doesn't mater whether I use embedded or standalone mysql. I tested with 5.1.40 and 5.1.42. ***************************************************************************** Thread 1 (Thread 0x7f04fcca37a0 (LWP 18340)): [KCrash Handler] #5 malloc_consolidate (av=0x7f04fbfdee60) at malloc.c:5136 #6 0x00007f04fbcfdd68 in _int_free (av=0x7f04fbfdee60, p=0x2395e20) at malloc.c:5015 #7 0x00007f04fbd011ac in *__GI___libc_free (mem=<value optimized out>) at malloc.c:3738 #8 0x00007f04f1b9bc41 in free_root () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #9 0x00007f04f1c0eba0 in free_tmp_table(THD*, st_table*) () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #10 0x00007f04f1c169dc in JOIN::destroy() () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #11 0x00007f04f1c52ad2 in st_select_lex::cleanup() () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #12 0x00007f04f1c26268 in mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #13 0x00007f04f1c2b87c in handle_select(THD*, st_lex*, select_result*, unsigned long) () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #14 0x00007f04f1bf75c1 in execute_sqlcom_select(THD*, TABLE_LIST*) () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #15 0x00007f04f1bf8cd9 in mysql_execute_command(THD*) () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #16 0x00007f04f1bfcc7d in mysql_parse(THD*, char const*, unsigned int, char const**) () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #17 0x00007f04f1bfe8dd in dispatch_command(enum_server_command, THD*, char*, unsigned int) () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #18 0x00007f04f1b81849 in emb_advanced_command () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #19 0x00007f04f1b4bab1 in mysql_send_query () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #20 0x00007f04f1b4bb19 in mysql_real_query () from /usr/lib64/kde4/amarok_collection-mysqlecollection.so #21 0x00007f04f1b3cb68 in MySqlCollection::query (this=0xfcde00, statement=...) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/mysql-shared/MySqlCollection.cpp:121 #22 0x00007f04f1b1c90a in SqlQueryMakerInternal::run (this=0x7f04d4723800) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/SqlQueryMakerInternal.cpp:46 #23 0x00007f04f1b18bfc in SqlQueryMaker::run (this=0x1a9c930) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/SqlQueryMaker.cpp:229 #24 0x00007f04f1b279a2 in Meta::SqlAlbum::tracks (this=0x7f04dc4ff910) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/SqlMeta.cpp:1349 #25 0x00007f04fc16f98a in CollectionSortFilterProxyModel::albumYear (this=<value optimized out>, album=) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/browsers/CollectionSortFilterProxyModel.cpp:148 #26 0x00007f04fc171801 in CollectionSortFilterProxyModel::lessThanAlbum (this=0x1454bb0, left=..., right=...) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/browsers/CollectionSortFilterProxyModel.cpp:118 #27 0x00007f04fc171c1e in CollectionSortFilterProxyModel::lessThan (this=0x1454bb0, left=..., right=...) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/browsers/CollectionSortFilterProxyModel.cpp:63 #28 0x00000039af4d9bba in void QAlgorithmsPrivate::qMerge<int*, int const, QSortFilterProxyModelLessThan>(int*, int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #29 0x00000039af4d9d32 in void QAlgorithmsPrivate::qStableSortHelper<int*, int, QSortFilterProxyModelLessThan>(int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #30 0x00000039af4d9c72 in void QAlgorithmsPrivate::qStableSortHelper<int*, int, QSortFilterProxyModelLessThan>(int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #31 0x00000039af4d9cd2 in void QAlgorithmsPrivate::qStableSortHelper<int*, int, QSortFilterProxyModelLessThan>(int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #32 0x00000039af4d9c72 in void QAlgorithmsPrivate::qStableSortHelper<int*, int, QSortFilterProxyModelLessThan>(int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #33 0x00000039af4d10af in qStableSort<int*, QSortFilterProxyModelLessThan> (this=<value optimized out>, source_rows=<value optimized out>, source_parent=<value optimized out>) at ../../include/QtCore/../../src/corelib/tools/qalgorithms.h:212 #34 QSortFilterProxyModelPrivate::sort_source_rows (this=<value optimized out>, source_rows=<value optimized out>, source_parent=<value optimized out>) at itemviews/qsortfilterproxymodel.cpp:427 #35 0x00000039af4d1653 in QSortFilterProxyModelPrivate::create_mapping (this=<value optimized out>, source_parent=<value optimized out>) at itemviews/qsortfilterproxymodel.cpp:300 #36 0x00000039af4d2168 in QSortFilterProxyModel::rowCount (this=<value optimized out>, parent=<value optimized out>) at itemviews/qsortfilterproxymodel.cpp:1600 #37 0x00007f04fc185cd3 in CollectionTreeView::slotCheckAutoExpand (this=0x143b450) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/browsers/CollectionTreeView.cpp:641 #38 0x00007f04fc190ce8 in CollectionTreeView::qt_metacall (this=0x143b450, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff67571230) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999_build/src/CollectionTreeView.moc:116 #39 0x00000039add7df33 in QMetaObject::activate (sender=<value optimized out>, m=<value optimized out>, local_signal_index=<value optimized out>, argv=<value optimized out>) at kernel/qobject.cpp:3286 #40 0x00007f04fc17c153 in CollectionTreeItemModelBase::queryDone (this=0x1432560) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/browsers/CollectionTreeItemModelBase.cpp:680 #41 0x00007f04fc17ca9d in CollectionTreeItemModelBase::qt_metacall (this=0x1432560, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x21c5f00) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999_build/src/CollectionTreeItemModelBase.moc:92 #42 0x00007f04fc1750c0 in CollectionTreeItemModel::qt_metacall (this=0x7f04fbfdee60, _c=QMetaObject::InvokeMetaMethod, _id=24666032, _a=0x21) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999_build/src/CollectionTreeItemModel.moc:73 #43 0x00000039add7aeb9 in QObject::event (this=<value optimized out>, e=<value optimized out>) at kernel/qobject.cpp:1252 #44 0x00000039aefb929c in QApplicationPrivate::notify_helper (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:4242 #45 0x00000039aefc1ada in QApplication::notify (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:4125 #46 0x00007f04fc55660a in App::notify (this=0x7f04fbfdee60, receiver=0x0, event=0x1785fb0) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/App.cpp:845 #47 0x00000039add6b2eb in QCoreApplication::notifyInternal (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at kernel/qcoreapplication.cpp:704 #48 0x00000039add6da36 in QCoreApplication::sendEvent (receiver=<value optimized out>, event_type=<value optimized out>, data=<value optimized out>) at kernel/qcoreapplication.h:215 #49 QCoreApplicationPrivate::sendPostedEvents (receiver=<value optimized out>, event_type=<value optimized out>, data=<value optimized out>) at kernel/qcoreapplication.cpp:1345 #50 0x00000039add94bf3 in QCoreApplication::sendPostedEvents (s=<value optimized out>) at kernel/qcoreapplication.h:220 #51 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:276 #52 0x00000030a323b4cd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #53 0x00000030a323ee88 in ?? () from /usr/lib/libglib-2.0.so.0 #54 0x00000030a323efb0 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #55 0x00000039add94733 in QEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:407 #56 0x00000039af05555e in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202 #57 0x00000039add69c42 in QEventLoop::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:149 #58 0x00000039add6a014 in QEventLoop::exec (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:201 #59 0x00000039add6dcfb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981 #60 0x000000000040876c in main (argc=2, argv=<value optimized out>) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/main.cpp:235 ***************************************************************************** After restart, Amarok correctly shows collection scanned in previous run. Start incremental scan and works correctly. When I now run full scan with data in database, I get BT below. Scan did not finish, Amarok crashes on 77%. And continue crashing in each start. ***************************************************************************** Thread 8 (Thread 0x7f702e2e3710 (LWP 17241)): [KCrash Handler] #5 QBasicAtomicInt::ref (this=0x7f702e2e1f70, url=..., uid=...) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121 #6 QList<QString>::operator= (this=0x7f702e2e1f70, url=..., uid=...) at /usr/include/qt4/QtCore/qlist.h:411 #7 operator= (this=0x7f702e2e1f70, url=..., uid=...) at /usr/include/qt4/QtCore/qstringlist.h:67 #8 ScanResultProcessor::urlId (this=0x7f702e2e1f70, url=..., uid=...) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/ScanResultProcessor.cpp:673 #9 0x00007f70382cbac4 in ScanResultProcessor::addTrack (this=0x7f702e2e1f70, trackData=..., albumArtistId=<value optimized out>) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/ScanResultProcessor.cpp:413 #10 0x00007f70382d698f in ScanResultProcessor::processDirectory (this=0x7f702e2e1f70, data=<value optimized out>) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/ScanResultProcessor.cpp:274 #11 0x00007f70382c06fa in XmlParseJob::run (this=0x7f703478c8b0) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/collection/sqlcollection/ScanManager.cpp:776 #12 0x00000039b380e001 in ThreadWeaver::JobRunHelper::runTheJob (this=<value optimized out>, th=<value optimized out>, job=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Job.cpp:106 #13 0x00000039b380e1d9 in ThreadWeaver::Job::execute (this=<value optimized out>, th=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Job.cpp:135 #14 0x00000039b380d64f in ThreadWeaver::ThreadRunHelper::run (this=<value optimized out>, parent=<value optimized out>, th=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Thread.cpp:95 #15 0x00000039b380d794 in ThreadWeaver::Thread::run (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Thread.cpp:142 #16 0x00000039adc791d5 in QThreadPrivate::start (arg=<value optimized out>) at thread/qthread_unix.cpp:244 #17 0x00007f704140d894 in start_thread (arg=<value optimized out>) at pthread_create.c:297 #18 0x00007f70416f3f9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #19 0x0000000000000000 in ?? () ***************************************************************************** Created attachment 39598 [details]
Full logs for all three cases
1) amarok_full_wipe_dba.log - wipe database
2) amarok_full_wipe_dba_2.log - correct start after first crash
3) amarok_full_non_wipe.log - crash after forced full scan with non wipe database
*** Bug 221674 has been marked as a duplicate of this bug. *** Created attachment 39676 [details]
Patch against 2.2.2 tag
Hi guys/gals,
Please test this patch ASAP.
You need to be sure to apply this against tagged 2.2.2. To do this, do:
git reset --hard v2.2.2
If you have updated to current HEAD and built current Amarok, make sure you clean your build dir...if you've installed it onto your filesystem somewhere, try to manually remove those files -- the names of some libraries may have changed and you could end up with cruft making things confusing.
Let me know how it goes.
Thanks!
How boring is this, no more crash here after applying a patch. Thanks Jeff for your heavy work. (: Hopefully others have similar results. The patch does indeed solve the crash Jeff! But as you might already know, out of the two songs with identical MB ids, only one is added to the collection: the one that is scanned last I guess. (In reply to comment #42) > The patch does indeed solve the crash Jeff! > But as you might already know, out of the two songs with identical MB ids, only > one is added to the collection: the one that is scanned last I guess. Applicable to all on this bug: It's true. The identifier is supposed to be globally unique to that track. You can't exactly fault Amarok for thinking that a unique identifier shouldn't be shared by the same file. You should probably submit a report to MusicBrainz about this (though try retagging it in Picard first). There's a chance that most of you experiencing this crash have a similar situation -- two files with the exact same ID, either through duplication of a file tagged by amarok_afttagger or from MusicBrainz issues. If you have a random file not showing up in the collection, it's likely that this is the cause. The good news is that there is a workaround: 1) If there are duplicated MBIDs and those can't be fixed by Picard, run amarok_afttagger on those files (currently MP3s, Ogg/Vorbis, Ogg/FLAC, and FLAC is supported). The AFT tag is preferred over the MBID. 2) If they were already tagged with amarok_afttagger, then probably you have actual duplicate files, where the file was copied at some point with that generated value in the tag. In this case you can run amarok_afttagger with the --newid flag to regenerate them, which will re-randomize the values. commit d35f708aec3b882dfc26484f157ac028259444e8 Author: Jeff Mitchell <mitchell@kde.org> Date: Fri Jan 8 07:45:12 2010 -0500 Fix a crash in ScanResultProcessor's destructor. Despite all the extra checks I put for null pointers in the destructor, this wasn't actually the problem. The problem, which could occur in a few ways, was that in certain instances values were either not removed from a hash when they should have been, or added to a hash when they shouldn't have been. Then when the destructor ran, it would hit two values pointing to the same QStringList, and the second access would cause a crash. Thanks to Mikko for doing some heavy legwork helping me narrow down the cause, and Tm_T and hyper_ch for their help. BUG: 220532 diff --git a/src/collection/sqlcollection/ScanResultProcessor.cpp b/src/collection/sqlcollection/ScanResultProcessor.cpp index f4bcaf2..d349c9a 100644 --- a/src/collection/sqlcollection/ScanResultProcessor.cpp +++ b/src/collection/sqlcollection/ScanResultProcessor.cpp @@ -42,18 +42,33 @@ ScanResultProcessor::~ScanResultProcessor() { //everything has a URL, so enough to just delete from here foreach( QStringList *list, m_urlsHashByUid ) - delete list; + { + if( list ) + delete list; + } foreach( QLinkedList<QStringList*> *list, m_albumsHashByName ) { - foreach( QStringList *slist, *list ) - delete slist; - delete list; + if( list ) + { + foreach( QStringList *slist, *list ) + { + if( slist ) + delete slist; + } + delete list; + } } foreach( QLinkedList<QStringList*> *list, m_tracksHashByAlbum ) { - foreach( QStringList *slist, *list ) - delete slist; - delete list; + if( list ) + { + foreach( QStringList *slist, *list ) + { + if( slist ) + delete slist; + } + delete list; + } } } @@ -67,10 +82,10 @@ void ScanResultProcessor::addDirectory( const QString &dir, uint mtime ) { DEBUG_BLOCK - debug() << "SRP::addDirectory on " << dir << " with mtime " << mtime; + //debug() << "SRP::addDirectory on " << dir << " with mtime " << mtime; if( dir.isEmpty() ) { - debug() << "got directory with no path from the scanner, not adding"; + //debug() << "got directory with no path from the scanner, not adding"; return; } setupDatabase(); @@ -418,7 +433,15 @@ ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId ) //urlId will take care of the urls table part of AFT int url = urlId( path, uid ); - +/* + foreach( QString key, m_urlsHashByUid.keys() ) + debug() << "Key: " << key << ", list: " << *m_urlsHashByUid[key]; + foreach( int key, m_urlsHashById.keys() ) + debug() << "Key: " << key << ", list: " << *m_urlsHashById[key]; + typedef QPair<int, QString> blahType; //QFOREACH is stupid when it comes to QPairs + foreach( blahType key, m_urlsHashByLocation.keys() ) + debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key]; +*/ QStringList *trackList = new QStringList(); int id = m_nextTrackNum; //debug() << "Appending new track number with tracknum: " << id; @@ -469,7 +492,7 @@ ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId ) //insert into hashes if( m_tracksHashByUrl.contains( url ) && m_tracksHashByUrl[url] != 0 ) { - //debug() << "m_tracksHashByUrl contains the url!"; + //debug() << "m_tracksHashByUrl already contains url " << url; //need to replace, not overwrite/add a new one QStringList *oldValues = m_tracksHashByUrl[url]; QString oldId = oldValues->at( 0 ); @@ -490,7 +513,12 @@ ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId ) } if( m_tracksHashByAlbum.contains( album ) && m_tracksHashByAlbum[album] != 0 ) - m_tracksHashByAlbum[album]->append( trackList ); + { + //contains isn't the fastest on linked lists, but in reality this is on the order of maybe + //ten quick pointer comparisons per track on average...probably lower + if( !m_tracksHashByAlbum[album]->contains( trackList ) ) + m_tracksHashByAlbum[album]->append( trackList ); + } else { QLinkedList<QStringList*> *list = new QLinkedList<QStringList*>(); @@ -630,7 +658,10 @@ ScanResultProcessor::albumInsert( const QString &album, int albumArtistId ) albumList->append( QString() ); m_albumsHashById[returnedNum] = albumList; if( m_albumsHashByName.contains( album ) && m_albumsHashByName[album] != 0 ) - m_albumsHashByName[album]->append( albumList ); + { + if( !m_albumsHashByName[album]->contains( albumList ) ) + m_albumsHashByName[album]->append( albumList ); + } else { QLinkedList<QStringList*> *list = new QLinkedList<QStringList*>(); @@ -644,8 +675,8 @@ ScanResultProcessor::albumInsert( const QString &album, int albumArtistId ) int ScanResultProcessor::urlId( const QString &url, const QString &uid ) { - /* DEBUG_BLOCK +/* foreach( QString key, m_urlsHashByUid.keys() ) debug() << "Key: " << key << ", list: " << *m_urlsHashByUid[key]; foreach( int key, m_urlsHashById.keys() ) @@ -653,8 +684,8 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) typedef QPair<int, QString> blahType; //QFOREACH is stupid when it comes to QPairs foreach( blahType key, m_urlsHashByLocation.keys() ) debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key]; - */ - +*/ + QFileInfo fileInfo( url ); const QString dir = fileInfo.absoluteDir().absolutePath(); int dirId = directoryId( dir ); @@ -664,6 +695,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) QPair<int, QString> locationPair( deviceId, rpath ); //debug() << "in urlId with url = " << url << " and uid = " << uid; //debug() << "checking locationPair " << locationPair; +/* if( m_urlsHashByLocation.contains( locationPair ) ) { QStringList values; @@ -673,6 +705,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) values << "zero"; //debug() << "m_urlsHashByLocation contains it! It is " << values; } +*/ QStringList currUrlIdValues; if( m_urlsHashByUid.contains( uid ) && m_urlsHashByUid[uid] != 0 ) currUrlIdValues = *m_urlsHashByUid[uid]; @@ -716,6 +749,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) //debug() << "m_urlsHashByUid contains this UID, updating deviceId and path"; QStringList *list = m_urlsHashByUid[uid]; //debug() << "list from UID hash is " << list << " with values " << *list; + QPair<int, QString> oldLocationPair( list->at( 1 ).toInt(), list->at( 2 ) ); list->replace( 1, QString::number( deviceId ) ); list->replace( 2, rpath ); list->replace( 3, QString::number( dirId ) ); @@ -736,6 +770,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) delete oldList; } m_urlsHashByLocation[locationPair] = list; + m_urlsHashByLocation.remove( oldLocationPair ); } m_permanentTablesUrlUpdates.insert( uid, url ); m_changedUrls.insert( uid, QPair<QString, QString>( m_collection->mountPointManager()->getAbsolutePath( currUrlIdValues[1].toInt(), currUrlIdValues[2] ), url ) ); @@ -750,6 +785,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) { QStringList *list = m_urlsHashByLocation[locationPair]; //debug() << "Replacing hash " << list->at( 4 ) << " with " << uid; + QString oldId = list->at( 4 ); list->replace( 4, uid ); if( m_urlsHashByUid.contains( uid ) && m_urlsHashByUid[uid] != 0 @@ -761,6 +797,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) delete oldList; } m_urlsHashByUid[uid] = list; + m_urlsHashByUid.remove( oldId ); } m_permanentTablesUidUpdates.insert( url, uid ); m_changedUids.insert( currUrlIdValues[4], uid ); @@ -1166,6 +1203,18 @@ ScanResultProcessor::copyHashesToTempTables() foreach( blahType key, m_urlsHashByLocation.keys() ) debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key]; debug() << "Next album num: " << m_nextAlbumNum; + + foreach( int key, m_tracksHashById.keys() ) + debug() << "Key: " << key << ", list: " << *m_tracksHashById[key]; + foreach( int key, m_tracksHashByUrl.keys() ) + debug() << "Key: " << key << ", list: " << *m_tracksHashByUrl[key]; + typedef QLinkedList<QStringList*> blahType; //QFOREACH is stupid when it comes to QPairs + foreach( int key, m_tracksHashByAlbum.keys() ) + { + debug() << "Key: " << key; + foreach( QStringList* item, *m_tracksHashByAlbum[key] ) + debug() << "list: " << *item; + } */ DEBUG_BLOCK commit d35f708aec3b882dfc26484f157ac028259444e8 Author: Jeff Mitchell <mitchell@kde.org> Date: Fri Jan 8 07:45:12 2010 -0500 Fix a crash in ScanResultProcessor's destructor. Despite all the extra checks I put for null pointers in the destructor, this wasn't actually the problem. The problem, which could occur in a few ways, was that in certain instances values were either not removed from a hash when they should have been, or added to a hash when they shouldn't have been. Then when the destructor ran, it would hit two values pointing to the same QStringList, and the second access would cause a crash. Thanks to Mikko for doing some heavy legwork helping me narrow down the cause, and Tm_T and hyper_ch for their help. BUG: 220532 diff --git a/src/collection/sqlcollection/ScanResultProcessor.cpp b/src/collection/sqlcollection/ScanResultProcessor.cpp index f4bcaf2..d349c9a 100644 --- a/src/collection/sqlcollection/ScanResultProcessor.cpp +++ b/src/collection/sqlcollection/ScanResultProcessor.cpp @@ -42,18 +42,33 @@ ScanResultProcessor::~ScanResultProcessor() { //everything has a URL, so enough to just delete from here foreach( QStringList *list, m_urlsHashByUid ) - delete list; + { + if( list ) + delete list; + } foreach( QLinkedList<QStringList*> *list, m_albumsHashByName ) { - foreach( QStringList *slist, *list ) - delete slist; - delete list; + if( list ) + { + foreach( QStringList *slist, *list ) + { + if( slist ) + delete slist; + } + delete list; + } } foreach( QLinkedList<QStringList*> *list, m_tracksHashByAlbum ) { - foreach( QStringList *slist, *list ) - delete slist; - delete list; + if( list ) + { + foreach( QStringList *slist, *list ) + { + if( slist ) + delete slist; + } + delete list; + } } } @@ -67,10 +82,10 @@ void ScanResultProcessor::addDirectory( const QString &dir, uint mtime ) { DEBUG_BLOCK - debug() << "SRP::addDirectory on " << dir << " with mtime " << mtime; + //debug() << "SRP::addDirectory on " << dir << " with mtime " << mtime; if( dir.isEmpty() ) { - debug() << "got directory with no path from the scanner, not adding"; + //debug() << "got directory with no path from the scanner, not adding"; return; } setupDatabase(); @@ -418,7 +433,15 @@ ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId ) //urlId will take care of the urls table part of AFT int url = urlId( path, uid ); - +/* + foreach( QString key, m_urlsHashByUid.keys() ) + debug() << "Key: " << key << ", list: " << *m_urlsHashByUid[key]; + foreach( int key, m_urlsHashById.keys() ) + debug() << "Key: " << key << ", list: " << *m_urlsHashById[key]; + typedef QPair<int, QString> blahType; //QFOREACH is stupid when it comes to QPairs + foreach( blahType key, m_urlsHashByLocation.keys() ) + debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key]; +*/ QStringList *trackList = new QStringList(); int id = m_nextTrackNum; //debug() << "Appending new track number with tracknum: " << id; @@ -469,7 +492,7 @@ ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId ) //insert into hashes if( m_tracksHashByUrl.contains( url ) && m_tracksHashByUrl[url] != 0 ) { - //debug() << "m_tracksHashByUrl contains the url!"; + //debug() << "m_tracksHashByUrl already contains url " << url; //need to replace, not overwrite/add a new one QStringList *oldValues = m_tracksHashByUrl[url]; QString oldId = oldValues->at( 0 ); @@ -490,7 +513,12 @@ ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId ) } if( m_tracksHashByAlbum.contains( album ) && m_tracksHashByAlbum[album] != 0 ) - m_tracksHashByAlbum[album]->append( trackList ); + { + //contains isn't the fastest on linked lists, but in reality this is on the order of maybe + //ten quick pointer comparisons per track on average...probably lower + if( !m_tracksHashByAlbum[album]->contains( trackList ) ) + m_tracksHashByAlbum[album]->append( trackList ); + } else { QLinkedList<QStringList*> *list = new QLinkedList<QStringList*>(); @@ -630,7 +658,10 @@ ScanResultProcessor::albumInsert( const QString &album, int albumArtistId ) albumList->append( QString() ); m_albumsHashById[returnedNum] = albumList; if( m_albumsHashByName.contains( album ) && m_albumsHashByName[album] != 0 ) - m_albumsHashByName[album]->append( albumList ); + { + if( !m_albumsHashByName[album]->contains( albumList ) ) + m_albumsHashByName[album]->append( albumList ); + } else { QLinkedList<QStringList*> *list = new QLinkedList<QStringList*>(); @@ -644,8 +675,8 @@ ScanResultProcessor::albumInsert( const QString &album, int albumArtistId ) int ScanResultProcessor::urlId( const QString &url, const QString &uid ) { - /* DEBUG_BLOCK +/* foreach( QString key, m_urlsHashByUid.keys() ) debug() << "Key: " << key << ", list: " << *m_urlsHashByUid[key]; foreach( int key, m_urlsHashById.keys() ) @@ -653,8 +684,8 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) typedef QPair<int, QString> blahType; //QFOREACH is stupid when it comes to QPairs foreach( blahType key, m_urlsHashByLocation.keys() ) debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key]; - */ - +*/ + QFileInfo fileInfo( url ); const QString dir = fileInfo.absoluteDir().absolutePath(); int dirId = directoryId( dir ); @@ -664,6 +695,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) QPair<int, QString> locationPair( deviceId, rpath ); //debug() << "in urlId with url = " << url << " and uid = " << uid; //debug() << "checking locationPair " << locationPair; +/* if( m_urlsHashByLocation.contains( locationPair ) ) { QStringList values; @@ -673,6 +705,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) values << "zero"; //debug() << "m_urlsHashByLocation contains it! It is " << values; } +*/ QStringList currUrlIdValues; if( m_urlsHashByUid.contains( uid ) && m_urlsHashByUid[uid] != 0 ) currUrlIdValues = *m_urlsHashByUid[uid]; @@ -716,6 +749,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) //debug() << "m_urlsHashByUid contains this UID, updating deviceId and path"; QStringList *list = m_urlsHashByUid[uid]; //debug() << "list from UID hash is " << list << " with values " << *list; + QPair<int, QString> oldLocationPair( list->at( 1 ).toInt(), list->at( 2 ) ); list->replace( 1, QString::number( deviceId ) ); list->replace( 2, rpath ); list->replace( 3, QString::number( dirId ) ); @@ -736,6 +770,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) delete oldList; } m_urlsHashByLocation[locationPair] = list; + m_urlsHashByLocation.remove( oldLocationPair ); } m_permanentTablesUrlUpdates.insert( uid, url ); m_changedUrls.insert( uid, QPair<QString, QString>( m_collection->mountPointManager()->getAbsolutePath( currUrlIdValues[1].toInt(), currUrlIdValues[2] ), url ) ); @@ -750,6 +785,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) { QStringList *list = m_urlsHashByLocation[locationPair]; //debug() << "Replacing hash " << list->at( 4 ) << " with " << uid; + QString oldId = list->at( 4 ); list->replace( 4, uid ); if( m_urlsHashByUid.contains( uid ) && m_urlsHashByUid[uid] != 0 @@ -761,6 +797,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid ) delete oldList; } m_urlsHashByUid[uid] = list; + m_urlsHashByUid.remove( oldId ); } m_permanentTablesUidUpdates.insert( url, uid ); m_changedUids.insert( currUrlIdValues[4], uid ); @@ -1166,6 +1203,18 @@ ScanResultProcessor::copyHashesToTempTables() foreach( blahType key, m_urlsHashByLocation.keys() ) debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key]; debug() << "Next album num: " << m_nextAlbumNum; + + foreach( int key, m_tracksHashById.keys() ) + debug() << "Key: " << key << ", list: " << *m_tracksHashById[key]; + foreach( int key, m_tracksHashByUrl.keys() ) + debug() << "Key: " << key << ", list: " << *m_tracksHashByUrl[key]; + typedef QLinkedList<QStringList*> blahType; //QFOREACH is stupid when it comes to QPairs + foreach( int key, m_tracksHashByAlbum.keys() ) + { + debug() << "Key: " << key; + foreach( QStringList* item, *m_tracksHashByAlbum[key] ) + debug() << "list: " << *item; + } */ DEBUG_BLOCK Hi, I just tested the patch (continue #37). After scan, amarok crashed, but not BT generated :-( Then I started Amarok again - database was updated. I forced full scan. Amarok crashed again with following BT. I'll do more tests evening. Thread 5 (Thread 0x7f79c6079710 (LWP 14045)): [KCrash Handler] #5 malloc_consolidate (av=<value optimized out>) at malloc.c:5136 #6 0x000000336be73d68 in _int_free (av=<value optimized out>, p=<value optimized out>) at malloc.c:5015 #7 0x000000336be771ac in *__GI___libc_free (mem=<value optimized out>) at malloc.c:3738 #8 0x0000003374e94d8d in QHashData::free_helper (this=<value optimized out>, node_delete=<value optimized out>) at tools/qhash.cpp:281 #9 0x00007f79d2060436 in ~ScanResultProcessor (this=0x7f79c6078270, __in_chrg=<value optimized out>) at /home/marian/data/amarok/src/collection/sqlcollection/ScanResultProcessor.cpp:74 #10 0x00007f79d2056225 in XmlParseJob::run (this=<value optimized out>) at /home/marian/data/amarok/src/collection/sqlcollection/ScanManager.cpp:855 #11 0x000000337c60e001 in ThreadWeaver::JobRunHelper::runTheJob (this=<value optimized out>, th=<value optimized out>, job=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Job.cpp:106 #12 0x000000337c60e1d9 in ThreadWeaver::Job::execute (this=<value optimized out>, th=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Job.cpp:135 #13 0x000000337c60d64f in ThreadWeaver::ThreadRunHelper::run (this=<value optimized out>, parent=<value optimized out>, th=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Thread.cpp:95 #14 0x000000337c60d794 in ThreadWeaver::Thread::run (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/threadweaver/Weaver/Thread.cpp:142 #15 0x0000003374e791d5 in QThreadPrivate::start (arg=<value optimized out>) at thread/qthread_unix.cpp:244 #16 0x000000336ca06894 in start_thread (arg=<value optimized out>) at pthread_create.c:297 #17 0x000000336bed0f9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #18 0x0000000000000000 in ?? () --------- amarok last messages ------------ amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 9.1e-05s amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 8.7e-05s amarok: Success. Committing result to database. amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 0.0012s amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 0.0007s amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 9.3e-05s amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 8.7e-05s amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 0.00012s amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 9e-05s amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 9.4e-05s amarok: BEGIN: void ScanManager::slotFinished() amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: void ScanManager::slotFinished() - Took 0.00015s amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 0.00021s amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 9.4e-05s amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 0.00011s amarok: BEGIN: void DatabaseUpdater::cleanPermanentTables() amarok: END__: void DatabaseUpdater::cleanPermanentTables() - Took 0.0019s amarok: BEGIN: void ScanResultProcessor::copyHashesToTempTables() amarok: obtained max_allowed_packet is "1048576" amarok: urls key size is 7109 amarok: tracks key size is 7114 amarok: END__: void ScanResultProcessor::copyHashesToTempTables() - Took 0.94s amarok: temp_tracks: ("7114") amarok: tracks before commit: ("0") amarok: BEGIN: void DatabaseUpdater::copyToPermanentTables() amarok: END__: void DatabaseUpdater::copyToPermanentTables() - Took 0.66s amarok: BEGIN: virtual void Dynamic::BiasedPlaylist::invalidate() amarok: END__: virtual void Dynamic::BiasedPlaylist::invalidate() - Took 0.00012s amarok: tracks after commit: ("7114") amarok: BEGIN: void DatabaseUpdater::removeTemporaryTables() amarok: END__: void DatabaseUpdater::removeTemporaryTables() - Took 0.14s amarok: Sending changed signal amarok: BEGIN: virtual void Dynamic::BiasedPlaylist::invalidate() amarok: END__: virtual void Dynamic::BiasedPlaylist::invalidate() - Took 6.5e-05s amarok: BEGIN: void SqlCollection::updateTrackUrlsUids(const ChangedTrackUrls&, const QHash<QString, QString>&) amarok: END__: void SqlCollection::updateTrackUrlsUids(const ChangedTrackUrls&, const QHash<QString, QString>&) - Took 0.03s KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = amarok path = <unknown> pid = 14019 sock_file=/home/marian/.kde4/socket-gool/kdeinit4_localhost_10 kdeinit4: Got EXEC_NEW '/usr/lib64/kde4/libexec/drkonqi' from wrapper. kdeinit4: preparing to launch /usr/lib64/kde4/libexec/drkonqi QSocketNotifier: Invalid socket 45 and type 'Read', disabling... kio_http(14058)/kio (TCPSlaveBase) KIO::TCPSlaveBase::disconnectFromHost: Marian, Is it possible for you to be available today on IRC and/or IM? It would really help if I can work through this with you directly...we want to get this patch fixed up for packagers before 2.2.2 releases. (You can email me contact info at mitchell@kde.org instead of posting here). Thanks! Hi, I wiped out the database and amarok crashed with a message: *** glibc detected *** amarok: corrupted double-linked list: 0x00007fcf78a452e0 *** Thread 1 (Thread 0x7fcf897c27a0 (LWP 24139)): [KCrash Handler] #5 0x000000336be321b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #6 0x000000336be335e0 in *__GI_abort () at abort.c:92 #7 0x000000336be6ce77 in __libc_message (do_abort=<value optimized out>, fmt=<value optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:186 #8 0x000000336be72406 in malloc_printerr (action=<value optimized out>, str=<value optimized out>, ptr=<value optimized out>) at malloc.c:6264 #9 0x000000336be7283d in malloc_consolidate (av=<value optimized out>) at malloc.c:5142 #10 0x000000336be74ba4 in _int_malloc (av=<value optimized out>, bytes=<value optimized out>) at malloc.c:4370 #11 0x000000336be77290 in *__GI___libc_malloc (bytes=<value optimized out>) at malloc.c:3660 #12 0x0000003374e96f7d in QListData::detach3 (this=<value optimized out>) at tools/qlist.cpp:137 #13 0x00007fcf89dcf08b in QList<KSharedPtr<Meta::Track> >::detach_helper (this=0x7fffa44b8d70) at /usr/include/qt4/QtCore/qlist.h:604 #14 0x00007fcf89df6f97 in QList<KSharedPtr<Meta::Track> >::operator[] (this=0x7fffa44b8d70, i=0) at /usr/include/qt4/QtCore/qlist.h:448 #15 0x00007fcf89df6476 in CollectionSortFilterProxyModel::albumYear (this=<value optimized out>, album=) at /home/marian/data/amarok/src/browsers/CollectionSortFilterProxyModel.cpp:150 #16 0x00007fcf89df69f2 in CollectionSortFilterProxyModel::lessThanAlbum (this=0x7fcf782515c0, left=..., right=...) at /home/marian/data/amarok/src/browsers/CollectionSortFilterProxyModel.cpp:125 #17 0x00007fcf89df6bae in CollectionSortFilterProxyModel::lessThan (this=0x7fcf782515c0, left=..., right=...) at /home/marian/data/amarok/src/browsers/CollectionSortFilterProxyModel.cpp:63 #18 0x0000003377ed9bba in void QAlgorithmsPrivate::qMerge<int*, int const, QSortFilterProxyModelLessThan>(int*, int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #19 0x0000003377ed99c7 in void QAlgorithmsPrivate::qMerge<int*, int const, QSortFilterProxyModelLessThan>(int*, int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #20 0x0000003377ed9d32 in void QAlgorithmsPrivate::qStableSortHelper<int*, int, QSortFilterProxyModelLessThan>(int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #21 0x0000003377ed9cd2 in void QAlgorithmsPrivate::qStableSortHelper<int*, int, QSortFilterProxyModelLessThan>(int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #22 0x0000003377ed9cd2 in void QAlgorithmsPrivate::qStableSortHelper<int*, int, QSortFilterProxyModelLessThan>(int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #23 0x0000003377ed9c72 in void QAlgorithmsPrivate::qStableSortHelper<int*, int, QSortFilterProxyModelLessThan>(int*, int*, int const&, QSortFilterProxyModelLessThan) () from /usr/lib64/qt4/libQtGui.so.4 #24 0x0000003377ed10af in qStableSort<int*, QSortFilterProxyModelLessThan> (this=<value optimized out>, source_rows=<value optimized out>, source_parent=<value optimized out>) at ../../include/QtCore/../../src/corelib/tools/qalgorithms.h:212 #25 QSortFilterProxyModelPrivate::sort_source_rows (this=<value optimized out>, source_rows=<value optimized out>, source_parent=<value optimized out>) at itemviews/qsortfilterproxymodel.cpp:427 #26 0x0000003377ed1653 in QSortFilterProxyModelPrivate::create_mapping (this=<value optimized out>, source_parent=<value optimized out>) at itemviews/qsortfilterproxymodel.cpp:300 #27 0x0000003377ed2168 in QSortFilterProxyModel::rowCount (this=<value optimized out>, parent=<value optimized out>) at itemviews/qsortfilterproxymodel.cpp:1600 #28 0x00007fcf89e0efa2 in CollectionTreeView::slotCheckAutoExpand (this=0x7fcf782467f0) at /home/marian/data/amarok/src/browsers/CollectionTreeView.cpp:641 #29 0x00007fcf89e102d0 in CollectionTreeView::qt_metacall (this=0x7fcf782467f0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffa44b9900) at /home/marian/data/amarok/build/src/CollectionTreeView.moc:116 #30 0x0000003374f7df33 in QMetaObject::activate (sender=<value optimized out>, m=<value optimized out>, local_signal_index=<value optimized out>, argv=<value optimized out>) at kernel/qobject.cpp:3286 #31 0x00007fcf89e018aa in CollectionTreeItemModelBase::queryDone (this=0x7fcf782504d0) at /home/marian/data/amarok/src/browsers/CollectionTreeItemModelBase.cpp:680 #32 0x00007fcf89e00dc5 in CollectionTreeItemModelBase::qt_metacall (this=0x7fcf782504d0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fcf78b136f0) at /home/marian/data/amarok/build/src/CollectionTreeItemModelBase.moc:92 #33 0x00007fcf89df9f60 in CollectionTreeItemModel::qt_metacall (this=0x5e4b, _c=24139, _id=6, _a=0xffffffffffffffff) at /home/marian/data/amarok/build/src/CollectionTreeItemModel.moc:73 #34 0x0000003374f7aeb9 in QObject::event (this=<value optimized out>, e=<value optimized out>) at kernel/qobject.cpp:1252 #35 0x00000033779b929c in QApplicationPrivate::notify_helper (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:4242 #36 0x00000033779c1ada in QApplication::notify (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:4125 #37 0x00007fcf8a0f16ea in App::notify (this=0x5e4b, receiver=0x5e4b, event=0x6) at /home/marian/data/amarok/src/App.cpp:845 #38 0x0000003374f6b2eb in QCoreApplication::notifyInternal (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at kernel/qcoreapplication.cpp:704 #39 0x0000003374f6da36 in QCoreApplication::sendEvent (receiver=<value optimized out>, event_type=<value optimized out>, data=<value optimized out>) at kernel/qcoreapplication.h:215 #40 QCoreApplicationPrivate::sendPostedEvents (receiver=<value optimized out>, event_type=<value optimized out>, data=<value optimized out>) at kernel/qcoreapplication.cpp:1345 #41 0x0000003374f94bf3 in QCoreApplication::sendPostedEvents (s=<value optimized out>) at kernel/qcoreapplication.h:220 #42 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:276 #43 0x000000336f63b4cd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #44 0x000000336f63ee88 in ?? () from /usr/lib/libglib-2.0.so.0 #45 0x000000336f63efb0 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #46 0x0000003374f94733 in QEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:407 #47 0x0000003377a5555e in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202 #48 0x0000003374f69c42 in QEventLoop::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:149 #49 0x0000003374f6a014 in QEventLoop::exec (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:201 #50 0x0000003374f6dcfb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981 #51 0x00000000004089e1 in main (argc=2, argv=0x7fffa44bc338) at /home/marian/data/amarok/src/main.cpp:235 Messages in log: amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 9.1e-05s amarok: BEGIN: int ScanResultProcessor::urlId(const QString&, const QString&) amarok: END__: int ScanResultProcessor::urlId(const QString&, const QString&) - Took 9.3e-05s amarok: BEGIN: void DatabaseUpdater::cleanPermanentTables() amarok: END__: void DatabaseUpdater::cleanPermanentTables() - Took 0.002s amarok: BEGIN: void ScanResultProcessor::copyHashesToTempTables() amarok: obtained max_allowed_packet is "1048576" amarok: BEGIN: void ScanManager::slotFinished() amarok: END__: void ScanManager::slotFinished() - Took 0.00013s amarok: urls key size is 7109 amarok: tracks key size is 7109 amarok: END__: void ScanResultProcessor::copyHashesToTempTables() - Took 0.96s amarok: temp_tracks: ("7109") amarok: tracks before commit: ("0") amarok: BEGIN: void DatabaseUpdater::copyToPermanentTables() amarok: END__: void DatabaseUpdater::copyToPermanentTables() - Took 0.59s amarok: BEGIN: virtual void Dynamic::BiasedPlaylist::invalidate() amarok: END__: virtual void Dynamic::BiasedPlaylist::invalidate() - Took 0.00013s amarok: tracks after commit: ("7109") amarok: BEGIN: void DatabaseUpdater::removeTemporaryTables() amarok: END__: void DatabaseUpdater::removeTemporaryTables() - Took 0.0024s amarok: BEGIN: CollectionTreeItem::CollectionTreeItem(const Meta::DataList&, CollectionTreeItem*, CollectionTreeItemModelBase*) amarok: END__: CollectionTreeItem::CollectionTreeItem(const Meta::DataList&, CollectionTreeItem*, CollectionTreeItemModelBase*) - Took 0.00012s amarok: Sending changed signal KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = amarok path = <unknown> pid = 24139 The last backtrace looks like bug 196207 (In reply to comment #49) > The last backtrace looks like bug 196207 It isn't...I have her testing a new patch. Will report back soon. *** Bug 222440 has been marked as a duplicate of this bug. *** *** Bug 222842 has been marked as a duplicate of this bug. *** *** Bug 222857 has been marked as a duplicate of this bug. *** *** Bug 222874 has been marked as a duplicate of this bug. *** Looking at these dupes I'm guessing Arch packagers did not include the patch for 2.2.2? (In reply to comment #55) > Looking at these dupes I'm guessing Arch packagers did not include the patch > for 2.2.2? I am using archlinux and amarok 2.2.2 but i am still suffering from this bug. Yes, that should really be fixed by now, Archlinux provides the patch. See also comment #3 in bug 222842 *** Bug 222438 has been marked as a duplicate of this bug. *** Application that crashed: amarok Version of the application: 2.2.2 KDE Version: 4.3.4 (KDE 4.3.4) "release 2" Qt Version: 4.5.3 Operating System: Linux 2.6.31.8-0.1-desktop x86_64 Distribution: "openSUSE 11.2 (x86_64)" What I was doing when the application crashed: So as in [Bug 215731] "Collection browser shows wrong cover" described, a full rescan is started in the amaroK settings dialog. The rescan starts (on the NFS-Mounted path) and send to a local MySQL database. No other tasks ar running, playlist is empty (works with 2.2.1 version fine - but crashes with 2.2.2 Version (from yesterday and today - from openSUSE 11.2 repository). The crash is coming short befor rescan is finished (in my case all 6 times at 97%). Additional Traces are in Bug 222438, if needed I make new tests. PS: But I don't understand in detail, what is to do to handle the workarround. *** Bug 222528 has been marked as a duplicate of this bug. *** (In reply to comment #59) > But I don't understand in detail, what is to do to handle the workarround. It is not a workaround, but a patch, normally the patched version should be available in OpenSuSE already. Ulf, please open a new bug. Your issue is probably not related to this. What is the different? But the Bug ist allways open as Bug 222438 (must be reopened?). It's a completely different backtrace. *** Bug 225207 has been marked as a duplicate of this bug. *** |