Bug 175584

Summary: kmail crashes shorlty after having being started. Possibly related to filtering.
Product: [Applications] kmail Reporter: Raúl <rasasi78>
Component: filteringAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: jtamate, myriam, rasasi78, yodayado
Priority: NOR Keywords: triaged
Version: 1.10.3   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: gdb output

Description Raúl 2008-11-19 14:08:27 UTC
Version:           1.10.3 (using 4.1.3 (KDE 4.1.3), Debian backport packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.26-1-amd64

Hello:

I've found this crash shortly after having started kmail component from kontact. According to this backtrace looks related to filtering, quite possible antispam filtering rules.

This is running kontact/kmail into Debian Lenny from kde4 backports.

I've find this quite similar bug, https://bugs.kde.org/show_bug.cgi?id=127107 but as that bug is kde3 related I preferred to open a new one, just in case.

Application: Kontact (kontact), signal SIGABRT
[Thread debugging using libthread_db enabled]
[New Thread 0x7fd3aec8a6f0 (LWP 24261)]
[New Thread 0x419be950 (LWP 24626)]
[KCrash handler]
#5  0x00007fd3ac413ed5 in raise () from /lib/libc.so.6
#6  0x00007fd3ac4153f3 in abort () from /lib/libc.so.6
#7  0x00007fd3acaa55a5 in qt_message_output (msgType=QtFatalMsg, 
    buf=<value optimized out>) at global/qglobal.cpp:2102
#8  0x00007fd3acaa56e7 in qFatal (msg=<value optimized out>)
    at global/qglobal.cpp:2303
#9  0x00007fd397f5a54f in KMFolderImap::take (this=0x1952950, idx=-1)
    at /usr/include/qt4/QtCore/qvector.h:325
#10 0x00007fd397eceb24 in KMFilterMgr::endFiltering (
    this=<value optimized out>, msgBase=0x1d984f0)
    at /tmp/buildd/kdepim-4.1.3/kmail/kmfiltermgr.cpp:132
#11 0x00007fd397ed0f8a in KMFilterMgr::process (this=0x19ccc50, 
    msg=0x1d984f0, set=KMFilterMgr::NoSet, account=true, accountId=245002237)
    at /tmp/buildd/kdepim-4.1.3/kmail/kmfiltermgr.cpp:258
#12 0x00007fd397f2eb1b in KMAcctImap::slotFilterMsg (this=0x19c0c20, 
    msg=0x1d984f0) at /tmp/buildd/kdepim-4.1.3/kmail/kmacctimap.cpp:604
#13 0x00007fd397f320b7 in KMAcctImap::qt_metacall (this=0x19c0c20, 
    _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, 
    _a=0x7fffb6dcec70)
    at /tmp/buildd/kdepim-4.1.3/obj-x86_64-linux-gnu/kmail/kmacctimap.moc:88
#14 0x00007fd3acba96d4 in QMetaObject::activate (sender=0x2207390, 
    from_signal_index=<value optimized out>, to_signal_index=4, 
    argv=0xffffffffffffffff) at kernel/qobject.cpp:3031
#15 0x00007fd39808c9df in KMail::FolderJob::messageRetrieved (this=0x5ec5, 
    _t1=0x1d984f0)
    at /tmp/buildd/kdepim-4.1.3/obj-x86_64-linux-gnu/kmail/folderjob.moc:97
#16 0x00007fd39809b6c8 in KMail::ImapJob::slotGetMessageResult (
    this=0x2207390, job=0x0) at /tmp/buildd/kdepim-4.1.3/kmail/imapjob.cpp:460
#17 0x00007fd39809c717 in KMail::ImapJob::qt_metacall (this=0x2207390, 
    _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, 
    _a=0x7fffb6dceeb0)
    at /tmp/buildd/kdepim-4.1.3/obj-x86_64-linux-gnu/kmail/imapjob.moc:81
#18 0x00007fd3acba96d4 in QMetaObject::activate (sender=0x235cf10, 
    from_signal_index=<value optimized out>, to_signal_index=7, 
    argv=0xffffffffffffffff) at kernel/qobject.cpp:3031
