Bug 224229 - [steps] Kate crashes in KDirWatcher when files change on disk [QString::operator==, findSubEntry,KDirWatchPrivate::inotifyEventReceived]
Summary: [steps] Kate crashes in KDirWatcher when files change on disk [QString::opera...
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: general (show other bugs)
Version: 4.3
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 215967 225482 225822 225897 225905 225957 226142 226277 226553 231852 233588 237930 238024 238825 238853 244741 256704 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-25 21:48 UTC by Matthew Woehlke
Modified: 2011-01-23 18:36 UTC (History)
22 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Woehlke 2010-01-25 21:48:39 UTC
Version:            (using Devel)
Compiler:          gcc (GCC) 4.4.2 20091222 (Red Hat 4.4.2-20) 
OS:                Linux
Installed from:    Compiled sources

Recently kate has been very flaky, often crashing when files on disk change (since I use git and frequently switch branches, it's not uncommon for files I have open to change or even disappear or reappear while I am working). I've started running kate in gdb, and got the following backtrace, pointing at kdirwatcher:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4d309eb in QString::operator== (this=0x184ed00, other=...) at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/tools/qstring.cpp:2060
2060        if (d->size != other.d->size)
(gdb) bt
#0  0x00007ffff4d309eb in QString::operator== (this=0x184ed00, other=...) at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/tools/qstring.cpp:2060
#1  0x00007ffff75a4603 in findSubEntry (this=0x81a1a0) at /usr/local/src/kde/svn/trunk/kdelibs/kio/kio/kdirwatch_p.h:161
#2  KDirWatchPrivate::inotifyEventReceived (this=0x81a1a0) at /usr/local/src/kde/svn/trunk/kdelibs/kio/kio/kdirwatch.cpp:309
#3  0x00007ffff75a6964 in KDirWatchPrivate::qt_metacall (this=0x81a1a0, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffffffbaa0)
    at /var/local/build/kde/svn/trunk/kdelibs/kio/kdirwatch_p.moc:83
#4  0x00007ffff4deb2f1 in QMetaObject::metacall (object=0x81a1a0, cl=InvokeMetaMethod, idx=6, argv=0x7fffffffbaa0) at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/kernel/qmetaobject.cpp:237
#5  0x00007ffff4dfd4b7 in QMetaObject::activate (sender=0x81dc10, m=0x7ffff512d1c0, local_signal_index=0, argv=0x7fffffffbaa0)
    at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/kernel/qobject.cpp:3272
#6  0x00007ffff4e5151e in QSocketNotifier::activated (this=0x81dc10, _t1=16) at .moc/debug-shared/moc_qsocketnotifier.cpp:89
#7  0x00007ffff4e0530d in QSocketNotifier::event (this=0x81dc10, e=0x7fffffffc380) at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/kernel/qsocketnotifier.cpp:317
#8  0x00007ffff5ca9324 in QApplicationPrivate::notify_helper (this=0x62f920, receiver=0x81dc10, e=0x7fffffffc380) at /usr/local/src/kde/svn/trunk/qt-kde/src/gui/kernel/qapplication.cpp:4298
#9  0x00007ffff5ca697c in QApplication::notify (this=0x7fffffffc7e0, receiver=0x81dc10, e=0x7fffffffc380) at /usr/local/src/kde/svn/trunk/qt-kde/src/gui/kernel/qapplication.cpp:3702
#10 0x00007ffff6af9996 in KApplication::notify (this=0x7fffffffc7e0, receiver=0x81dc10, event=0x7fffffffc380) at /usr/local/src/kde/svn/trunk/kdelibs/kdeui/kernel/kapplication.cpp:302
#11 0x00007ffff4de44ad in QCoreApplication::notifyInternal (this=0x7fffffffc7e0, receiver=0x81dc10, event=0x7fffffffc380)
    at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/kernel/qcoreapplication.cpp:704
#12 0x00007ffff5c9bd2f in QCoreApplication::sendEvent (receiver=0x81dc10, event=0x7fffffffc380) at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/kernel/qcoreapplication.h:215
#13 0x00007ffff4e1585b in socketNotifierSourceDispatch (source=0x631c80) at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/kernel/qeventdispatcher_glib.cpp:110
#14 0x000000390b63922e in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#15 0x000000390b63cc18 in ?? () from /lib64/libglib-2.0.so.0
#16 0x000000390b63cd3a in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#17 0x00007ffff4e164cd in QEventDispatcherGlib::processEvents (this=0x62b450, flags=...) at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/kernel/qeventdispatcher_glib.cpp:412
#18 0x00007ffff5d6b90c in QGuiEventDispatcherGlib::processEvents (this=0x62b450, flags=...) at /usr/local/src/kde/svn/trunk/qt-kde/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#19 0x00007ffff4de244c in QEventLoop::processEvents (this=0x7fffffffc690, flags=...) at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/kernel/qeventloop.cpp:149
#20 0x00007ffff4de25a0 in QEventLoop::exec (this=0x7fffffffc690, flags=...) at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/kernel/qeventloop.cpp:197
#21 0x00007ffff4de4b72 in QCoreApplication::exec () at /usr/local/src/kde/svn/trunk/qt-kde/src/corelib/kernel/qcoreapplication.cpp:981
#22 0x00007ffff5ca64ee in QApplication::exec () at /usr/local/src/kde/svn/trunk/qt-kde/src/gui/kernel/qapplication.cpp:3577
#23 0x00007ffff7df8bfd in kdemain (argc=<value optimized out>, argv=<value optimized out>) at /usr/local/src/kde/svn/trunk/kdesdk/kate/app/katemain.cpp:377
#24 0x0000003908a1eb1d in __libc_start_main () from /lib64/libc.so.6
#25 0x0000000000400729 in _start ()
(gdb) p other.d
$1 = (QString::Data *) 0x13997c0
(gdb) p d
$2 = (QString::Data *) 0x800000008
(gdb) up
#1  0x00007ffff75a4603 in findSubEntry (this=0x81a1a0) at /usr/local/src/kde/svn/trunk/kdelibs/kio/kio/kdirwatch_p.h:161
161                 if (sub_entry->path == path)
(gdb) p sub_entry
$3 = (KDirWatchPrivate::Entry *) 0x184ecc8
(gdb) p sub_entry->path
$4 = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 30345}, alloc = 0, size = 0, data = 0x7ffff513279a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0,
    capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 3460}, alloc = 0, size = 0, data = 0x7ffff51327ba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache =
    0, capacity = 0, reserved = 0, array = {0}}, d = 0x800000008, static codecForCStrings = 0x0}
