Bug 213956

Summary: Kontact crashes when reading mail on an IMAP server
Product: [Applications] kontact Reporter: Nicos Gollan <gtdev>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: andresbajotierra
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nicos Gollan 2009-11-10 11:07:07 UTC
Application that crashed: kontact
Version of the application: 4.3.2
KDE Version: 4.3.2 (KDE 4.3.2)
Qt Version: 4.5.3
Operating System: Linux 2.6.31-1-amd64 x86_64
Distribution: Debian GNU/Linux unstable (sid)

What I was doing when the application crashed:
At the moment, this happens every time:

* Start Kontact
* Navigate to a mailbox (IMAP)
* Click on a mail
* Switch to another desktop and wait a few seconds
* Kontact segfaults.

 -- Backtrace:
Application: Kontact (kontact), signal: Segmentation fault
The current source language is "auto; currently c".
[Current thread is 1 (Thread 0x7f306d768750 (LWP 4613))]

Thread 3 (Thread 0x7f305168c910 (LWP 4618)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:220
#1  0x00007f306c08c477 in QWaitConditionPrivate::wait (this=0x2608698, mutex=0x2608690, time=30000) at thread/qwaitcondition_unix.cpp:85
#2  QWaitCondition::wait (this=0x2608698, mutex=0x2608690, time=30000) at thread/qwaitcondition_unix.cpp:159
#3  0x00007f306c0822d1 in QThreadPoolThread::run (this=0x2433e20) at concurrent/qthreadpool.cpp:140
#4  0x00007f306c08b4a5 in QThreadPrivate::start (arg=0x2433e20) at thread/qthread_unix.cpp:188
#5  0x00007f306504f73a in start_thread (arg=<value optimized out>) at pthread_create.c:300
#6  0x00007f306ae7a2fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f305085e910 (LWP 4623)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:220
#1  0x00007f306c08c477 in QWaitConditionPrivate::wait (this=0x2608698, mutex=0x2608690, time=30000) at thread/qwaitcondition_unix.cpp:85
#2  QWaitCondition::wait (this=0x2608698, mutex=0x2608690, time=30000) at thread/qwaitcondition_unix.cpp:159
#3  0x00007f306c0822d1 in QThreadPoolThread::run (this=0x23c0c10) at concurrent/qthreadpool.cpp:140
#4  0x00007f306c08b4a5 in QThreadPrivate::start (arg=0x23c0c10) at thread/qthread_unix.cpp:188
#5  0x00007f306504f73a in start_thread (arg=<value optimized out>) at pthread_create.c:300
#6  0x00007f306ae7a2fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()
The current source language is "auto; currently asm".

Thread 1 (Thread 0x7f306d768750 (LWP 4613)):
[KCrash Handler]
#5  DwEntity::Headers (this=0x7f3070000017) at ../../mimelib/entity.cpp:241
#6  0x00007f3056439341 in KMMessage::rawHeaderField (this=0x28d7cf0, name=...) at ../../kmail/kmmessage.cpp:1958
#7  0x00007f305643b595 in KMMessage::from (this=0x28d7cf0) at ../../kmail/kmmessage.cpp:1710
#8  0x00007f3056691450 in KMail::FancyHeaderStyle::format (this=<value optimized out>, message=0x28d7cf0, strategy=0x1a5cca0, vCardName=..., printing=false, topLevel=true)
    at ../../kmail/headerstyle.cpp:457
#9  0x00007f305652cb55 in KMReaderWin::writeMsgHeader (this=0x1f7b6e0, aMsg=0x28d7cf0, hasVCard=false, topLevel=4) at ../../kmail/kmreaderwin.cpp:1783
#10 0x00007f30565336f0 in KMReaderWin::parseMsg (this=0x1f7b6e0, aMsg=0x28d7cf0) at ../../kmail/kmreaderwin.cpp:1668
#11 0x00007f30565229fa in KMReaderWin::displayMessage (this=0x1f7b6e0) at ../../kmail/kmreaderwin.cpp:1605
#12 0x00007f3056522be5 in KMReaderWin::updateReaderWin (this=0x1f7b6e0) at ../../kmail/kmreaderwin.cpp:1545
#13 0x00007f305652d71d in KMReaderWin::setMsg (this=0x1f7b6e0, aMsg=0x28d7cf0, force=true) at ../../kmail/kmreaderwin.cpp:1347
#14 0x00007f305652e565 in KMReaderWin::slotMessageArrived (this=0x1f7b6e0, msg=0x28d7cf0) at ../../kmail/kmreaderwin.cpp:935
#15 0x00007f305652e837 in KMReaderWin::qt_metacall (this=0x1f7b6e0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff997a4590) at ./kmreaderwin.moc:196
#16 0x00007f306c185df2 in QMetaObject::activate (sender=0x2904860, from_signal_index=<value optimized out>, to_signal_index=4, argv=0x6d6f72) at kernel/qobject.cpp:3112
#17 0x00007f305671e99f in KMail::FolderJob::messageRetrieved (this=0x7f3070000017, _t1=0x28d7cf0) at ./folderjob.moc:99
#18 0x00007f305672a408 in KMail::ImapJob::slotGetMessageResult (this=0x2904860, job=0x290c480) at ../../kmail/imapjob.cpp:460
#19 0x00007f305672d667 in KMail::ImapJob::qt_metacall (this=0x2904860, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff997a47d0) at ./imapjob.moc:82
#20 0x00007f306c185df2 in QMetaObject::activate (sender=0x290c480, from_signal_index=<value optimized out>, to_signal_index=7, argv=0x6d6f72) at kernel/qobject.cpp:3112
#21 0x00007f306c55de52 in KJob::result (this=0x7f3070000017, _t1=0x290c480) at ./kjob.moc:188
#22 0x00007f306c55e1cf in KJob::emitResult (this=0x290c480) at ../../kdecore/jobs/kjob.cpp:304
#23 0x00007f30699e4ec0 in KIO::SimpleJob::slotFinished (this=0x290c480) at ../../kio/kio/job.cpp:477
#24 0x00007f30699e5383 in KIO::TransferJob::slotFinished (this=0x290c480) at ../../kio/kio/job.cpp:948
#25 0x00007f30699e009d in KIO::TransferJob::qt_metacall (this=0x290c480, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff997a4bd0) at ./jobclasses.moc:343
#26 0x00007f306c185df2 in QMetaObject::activate (sender=0x23d5780, from_signal_index=<value optimized out>, to_signal_index=8, argv=0x6d6f72) at kernel/qobject.cpp:3112
#27 0x00007f3069aa2021 in KIO::SlaveInterface::dispatch (this=0x23d5780, _cmd=104, rawdata=<value optimized out>) at ../../kio/kio/slaveinterface.cpp:175
#28 0x00007f3069a9eab2 in KIO::SlaveInterface::dispatch (this=0x23d5780) at ../../kio/kio/slaveinterface.cpp:91
#29 0x00007f3069a9151e in KIO::Slave::gotInput (this=0x23d5780) at ../../kio/kio/slave.cpp:322
#30 0x00007f3069a93848 in KIO::Slave::qt_metacall (this=0x23d5780, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fff997a4ff0) at ./slave.moc:76
#31 0x00007f306c185df2 in QMetaObject::activate (sender=0x23d90b0, from_signal_index=<value optimized out>, to_signal_index=4, argv=0x6d6f72) at kernel/qobject.cpp:3112
#32 0x00007f30699add91 in KIO::ConnectionPrivate::dequeue (this=0x23d8f10) at ../../kio/kio/connection.cpp:82
#33 0x00007f30699ae1ea in KIO::Connection::qt_metacall (this=0x23d90b0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x28d7960) at ./connection.moc:73
#34 0x00007f306c1806c8 in QObject::event (this=0x23d90b0, e=0x290c8c0) at kernel/qobject.cpp:1110
#35 0x00007f306b5ea01d in QApplicationPrivate::notify_helper (this=0x161c900, receiver=0x23d90b0, e=0x290c8c0) at kernel/qapplication.cpp:4065
#36 0x00007f306b5f207a in QApplication::notify (this=0x7fff997a5b50, receiver=0x23d90b0, e=0x290c8c0) at kernel/qapplication.cpp:4030
#37 0x00007f306cb100db in KApplication::notify (this=0x7fff997a5b50, receiver=0x23d90b0, event=0x290c8c0) at ../../kdeui/kernel/kapplication.cpp:302
#38 0x00007f306c170c9c in QCoreApplication::notifyInternal (this=0x7fff997a5b50, receiver=0x23d90b0, event=0x290c8c0) at kernel/qcoreapplication.cpp:610
#39 0x00007f306c1718e4 in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x15ec340) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#40 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x15ec340) at kernel/qcoreapplication.cpp:1247
#41 0x00007f306c1997d3 in QCoreApplication::sendPostedEvents (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#42 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:276
#43 0x00007f30652a012a in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#44 0x00007f30652a3988 in ?? () from /lib/libglib-2.0.so.0
#45 0x00007f30652a3b3c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#46 0x00007f306c19939c in QEventDispatcherGlib::processEvents (this=0x15ebf70, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:407
#47 0x00007f306b680f1f in QGuiEventDispatcherGlib::processEvents (this=0x7f3070000017, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#48 0x00007f306c16f562 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#49 0x00007f306c16f934 in QEventLoop::exec (this=0x7fff997a59b0, flags=...) at kernel/qeventloop.cpp:201
#50 0x00007f306c171ba4 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#51 0x0000000000404751 in main (argc=1, argv=0x7fff997a6138) at ../../../kontact/src/main.cpp:218
The current source language is "auto; currently c".

This bug may be a duplicate of or related to bug 204960

Reported using DrKonqi
Comment 1 Nicos Gollan 2009-11-10 11:20:15 UTC
I'll probably need to add some info here: my $HOME is mounted from NFS, and my system crashed hard, so there were probably quite a few stale locks somewhere in the system, so KMail was probably unable to open some files for reading or writing. I guess that is the case since for the short time it was running, no mail contents were shown.

Deleting the "imap" directory in $HOME/.kde/share/apps/kmail seems to have fixed the issue, but of course that means re-downloading a whole lot of data from the IMAP server. If that had occurred with locally stored mail, the results would probably have been less favourable. Just moving the files off the NFS mount and copying them back did not help.
Comment 2 Dario Andres 2009-11-10 13:35:42 UTC
Merging with bug 193891. Thanks
Comment 3 Dario Andres 2009-11-10 13:37:40 UTC

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