#19 0x00007fd3adac3c12 in KJob::result (this=0x5ec5, _t1=0x235cf10)
    at /tmp/buildd/kde4libs-4.1.3/obj-x86_64-linux-gnu/kdecore/kjob.moc:186
#20 0x00007fd3adac3fd7 in KJob::emitResult (this=0x235cf10)
    at /tmp/buildd/kde4libs-4.1.3/kdecore/jobs/kjob.cpp:290
#21 0x00007fd3ac00b230 in KIO::SimpleJob::slotFinished (this=0x235cf10)
    at /tmp/buildd/kde4libs-4.1.3/kio/kio/job.cpp:498
#22 0x00007fd3ac00e683 in KIO::TransferJob::slotFinished (this=0x235cf10)
    at /tmp/buildd/kde4libs-4.1.3/kio/kio/job.cpp:967
#23 0x00007fd3ac00f3e5 in KIO::TransferJob::qt_metacall (this=0x235cf10, 
    _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, 
    _a=0x7fffb6dcf2b0)
    at /tmp/buildd/kde4libs-4.1.3/obj-x86_64-linux-gnu/kio/jobclasses.moc:336
#24 0x00007fd3acba96d4 in QMetaObject::activate (sender=0x1c47b70, 
    from_signal_index=<value optimized out>, to_signal_index=8, 
    argv=0xffffffffffffffff) at kernel/qobject.cpp:3031
#25 0x00007fd3ac0c7f61 in KIO::SlaveInterface::dispatch (this=0x1c47b70, 
    _cmd=104, rawdata=<value optimized out>)
    at /tmp/buildd/kde4libs-4.1.3/kio/kio/slaveinterface.cpp:175
#26 0x00007fd3ac0c4dc2 in KIO::SlaveInterface::dispatch (this=0x1c47b70)
    at /tmp/buildd/kde4libs-4.1.3/kio/kio/slaveinterface.cpp:90
#27 0x00007fd3ac0b5e23 in KIO::Slave::gotInput (this=0x1c47b70)
    at /tmp/buildd/kde4libs-4.1.3/kio/kio/slave.cpp:322
#28 0x00007fd3ac0b8548 in KIO::Slave::qt_metacall (this=0x1c47b70, 
    _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffb6dcf6d0)
    at /tmp/buildd/kde4libs-4.1.3/obj-x86_64-linux-gnu/kio/slave.moc:75
#29 0x00007fd3acba96d4 in QMetaObject::activate (sender=0x1c5d0b0, 
    from_signal_index=<value optimized out>, to_signal_index=4, 
    argv=0xffffffffffffffff) at kernel/qobject.cpp:3031
#30 0x00007fd3abfd8ba0 in KIO::ConnectionPrivate::dequeue (this=0x1c5cec0)
    at /tmp/buildd/kde4libs-4.1.3/kio/kio/connection.cpp:82
#31 0x00007fd3abfd8cda in KIO::Connection::qt_metacall (this=0x1c5d0b0, 
    _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x24abd80)
    at /tmp/buildd/kde4libs-4.1.3/obj-x86_64-linux-gnu/kio/connection.moc:72
#32 0x00007fd3acba4345 in QObject::event (this=0x1c5d0b0, e=0x2561b90)
    at kernel/qobject.cpp:1155
#33 0x00007fd3ad047a5d in QApplicationPrivate::notify_helper (this=0x126c050, 
    receiver=0x1c5d0b0, e=0x2561b90) at kernel/qapplication.cpp:3803
#34 0x00007fd3ad04f7da in QApplication::notify (this=0x7fffb6dd0230, 
    receiver=0x1c5d0b0, e=0x2561b90) at kernel/qapplication.cpp:3768
#35 0x00007fd3ae04185b in KApplication::notify (this=0x7fffb6dd0230, 
    receiver=0x1c5d0b0, event=0x2561b90)
    at /tmp/buildd/kde4libs-4.1.3/kdeui/kernel/kapplication.cpp:311
#36 0x00007fd3acb95381 in QCoreApplication::notifyInternal (
    this=0x7fffb6dd0230, receiver=0x1c5d0b0, event=0x2561b90)
    at kernel/qcoreapplication.cpp:587
#37 0x00007fd3acb9601a in QCoreApplicationPrivate::sendPostedEvents (
    receiver=0x0, event_type=0, data=0x12520e0)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#38 0x00007fd3acbbda83 in postEventSourceDispatch (s=<value optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:214