(gdb) quit

Note that it looks like sub_entry->path got freed (or corrupted).

I don't have a proven means to reproduce, nor can I confirm that the other crashes are all the same (this is the first one from which I've gotten a usable backtrace.)
Comment 1 Andreas Pakulat 2010-01-25 22:10:15 UTC
I believe we have similar reports for KDevelop (where two of our plugins use KDirWatch to watch over changes in the projects). Didn't look into this further, on suggestion was to check wether KDirWatch was maybe used in multiple threads which is not supported by the class. Matthew could you check wether your crashed kate has more threads running?
Comment 2 Matthew Woehlke 2010-01-25 22:36:14 UTC
Sorry, I already shut down gdb; I'll check next time (from recent experience I fully expect there to be a "next time").

Meanwhile, maybe a Kate dev can comment on how kdirwatcher is used in Kate?
Comment 3 Christoph Feck 2010-01-25 22:50:16 UTC
It is most probably bug 165548, which unfortunately isn't fixed by recent commits.
Comment 4 Matthew Woehlke 2010-01-26 02:12:53 UTC
Hmm, I am less sure about this being a problem in kdirwatcher now... Here's why:

==9039== Invalid read of size 1
==9039==    at 0x541271A: KDirWatchPrivate::Entry::propagate_dirty() (kdirwatch.cpp:418)
==9039==    by 0x541BE5E: KDirWatchPrivate::slotRescan() (kdirwatch.cpp:1349)
==9039==    by 0x541CA13: KDirWatchPrivate::qt_metacall(QMetaObject::Call, int, void**) (kdirwatch_p.moc:81)
==9039==    by 0x7C6B2F0: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (qmetaobject.cpp:237)
==9039==    by 0x7C7D4B6: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3272)
==9039==    by 0x7CD1824: QTimer::timeout() (moc_qtimer.cpp:134)
==9039==    by 0x7C856D8: QTimer::timerEvent(QTimerEvent*) (qtimer.cpp:271)
==9039==    by 0x7C79434: QObject::event(QEvent*) (qobject.cpp:1212)
==9039==    by 0x6525323: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4298)
==9039==    by 0x652297B: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3702)
==9039==    by 0x5F17BD5: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:302)
==9039==    by 0x7C644AC: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:704)
==9039==  Address 0x13217bb0 is 80 bytes inside a block of size 200 free'd
==9039==    at 0x4A04A84: operator delete(void*) (vg_replace_malloc.c:346)
==9039==    by 0x66B051A: QScopedPointerDeleter<QPainterPrivate>::cleanup(QPainterPrivate*) (qscopedpointer.h:62)
==9039==    by 0x66AFA2C: QScopedPointer<QPainterPrivate, QScopedPointerDeleter<QPainterPrivate> >::~QScopedPointer() (qscopedpointer.h:100)
==9039==    by 0x669C3DE: QPainter::~QPainter() (qpainter.cpp:1507)
==9039==    by 0x6699EDA: QPainterPrivate::draw_helper(QPainterPath const&, QPainterPrivate::DrawOperation) (qpainter.cpp:485)
==9039==    by 0x66A3C24: QPainter::drawLines(QLineF const*, int) (qpainter.cpp:4632)
==9039==    by 0x114DEB84: OxygenStyle::renderScrollBarHandle(QPainter*, QRect const&, QPalette const&, Qt::Orientation, bool, double) const (qpainter.h:534)
==9039==    by 0x114DEE49: OxygenStyle::drawScrollBarPrimitive(int, QStyleOption const*, QRect const&, QPalette const&, QFlags<QStyle::StateFlag>, QPainter*, QWidget const*, KStyle::Option*) const (oxygen.h:288)
==9039==    by 0x114D425B: OxygenStyle::drawKStylePrimitive(KStyle::WidgetType, int, QStyleOption const*, QRect const&, QPalette const&, QFlags<QStyle::StateFlag>, QPainter*, QWidget const*, KStyle::Option*) const (oxygen.cpp:690)
==9039==    by 0x5F2776F: KStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const (kstyle.cpp:2260)
==9039==    by 0x114E50AE: OxygenStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const (oxygen.cpp:569)
==9039==    by 0x688F97B: QCommonStyle::drawComplexControl(QStyle::ComplexControl, QStyleOptionComplex const*, QPainter*, QWidget const*) const (qcommonstyle.cpp:3236)
==9039==
==9039== Invalid write of size 1
==9039==    at 0x5412720: KDirWatchPrivate::Entry::propagate_dirty() (kdirwatch.cpp:420)
==9039==    by 0x541BE5E: KDirWatchPrivate::slotRescan() (kdirwatch.cpp:1349)
==9039==    by 0x541CA13: KDirWatchPrivate::qt_metacall(QMetaObject::Call, int, void**) (kdirwatch_p.moc:81)
==9039==    by 0x7C6B2F0: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (qmetaobject.cpp:237)
==9039==    by 0x7C7D4B6: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3272)
==9039==    by 0x7CD1824: QTimer::timeout() (moc_qtimer.cpp:134)
==9039==    by 0x7C856D8: QTimer::timerEvent(QTimerEvent*) (qtimer.cpp:271)
==9039==    by 0x7C79434: QObject::event(QEvent*) (qobject.cpp:1212)
==9039==    by 0x6525323: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4298)
==9039==    by 0x652297B: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3702)
==9039==    by 0x5F17BD5: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:302)
==9039==    by 0x7C644AC: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:704)
==9039==  Address 0x13217bb0 is 80 bytes inside a block of size 200 free'd
==9039==    at 0x4A04A84: operator delete(void*) (vg_replace_malloc.c:346)
==9039==    by 0x66B051A: QScopedPointerDeleter<QPainterPrivate>::cleanup(QPainterPrivate*) (qscopedpointer.h:62)
==9039==    by 0x66AFA2C: QScopedPointer<QPainterPrivate, QScopedPointerDeleter<QPainterPrivate> >::~QScopedPointer() (qscopedpointer.h:100)
==9039==    by 0x669C3DE: QPainter::~QPainter() (qpainter.cpp:1507)
==9039==    by 0x6699EDA: QPainterPrivate::draw_helper(QPainterPath const&, QPainterPrivate::DrawOperation) (qpainter.cpp:485)
==9039==    by 0x66A3C24: QPainter::drawLines(QLineF const*, int) (qpainter.cpp:4632)
==9039==    by 0x114DEB84: OxygenStyle::renderScrollBarHandle(QPainter*, QRect const&, QPalette const&, Qt::Orientation, bool, double) const (qpainter.h:534)
==9039==    by 0x114DEE49: OxygenStyle::drawScrollBarPrimitive(int, QStyleOption const*, QRect const&, QPalette const&, QFlags<QStyle::StateFlag>, QPainter*, QWidget const*, KStyle::Option*) const (oxygen.h:288)
==9039==    by 0x114D425B: OxygenStyle::drawKStylePrimitive(KStyle::WidgetType, int, QStyleOption const*, QRect const&, QPalette const&, QFlags<QStyle::StateFlag>, QPainter*, QWidget const*, KStyle::Option*) const (oxygen.cpp:690)
==9039==    by 0x5F2776F: KStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const (kstyle.cpp:2260)
==9039==    by 0x114E50AE: OxygenStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const (oxygen.cpp:569)
==9039==    by 0x688F97B: QCommonStyle::drawComplexControl(QStyle::ComplexControl, QStyleOptionComplex const*, QPainter*, QWidget const*) const (qcommonstyle.cpp:3236)
==9039==
==9039== Invalid read of size 8
==9039==    at 0x54126C5: KDirWatchPrivate::Entry::propagate_dirty() (qlist.h:114)
==9039==    by 0x5412728: KDirWatchPrivate::Entry::propagate_dirty() (kdirwatch.cpp:421)
==9039==    by 0x541BE5E: KDirWatchPrivate::slotRescan() (kdirwatch.cpp:1349)
==9039==    by 0x541CA13: KDirWatchPrivate::qt_metacall(QMetaObject::Call, int, void**) (kdirwatch_p.moc:81)
==9039==    by 0x7C6B2F0: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (qmetaobject.cpp:237)
==9039==    by 0x7C7D4B6: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3272)
==9039==    by 0x7CD1824: QTimer::timeout() (moc_qtimer.cpp:134)
==9039==    by 0x7C856D8: QTimer::timerEvent(QTimerEvent*) (qtimer.cpp:271)
==9039==    by 0x7C79434: QObject::event(QEvent*) (qobject.cpp:1212)
==9039==    by 0x6525323: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4298)
==9039==    by 0x652297B: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3702)
==9039==    by 0x5F17BD5: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:302)
==9039==  Address 0x13217b98 is 56 bytes inside a block of size 200 free'd
==9039==    at 0x4A04A84: operator delete(void*) (vg_replace_malloc.c:346)
==9039==    by 0x66B051A: QScopedPointerDeleter<QPainterPrivate>::cleanup(QPainterPrivate*) (qscopedpointer.h:62)
==9039==    by 0x66AFA2C: QScopedPointer<QPainterPrivate, QScopedPointerDeleter<QPainterPrivate> >::~QScopedPointer() (qscopedpointer.h:100)
==9039==    by 0x669C3DE: QPainter::~QPainter() (qpainter.cpp:1507)
==9039==    by 0x6699EDA: QPainterPrivate::draw_helper(QPainterPath const&, QPainterPrivate::DrawOperation) (qpainter.cpp:485)
==9039==    by 0x66A3C24: QPainter::drawLines(QLineF const*, int) (qpainter.cpp:4632)
==9039==    by 0x114DEB84: OxygenStyle::renderScrollBarHandle(QPainter*, QRect const&, QPalette const&, Qt::Orientation, bool, double) const (qpainter.h:534)
==9039==    by 0x114DEE49: OxygenStyle::drawScrollBarPrimitive(int, QStyleOption const*, QRect const&, QPalette const&, QFlags<QStyle::StateFlag>, QPainter*, QWidget const*, KStyle::Option*) const (oxygen.h:288)
==9039==    by 0x114D425B: OxygenStyle::drawKStylePrimitive(KStyle::WidgetType, int, QStyleOption const*, QRect const&, QPalette const&, QFlags<QStyle::StateFlag>, QPainter*, QWidget const*, KStyle::Option*) const (oxygen.cpp:690)
==9039==    by 0x5F2776F: KStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const (kstyle.cpp:2260)
==9039==    by 0x114E50AE: OxygenStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const (oxygen.cpp:569)
==9039==    by 0x688F97B: QCommonStyle::drawComplexControl(QStyle::ComplexControl, QStyleOptionComplex const*, QPainter*, QWidget const*) const (qcommonstyle.cpp:3236)
==9039==
==9039== Invalid read of size 4
==9039==    at 0x54126CD: KDirWatchPrivate::Entry::propagate_dirty() (qatomic_x86_64.h:121)
==9039==    by 0x5412728: KDirWatchPrivate::Entry::propagate_dirty() (kdirwatch.cpp:421)
==9039==    by 0x541BE5E: KDirWatchPrivate::slotRescan() (kdirwatch.cpp:1349)
==9039==    by 0x541CA13: KDirWatchPrivate::qt_metacall(QMetaObject::Call, int, void**) (kdirwatch_p.moc:81)
==9039==    by 0x7C6B2F0: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (qmetaobject.cpp:237)
==9039==    by 0x7C7D4B6: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3272)
==9039==    by 0x7CD1824: QTimer::timeout() (moc_qtimer.cpp:134)
==9039==    by 0x7C856D8: QTimer::timerEvent(QTimerEvent*) (qtimer.cpp:271)
==9039==    by 0x7C79434: QObject::event(QEvent*) (qobject.cpp:1212)
==9039==    by 0x6525323: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4298)
==9039==    by 0x652297B: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3702)
==9039==    by 0x5F17BD5: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:302)
==9039==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==9039==

