Bug 179214 - frequent crashes when renaming/deleting folder -> race condition on _k_slotDeleteItems?
Summary: frequent crashes when renaming/deleting folder -> race condition on _k_slotDe...
Status: RESOLVED DUPLICATE of bug 180673
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-31 15:42 UTC by Marcel Partap
Modified: 2009-01-19 16:55 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Partap 2008-12-31 15:42:18 UTC
Version:           4.1.86 (KDE 4.1.86 (KDE 4.2 >= 20081221)) (using 4.1.86 (KDE 4.1.86 (KDE 4.2 >= 20081221)), Gentoo)
Compiler:          x86_64-pc-linux-gnu-gcc
OS:                Linux (x86_64) release 2.6.28-rc9-git1

can't really track this down right now but as i'm just reorganizing my disks it happened a couple of times now..

right before the troubling assertion i added a kDebug that dumps the hash list checked for the item.. example output for a crash followin.

konqueror(9845)/kio (KDirListerCache) KDirListerCache::emitRedirections: KUrl("file:///mnt/sdd1/sdc1-reiserfs-move/MovieZ/SerieZ/series") -> KUrl("file:///mnt/sdd1/sdc1-reiserfs-move/MovieZ/SerieZ/misc")
konqueror(9845)/kio (KDirListerCache) KDirListerCache::removeDirFromCache: KUrl("file:///mnt/sdd1/sdc1-reiserfs-move/MovieZ/SerieZ/series")
konqueror(9845)/kio (KDirModel) KDirModelPrivate::_k_slotRefreshItems: dataChanged( "[invalid index, i.e. root]"  -  "[invalid index, i.e. root]"
konqueror(9845)/kio (KDirWatch) KDirWatch::setDirty: "KDirWatch-1" emitting dirty "/mnt/sdd1/sdc1-reiserfs-move/MovieZ/SerieZ"
konqueror(9845)/kio (KDirListerCache) KDirListerCache::slotFileDirty: "/mnt/sdd1/sdc1-reiserfs-move/MovieZ/SerieZ"
konqueror(9845)/kio (KDirListerCache) KDirListerCache::updateDirectory: KUrl("file:///mnt/sdd1/sdc1-reiserfs-move/MovieZ/SerieZ")
konqueror(9845)/kio (KDirListerCache) KDirListerCache::updateDirectory: update started in KUrl("file:///mnt/sdd1/sdc1-reiserfs-move/MovieZ/SerieZ")
konqueror(9845)/kio (KDirListerCache) KDirListerCache::slotUpdateResult: finished update KUrl("file:///mnt/sdd1/sdc1-reiserfs-move/MovieZ/SerieZ")
konqueror(9845)/kio (KIOJob) KIO::CopyJobPrivate::startRenameJob: This seems to be a suitable case for trying to rename before stat+[list+]copy+del
konqueror(9845)/kio (KDirWatch) KDirWatchPrivate::inotifyEventReceived: 0 instance(s) monitoring the new dir "/mnt/sdd1/skeleton/MovieZ/SerieZ/English/misc"
konqueror(9845)/kio (KIOJob) KIO::CopyJobPrivate::slotResultRenaming: Renaming succeeded, move on
konqueror(9845)/kio (KDirListerCache) KDirListerCache::slotFilesAdded: "file:///mnt/sdd1/skeleton/MovieZ/SerieZ/English"
konqueror(9845)/kio (KDirListerCache) KDirListerCache::updateDirectory: KUrl("file:///mnt/sdd1/skeleton/MovieZ/SerieZ/English")
konqueror(9845)/kio (KDirListerCache) KDirListerCache::updateDirectory: update started in KUrl("file:///mnt/sdd1/skeleton/MovieZ/SerieZ/English")
konqueror(9845)/kio (KDirListerCache) KDirListerCache::slotFilesRemoved: 1
konqueror(9845) KDirModelPrivate::_k_slotDeleteItems: m_childNodesByName:  QHash(("series", 0x2f3ac50))
konqueror(9845) KDirModelPrivate::_k_slotDeleteItems: url.fileName() =  "misc"
ASSERT: "dirNode->m_childNodesByName.contains(url.fileName())" in file /mnt/sda3/var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/kio/kio/kdirmodel.cpp, line 471
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = konqueror path = <unknown> pid = 9845
sock_file=/root/.kde/socket-localhost/kdeinit4__

so here _k_slotDeleteItems gets invoked with the old file path for whatever reason. It happens fairly frequently when you rename/move stuff within a folder structure, should be easy to replicate. Sorry no fix yet here..
Comment 1 Vangelis 2009-01-02 14:07:40 UTC
I also have very frequent crashes with Dolphin when Renaming/Deleting/Cutting/Pasting files and folders...

This is a backtrace of a folder deletion just by pressing the "Del" button on my keyboard when the folder was selected.



Application: Dolphin (dolphin), signal SIGSEGV
0x00007f6287e17621 in nanosleep () from /lib/libc.so.6

Thread 1 (Thread 0x7f628d5b66f0 (LWP 27632)):
[KCrash Handler]
#5  KDirModelNode::rowNumber (this=0x101dfe0) at /usr/include/qt4/QtCore/qlist.h:83
#6  0x00007f628d028078 in KDirModelPrivate::indexForNode (this=0xd36560, node=0x101dfe0, rowNumber=-1) at /build/buildd/kde4libs-4.1.85/kio/kio/kdirmodel.cpp:291
#7  0x00007f628d02c21b in KDirModel::indexForUrl (this=0xd647e0, url=@0xdad228) at /build/buildd/kde4libs-4.1.85/kio/kio/kdirmodel.cpp:854
#8  0x00007f628c80848e in DolphinView::restoreCurrentItem () from /usr/lib/libdolphinprivate.so.4
#9  0x00007f628c80beaf in DolphinView::qt_metacall () from /usr/lib/libdolphinprivate.so.4
#10 0x00007f6289d71134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0x00007f628d0227c4 in KDirListerCache::slotUpdateResult (this=0xcbbdd0, j=<value optimized out>) at /build/buildd/kde4libs-4.1.85/kio/kio/kdirlister.cpp:1579
#12 0x00007f628d023927 in KDirListerCache::qt_metacall (this=0xcbbdd0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff955ed950)
    at /build/buildd/kde4libs-4.1.85/obj-x86_64-linux-gnu/kio/kdirlister_p.moc:101
#13 0x00007f6289d71134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#14 0x00007f628aef7872 in KJob::result (this=0x101dfe0, _t1=0x1149e70) at /build/buildd/kde4libs-4.1.85/obj-x86_64-linux-gnu/kdecore/kjob.moc:186
#15 0x00007f628aef7c3f in KJob::emitResult (this=0x1149e70) at /build/buildd/kde4libs-4.1.85/kdecore/jobs/kjob.cpp:294
#16 0x00007f628cff4da0 in KIO::SimpleJob::slotFinished (this=0x1149e70) at /build/buildd/kde4libs-4.1.85/kio/kio/job.cpp:489
#17 0x00007f628cff4ed5 in KIO::ListJob::slotFinished (this=0x1149e70) at /build/buildd/kde4libs-4.1.85/kio/kio/job.cpp:2416
#18 0x00007f628cff772d in KIO::ListJob::qt_metacall (this=0x1149e70, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff955edc90)
    at /build/buildd/kde4libs-4.1.85/obj-x86_64-linux-gnu/kio/jobclasses.moc:747
#19 0x00007f6289d71134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#20 0x00007f628d0b3661 in KIO::SlaveInterface::dispatch (this=0xad4910, _cmd=104, rawdata=<value optimized out>) at /build/buildd/kde4libs-4.1.85/kio/kio/slaveinterface.cpp:175
#21 0x00007f628d0b0152 in KIO::SlaveInterface::dispatch (this=0xad4910) at /build/buildd/kde4libs-4.1.85/kio/kio/slaveinterface.cpp:91
#22 0x00007f628d0a2343 in KIO::Slave::gotInput (this=0xad4910) at /build/buildd/kde4libs-4.1.85/kio/kio/slave.cpp:322
#23 0x00007f628d0a3378 in KIO::Slave::qt_metacall (this=0xad4910, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff955ee0b0) at /build/buildd/kde4libs-4.1.85/obj-x86_64-linux-gnu/kio/slave.moc:75
#24 0x00007f6289d71134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#25 0x00007f628cfc0540 in KIO::ConnectionPrivate::dequeue (this=0xfcdd00) at /build/buildd/kde4libs-4.1.85/kio/kio/connection.cpp:82
#26 0x00007f628cfc067a in KIO::Connection::qt_metacall (this=0xfc8a60, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x11765d0)
    at /build/buildd/kde4libs-4.1.85/obj-x86_64-linux-gnu/kio/connection.moc:72
#27 0x00007f6289d6bda5 in QObject::event () from /usr/lib/libQtCore.so.4
#28 0x00007f628a210c3d in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#29 0x00007f628a2189ba in QApplication::notify () from /usr/lib/libQtGui.so.4
#30 0x00007f628b6daf0b in KApplication::notify (this=0x7fff955eeb00, receiver=0xfc8a60, event=0xd35bb0) at /build/buildd/kde4libs-4.1.85/kdeui/kernel/kapplication.cpp:307
#31 0x00007f6289d5cd61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#32 0x00007f6289d5d9fa in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib/libQtCore.so.4
#33 0x00007f6289d854d3 in ?? () from /usr/lib/libQtCore.so.4
#34 0x00007f6285aa0d3b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#35 0x00007f6285aa450d in ?? () from /usr/lib/libglib-2.0.so.0
#36 0x00007f6285aa46cb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#37 0x00007f6289d8515f in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#38 0x00007f628a2a2a6f in ?? () from /usr/lib/libQtGui.so.4
#39 0x00007f6289d5b682 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#40 0x00007f6289d5b80d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#41 0x00007f6289d5dcbd in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#42 0x000000000044334d in _start ()
Comment 2 Dario Andres 2009-01-02 14:14:43 UTC
@Vangelis: your backtrace in comment 1 is a different backtrace: bug 177125

The original crash seems to be unique as I can't find any duplicates.
Comment 3 Vangelis 2009-01-02 14:19:07 UTC
Thanks. Sorry for the wrong report.
I searched in google for dolphin frequent crashes and this is what it came up.
Comment 4 David Faure 2009-01-19 16:50:05 UTC
Marcel: does this still happen? You reported the bug on 21-Dec, and I fixed a corruption in KDirModel on 22-Dec (svn r900309, bug 177125). I think this fixed it, although I can't be 100% sure, of course.

Please reopen if you can still reproduce this crash with 4.2-rc1 or later.
Comment 5 David Faure 2009-01-19 16:55:22 UTC
Ooops and now I just got this crash again, using the steps mentionned in 180673 (rename a folder then move it). Marking as duplicate, then I'll fix it.

*** This bug has been marked as a duplicate of bug 180673 ***