#39 0x00007fd3a701b78b in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#40 0x00007fd3a701ef5d in ?? () from /usr/lib/libglib-2.0.so.0
#41 0x00007fd3a701f11b in g_main_context_iteration ()
   from /usr/lib/libglib-2.0.so.0
#42 0x00007fd3acbbd70f in QEventDispatcherGlib::processEvents (
    this=0x126af60, flags=<value optimized out>)
    at kernel/qeventdispatcher_glib.cpp:319
#43 0x00007fd3ad0d944f in QGuiEventDispatcherGlib::processEvents (
    this=0x5ec5, flags=<value optimized out>)
    at kernel/qguieventdispatcher_glib.cpp:198
#44 0x00007fd3acb93ca2 in QEventLoop::processEvents (
    this=<value optimized out>, flags={i = -1227030448})
    at kernel/qeventloop.cpp:143
#45 0x00007fd3acb93e2d in QEventLoop::exec (this=0x7fffb6dd0090, flags=
      {i = -1227030368}) at kernel/qeventloop.cpp:194
#46 0x00007fd3acb962dd in QCoreApplication::exec ()
    at kernel/qcoreapplication.cpp:845
#47 0x0000000000404821 in main (argc=1, argv=0x7fffb6dd0808)
    at /tmp/buildd/kdepim-4.1.3/kontact/src/main.cpp:218
#0  0x00007fd3ac47fff1 in nanosleep () from /lib/libc.so.6
Comment 1 Raúl 2008-11-19 14:09:47 UTC
I forgot to add this ~/.xsession-errors excerpt.

kontact(24261) KABC::ResourceSlox::~ResourceSlox: KABC::~ResourceSlox() done
kontact(24261) KStatusBar::removeItem: KStatusBar::removeItem: bad item id:  2
ASSERT failure in QVector<T>::operator[]: "index out of range", file /usr/include/qt4/QtCore/qvector.h, line 325
*** KMail got signal 6 (Crashing)
KCrash: Application 'kontact' crashing...
QAbstractSocket::waitForBytesWritten() is not allowed in UnconnectedState
Comment 2 Jaime Torres 2008-11-19 15:51:15 UTC
It has more information on the still open bug #127107, but for kde4.

Is this a case where it is possible to use bugzilla feature depends on?
Comment 3 Thomas McGuire 2008-11-19 19:30:42 UTC
The backtrace in bug 127107 looks totally unrelated.
Comment 4 Jaime Torres 2008-11-26 12:52:11 UTC
Bug 175981 looks like a dup.
Comment 5 Thomas McGuire 2008-11-27 17:31:36 UTC
*** Bug 175981 has been marked as a duplicate of this bug. ***
Comment 6 Myriam Schweingruber 2009-04-19 20:39:46 UTC
Using Kmail 1.11.2 in Kubuntu 9.04: crashes when filtering mail, I can reproduce this bug almost every time, sometimes early after the start, sometimes after a few minutes. See the following backtrace. I will attach the konsole output too.

Application: KMail (kmail), signal SIGSEGV
0x00007ffac9eb8d21 in nanosleep () from /lib/libc.so.6
Current language:  auto; currently c
[Current thread is 0 (LWP 21003)]

Thread 2 (Thread 0x7ffaaedb4950 (LWP 24004)):
#0  0x00007ffac9eef742 in select () from /lib/libc.so.6
#1  0x00007ffacaa60f06 in QProcessManager::run (this=0xdf2200) at io/qprocess_unix.cpp:305
#2  0x00007ffaca999952 in QThreadPrivate::start (arg=0xdf2200) at thread/qthread_unix.cpp:189
#3  0x00007ffac59a93ba in start_thread (arg=<value optimized out>) at pthread_create.c:297
#4  0x00007ffac9ef6fcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffacf50e750 (LWP 21003)):
[KCrash Handler]
#5  KMFolder::open (this=0x22222222, owner=0x7fface58463e "kmcommand") at /build/buildd/kdepim-4.2.2/kmail/kmfolder.cpp:531
#6  0x00007fface24ab97 in KMCommand::keepFolderOpen (this=0x61f5bc0, folder=0x22222222) at /build/buildd/kdepim-4.2.2/kmail/kmcommands.cpp:460
#7  0x00007fface2655cc in KMCommand::slotStart (this=0x61f5bc0) at /build/buildd/kdepim-4.2.2/kmail/kmcommands.cpp:264
#8  0x00007fface2565e2 in KMCommand::qt_metacall (this=0x61f5bc0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffd7564a00)
    at /build/buildd/kdepim-4.2.2/obj-x86_64-linux-gnu/kmail/kmcommands.moc:86