Hopefully this helps! Curious that the free is inside painting code, but maybe that's a red herring.
Comment 5 David Faure 2010-01-26 11:57:18 UTC
Red herring indeed, the bug is obviously in KDirWatch. You could try with a bigger value for --freelist-vol in valgrind to see if it can track better what the memory was used for. The default value is 10000000, try adding a zero or two ;)
Comment 6 Matthew Woehlke 2010-01-27 01:12:44 UTC
No joy; tried with --freelist-vol=400000000, and the free is reported in Kate's HL. Whatever is deleting it, it is loooong gone by the time the SEGV occurs.

Interestingly I think I caught this happening on a file creation, at least that's my guess as it actually died when I fired up vim (which I think would have created its swap in a location that this kdirwatcher would have seen).

I'm starting to think it might be better for debugging to not actually delete the object but mark it bad and record the trace of where the delete would have occurred. The downside of course is that might use a lot of memory depending on how ephemeral these objects are.
Comment 7 Dennis 2010-02-02 18:50:25 UTC
Adding two backtraces, which look different while both occured when currently open file was modified by external program (svn).
Qt version is 4.6.1


Application: Kate (kdeinit4), signal: Segmentation fault
[Current thread is 0 (LWP 18238)]

Thread 2 (Thread 0x7fcdbe5f6910 (LWP 18239)):
#0  0x00007fcdcdb0e209 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fcdbef5a296 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7fcdbf21c1e0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2304
#2  0x00007fcdbef5a2b9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x7fcdbf22a2ac) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1438
#3  0x00007fcdcdb0a2f0 in start_thread () from /lib/libpthread.so.0
#4  0x00007fcdca606bbd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fcdce27f740 (LWP 18238)):
[KCrash Handler]
#5  0x00007fcdcdde1586 in QString::operator== (this=0x11c3ef0, other=@0x7fff2ba8f910) at tools/qstring.cpp:2060
#6  0x00007fcdccdabdf3 in KDirWatchPrivate::Entry::findSubEntry (this=<value optimized out>, path=@0x7fff2ba8f910)
    at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kio/kio/kdirwatch_p.h:157
#7  0x00007fcdccda9592 in KDirWatchPrivate::inotifyEventReceived (this=0x79b960) at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kio/kio/kdirwatch.cpp:297
#8  0x00007fcdccda9c90 in KDirWatchPrivate::qt_metacall (this=0x79b960, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff2ba8fba0)
    at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5_build/kio/kdirwatch_p.moc:81
#9  0x00007fcdcdeae067 in QMetaObject::activate (sender=0x79be30, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3267
#10 0x00007fcdcdefe90e in QSocketNotifier::activated (this=0x11c3ef0, _t1=12) at .moc/debug-shared/moc_qsocketnotifier.cpp:89
#11 0x00007fcdcdeb51e3 in QSocketNotifier::event (this=0x79be30, e=0x7fff2ba90350) at kernel/qsocketnotifier.cpp:317
#12 0x00007fcdcb1ef766 in QApplicationPrivate::notify_helper (this=0x6a1e50, receiver=0x79be30, e=0x7fff2ba90350) at kernel/qapplication.cpp:4298
#13 0x00007fcdcb1f7b40 in QApplication::notify (this=0x7fff2ba906c0, receiver=0x79be30, e=0x7fff2ba90350) at kernel/qapplication.cpp:4263
#14 0x00007fcdcc2f424a in KApplication::notify (this=0x7fff2ba906c0, receiver=0x79be30, event=0x7fff2ba90350)
    at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kdeui/kernel/kapplication.cpp:302