#9  0x00007ffacaa981f2 in QMetaObject::activate (sender=0x3ae8720, from_signal_index=<value optimized out>, to_signal_index=4, argv=0xfffffff3) at kernel/qobject.cpp:3069
#10 0x00007ffacaa9d52f in QSingleShotTimer::timerEvent (this=0x3ae8720) at kernel/qtimer.cpp:298
#11 0x00007ffacaa924d3 in QObject::event (this=0x3ae8720, e=0x7fface58463e) at kernel/qobject.cpp:1082
#12 0x00007ffacb1c783d in QApplicationPrivate::notify_helper (this=0xdf20b0, receiver=0x3ae8720, e=0x7fffd75650c0) at kernel/qapplication.cpp:4084
#13 0x00007ffacb1cfa2a in QApplication::notify (this=0x7fffd7565520, receiver=0x3ae8720, e=0x7fffd75650c0) at kernel/qapplication.cpp:4049
#14 0x00007ffacef5826b in KApplication::notify (this=0x7fffd7565520, receiver=0x3ae8720, event=0x7fffd75650c0) at /build/buildd/kde4libs-4.2.2/kdeui/kernel/kapplication.cpp:307
#15 0x00007ffacaa8275c in QCoreApplication::notifyInternal (this=0x7fffd7565520, receiver=0x3ae8720, event=0x7fffd75650c0) at kernel/qcoreapplication.cpp:602
#16 0x00007ffacaaaf7f6 in QTimerInfoList::activateTimers (this=0xdf3b60) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#17 0x00007ffacaaabf0d in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:164
#18 0x00007ffac1b7b20a in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#19 0x00007ffac1b7e8e0 in ?? () from /usr/lib/libglib-2.0.so.0
#20 0x00007ffac1b7ea7c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#21 0x00007ffacaaabe6f in QEventDispatcherGlib::processEvents (this=0xb4d0c0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:323
#22 0x00007ffacb25fc9f in QGuiEventDispatcherGlib::processEvents (this=0x22222222, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#23 0x00007ffacaa81002 in QEventLoop::processEvents (this=<value optimized out>, flags={i = -682208464}) at kernel/qeventloop.cpp:149
#24 0x00007ffacaa813cd in QEventLoop::exec (this=0x7fffd7565370, flags={i = -682208384}) at kernel/qeventloop.cpp:200
#25 0x00007ffacaa83694 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#26 0x000000000040309b in main (argc=<value optimized out>, argv=<value optimized out>) at /build/buildd/kdepim-4.2.2/kmail/main.cpp:146
Comment 7 Myriam Schweingruber 2009-04-19 20:52:12 UTC
Created attachment 32937 [details]
gdb output

It crashed after selecting 8 mails, then clicking on "filter as Spam" button.
Comment 8 Thomas McGuire 2009-05-13 23:54:18 UTC
SVN commit 967749 by tmcguire:

When doing online IMAP filtering of messages that actually do not exist,
don't crash.
This happens if the sernum of some messages were stored in the "unfiltered" config file.
During filtering, the message listing was finished, and those messages were removed from
the index, as they were no longer on the server.

BUG: 175584


 M  +15 -2     kmacctimap.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=967749
Comment 9 Thomas McGuire 2009-05-20 13:40:46 UTC
SVN commit 970512 by tmcguire:

Backport r967749 by tmcguire from trunk to the 4.2 branch:

When doing online IMAP filtering of messages that actually do not exist,
don't crash.
This happens if the sernum of some messages were stored in the "unfiltered" config file.
During filtering, the message listing was finished, and those messages were removed from
the index, as they were no longer on the server.

CCBUG: 175584



 M  +15 -2     kmacctimap.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=970512