#15 0x00007fcdcde98823 in QCoreApplication::notifyInternal (this=0x7fff2ba906c0, receiver=0x79be30, event=0x7fff2ba90350) at kernel/qcoreapplication.cpp:704
#16 0x00007fcdcdec5229 in socketNotifierSourceDispatch (source=0x6a5890) at kernel/qcoreapplication.h:215
#17 0x00007fcdc9e7de61 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#18 0x00007fcdc9e813f8 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#19 0x00007fcdc9e815ac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#20 0x00007fcdcdec4e7c in QEventDispatcherGlib::processEvents (this=0x615de0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#21 0x00007fcdcb29688f in QGuiEventDispatcherGlib::processEvents (this=0x11c3ef0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#22 0x00007fcdcde971d2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 732497264}) at kernel/qeventloop.cpp:149
#23 0x00007fcdcde975a4 in QEventLoop::exec (this=0x7fff2ba905b0, flags={i = 732497344}) at kernel/qeventloop.cpp:201
#24 0x00007fcdcde99a64 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#25 0x00007fcdc26eef16 in kdemain (argc=1, argv=0x613230) at /mnt/ram/paludis/kde-base-kate-4.3.5/work/kate-4.3.5/kate/app/katemain.cpp:257
#26 0x0000000000406fdb in launch (argc=1, _name=0x661e08 "/usr/bin/kate", args=0x661e16 "\001", cwd=0x0, envc=1, envs=<value optimized out>, reset_env=false, tty=0x0, avoid_loops=false, 
    startup_id_str=0x661e33 "dseleznyov;1265127073;365212;5981_TIME107694655") at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kinit/kinit.cpp:670
#27 0x0000000000407d77 in handle_launcher_request (sock=7, who=<value optimized out>) at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kinit/kinit.cpp:1162
#28 0x00000000004083c8 in handle_requests (waitForPid=0) at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kinit/kinit.cpp:1355
#29 0x0000000000408c03 in main (argc=2, argv=0x7fff2ba921d8, envp=0x7fff2ba921f0) at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kinit/kinit.cpp:1786



Application: Kate (kdeinit4), signal: Segmentation fault
[Current thread is 0 (LWP 15688)]

Thread 2 (Thread 0x7fcdbe5f6910 (LWP 15689)):
#0  0x00007fcdcdb0e209 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fcdbef5a296 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7fcdbf21c1e0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2304
#2  0x00007fcdbef5a2b9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x7fcdbf22a2ac) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1438
#3  0x00007fcdcdb0a2f0 in start_thread () from /lib/libpthread.so.0
#4  0x00007fcdca606bbd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fcdce27f740 (LWP 15688)):
[KCrash Handler]
#5  QBasicAtomicInt::ref (this=0x21) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121
#6  0x00007fcdccdab8af in QList (this=0x7fff2ba8f740, l=@0x14467d8) at /usr/include/qt4/QtCore/qlist.h:114
#7  0x00007fcdccdab965 in QForeachContainer (this=0x21, t=@0x14467d8) at /usr/include/qt4/QtCore/qglobal.h:2227
#8  0x00007fcdccda4f04 in KDirWatchPrivate::Entry::propagate_dirty (this=<value optimized out>) at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kio/kio/kdirwatch.cpp:399
#9  0x00007fcdccda4f16 in KDirWatchPrivate::Entry::propagate_dirty (this=<value optimized out>) at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kio/kio/kdirwatch.cpp:404
#10 0x00007fcdccda8915 in KDirWatchPrivate::slotRescan (this=0x79aa10) at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kio/kio/kdirwatch.cpp:1275
#11 0x00007fcdccda9c7c in KDirWatchPrivate::qt_metacall (this=0x79aa10, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff2ba8fa90)
    at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5_build/kio/kdirwatch_p.moc:79
#12 0x00007fcdcdeae067 in QMetaObject::activate (sender=0x79aa78, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fff2ba8fa90) at kernel/qobject.cpp:3267
#13 0x00007fcdcdea99d3 in QObject::event (this=0x79aa78, e=0x14467d8) at kernel/qobject.cpp:1204
#14 0x00007fcdcb1ef766 in QApplicationPrivate::notify_helper (this=0x6a1e60, receiver=0x79aa78, e=0x7fff2ba90300) at kernel/qapplication.cpp:4298
#15 0x00007fcdcb1f7b40 in QApplication::notify (this=0x7fff2ba906c0, receiver=0x79aa78, e=0x7fff2ba90300) at kernel/qapplication.cpp:4263
#16 0x00007fcdcc2f424a in KApplication::notify (this=0x7fff2ba906c0, receiver=0x79aa78, event=0x7fff2ba90300)
    at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kdeui/kernel/kapplication.cpp:302
#17 0x00007fcdcde98823 in QCoreApplication::notifyInternal (this=0x7fff2ba906c0, receiver=0x79aa78, event=0x7fff2ba90300) at kernel/qcoreapplication.cpp:704
#18 0x00007fcdcdec8adc in QTimerInfoList::activateTimers (this=0x6a5960) at kernel/qcoreapplication.h:215
#19 0x00007fcdcdec5184 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#20 0x00007fcdc9e7de61 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#21 0x00007fcdc9e813f8 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#22 0x00007fcdc9e815ac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#23 0x00007fcdcdec4e7c in QEventDispatcherGlib::processEvents (this=0x615de0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#24 0x00007fcdcb29688f in QGuiEventDispatcherGlib::processEvents (this=0x21, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#25 0x00007fcdcde971d2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 732497264}) at kernel/qeventloop.cpp:149
#26 0x00007fcdcde975a4 in QEventLoop::exec (this=0x7fff2ba905b0, flags={i = 732497344}) at kernel/qeventloop.cpp:201
#27 0x00007fcdcde99a64 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#28 0x00007fcdc26eef16 in kdemain (argc=1, argv=0x613230) at /mnt/ram/paludis/kde-base-kate-4.3.5/work/kate-4.3.5/kate/app/katemain.cpp:257
#29 0x0000000000406fdb in launch (argc=1, _name=0x65a778 "/usr/bin/kate", args=0x65a786 "\001", cwd=0x0, envc=1, envs=<value optimized out>, reset_env=false, tty=0x0, avoid_loops=false, 
    startup_id_str=0x65a7a3 "dseleznyov;1265122691;571329;5981_TIME103312904") at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kinit/kinit.cpp:670
#30 0x0000000000407d77 in handle_launcher_request (sock=7, who=<value optimized out>) at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kinit/kinit.cpp:1162
#31 0x00000000004083c8 in handle_requests (waitForPid=0) at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kinit/kinit.cpp:1355
#32 0x0000000000408c03 in main (argc=2, argv=0x7fff2ba921d8, envp=0x7fff2ba921f0) at /mnt/ram/paludis/kde-base-kdelibs-4.3.5/work/kdelibs-4.3.5/kinit/kinit.cpp:1786
Comment 8 Dario Andres 2010-02-05 15:14:22 UTC
*** Bug 225482 has been marked as a duplicate of this bug. ***
Comment 9 Dario Andres 2010-02-10 13:40:20 UTC
*** Bug 215967 has been marked as a duplicate of this bug. ***
Comment 10 Dario Andres 2010-02-10 13:42:14 UTC
From bug 225957:
-- What I was doing when the application crashed:
Kate crashed while saving a file.  The file was mounted with sshfs.  I was also
listening to music on that mount and had no problems with it.  Someone else had
the same backtrace and said that they had tried saving a readonly file, but
there is no reason why the file should have been in a read only mode.
Comment 11 Dario Andres 2010-02-10 13:42:17 UTC
*** Bug 225957 has been marked as a duplicate of this bug. ***
Comment 12 Dario Andres 2010-02-10 13:48:31 UTC
*** Bug 225897 has been marked as a duplicate of this bug. ***
Comment 13 Dario Andres 2010-02-10 13:48:31 UTC
From bug 225905:
-- What I was doing when the application crashed:
I had "hu.srt" open and some other files too.
The crash happened, while i did
"cp hu.srt_backup hu.srt" in terminal.
Comment 14 Dario Andres 2010-02-10 13:48:31 UTC
*** Bug 225905 has been marked as a duplicate of this bug. ***
Comment 15 Dario Andres 2010-02-10 15:55:46 UTC
*** Bug 226142 has been marked as a duplicate of this bug. ***
Comment 16 Dario Andres 2010-02-15 22:24:11 UTC
Steps to reproduce:

- Open KWrite
- Write some dummy text and save it to a file
- Externally delete the file (from Konsole as example)
- In the first "file modified" warning in KWrite select "Cancel"
- Try to save the file
- In the second warning dialog select "Save Nevertheless"
- KWrite crashes

Here using:

Qt: 4.6.1 (kde-qt master commit 46ef51d8bf520bda3eea9e996349694ce1ff3959
        Date:   Sat Jan 30 02:23:21 2010 +0100)
KDE Development Platform: 4.4.63 (KDE 4.4.63 (KDE 4.5 >= 20100209))
kdelibs svn rev. 1090634 / kdebase svn rev. 1090635
on ArchLinux i686 - Kernel 2.6.32.8
Comment 17 David Faure 2010-02-15 23:03:37 UTC
SVN commit 1090729 by dfaure:

Fix the "kdirwatch crash on re-entrancy from the slots" by emitting the signals in a delayed manner.
Fixed for: 4.4.1
BUG: 224229 208486 226674 222547


 M  +21 -9     kdirwatch.cpp  
 M  +20 -16    kdirwatch.h  
 M  +2 -0      kdirwatch_p.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1090729
Comment 18 Dario Andres 2010-02-15 23:36:36 UTC
*** Bug 226553 has been marked as a duplicate of this bug. ***
Comment 19 Dario Andres 2010-02-15 23:37:07 UTC
*** Bug 226277 has been marked as a duplicate of this bug. ***
Comment 20 Dario Andres 2010-02-15 23:37:37 UTC
*** Bug 225822 has been marked as a duplicate of this bug. ***
Comment 21 Dario Andres 2010-02-15 23:39:29 UTC
*** Bug 222974 has been marked as a duplicate of this bug. ***
Comment 22 Dominik Haumann 2010-03-23 17:16:29 UTC
*** Bug 231852 has been marked as a duplicate of this bug. ***
Comment 23 Milian Wolff 2010-04-07 11:27:14 UTC
*** Bug 233588 has been marked as a duplicate of this bug. ***
Comment 24 Frank Reininghaus 2010-05-17 17:23:29 UTC
*** Bug 237930 has been marked as a duplicate of this bug. ***
Comment 25 Dominik Haumann 2010-05-23 00:15:11 UTC
*** Bug 238024 has been marked as a duplicate of this bug. ***
Comment 26 Dominik Haumann 2010-05-25 23:23:14 UTC
*** Bug 238825 has been marked as a duplicate of this bug. ***
Comment 27 Dominik Haumann 2010-05-26 08:55:18 UTC
*** Bug 238853 has been marked as a duplicate of this bug. ***
Comment 28 Luke-Jr 2010-05-26 15:23:07 UTC
What was this fix committed directly to 4.4? I can confirm the bug in in 4.3 at least, so it should have been committed there (or earlier) and merged up.
Comment 29 Dario Andres 2010-11-18 00:49:45 UTC
*** Bug 256704 has been marked as a duplicate of this bug. ***
Comment 30 Dario Andres 2011-01-23 18:36:48 UTC
*** Bug 244741 has been marked as a duplicate of this bug. ***