Bug 325443 - Akonadi IMAP crashed when exiting KDE
Summary: Akonadi IMAP crashed when exiting KDE
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 4.11
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Kevin Ottens
URL:
Keywords: drkonqi
: 298267 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-29 22:37 UTC by Dennis Schridde
Modified: 2013-12-03 16:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2013-09-29 22:37:30 UTC
Application: akonadi_imap_resource (4.11)
KDE Platform Version: 4.11.1
Qt Version: 4.8.5
Operating System: Linux 3.11.2-gentoo x86_64
Distribution: "Gentoo Base System release 2.2"

-- Information about the crash:
- What I was doing when the application crashed:

I exited KDE (by shutting down the computer) and Akonadi IMAP crashed. This is not the first time it happened, but it also does not happen every time.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Kynes vom Typ IMAP-E-Mail-Server (akonadi_imap_resource), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7febeccfa780 (LWP 3112))]

Thread 3 (Thread 0x7febe706d700 (LWP 3478)):
#0  0x0000003a040da4dd in read () from /lib64/libc.so.6
#1  0x0000003f7a086f80 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x0000003f7a0484ec in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#3  0x0000003f7a04895b in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x0000003f7a048ad4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x0000003f839aa2ce in QEventDispatcherGlib::processEvents (this=0x7febd80045d0, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#6  0x0000003f8397badf in QEventLoop::processEvents (this=this@entry=0x7febe706ce60, flags=...) at kernel/qeventloop.cpp:149
#7  0x0000003f8397bdcd in QEventLoop::exec (this=this@entry=0x7febe706ce60, flags=...) at kernel/qeventloop.cpp:204
#8  0x0000003f83879860 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:536
#9  0x0000003f8387c0ff in QThreadPrivate::start (arg=0x1a7a3d0) at thread/qthread_unix.cpp:338
#10 0x0000003a04807dff in start_thread () from /lib64/libpthread.so.0
#11 0x0000003a040e701d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7febd7fff700 (LWP 11792)):
#0  0x0000003a040de2dd in poll () from /lib64/libc.so.6
#1  0x0000003f7a0489c4 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x0000003f7a048ad4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x0000003f839aa2ce in QEventDispatcherGlib::processEvents (this=0x7febe0002f80, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#4  0x0000003f8397badf in QEventLoop::processEvents (this=this@entry=0x7febd7ffee60, flags=...) at kernel/qeventloop.cpp:149
#5  0x0000003f8397bdcd in QEventLoop::exec (this=this@entry=0x7febd7ffee60, flags=...) at kernel/qeventloop.cpp:204
#6  0x0000003f83879860 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:536
#7  0x0000003f8387c0ff in QThreadPrivate::start (arg=0x19886c0) at thread/qthread_unix.cpp:338
#8  0x0000003a04807dff in start_thread () from /lib64/libpthread.so.0
#9  0x0000003a040e701d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7febeccfa780 (LWP 3112)):
[KCrash Handler]
#6  0x0000003f8398d424 in QObject::metaObject (this=0x19d2b20) at .moc/release-shared/moc_qobject.cpp:94
#7  0x0000003f839870c3 in QMetaObject::invokeMethod (obj=obj@entry=0x19d2b20, member=0x1aa5e68 "executeNext", type=type@entry=Qt::QueuedConnection, ret=..., val0=..., val1=..., val2=..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at kernel/qmetaobject.cpp:1166
#8  0x0000003f8399a51d in invokeMethod (val9=..., val8=..., val7=..., val6=..., val5=..., val4=..., val3=..., val2=..., val1=..., val0=..., type=Qt::QueuedConnection, member=<optimized out>, obj=0x19d2b20) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs.h:418
#9  QTimer::singleShot (msec=0, receiver=0x19d2b20, member=0x7febee57ea59 "1executeNext()") at kernel/qtimer.cpp:360
#10 0x00007febee4fa30b in Akonadi::ResourceScheduler::taskDone (this=0x19d2b20) at /var/tmp/portage/kde-base/kdepimlibs-4.11.1/work/kdepimlibs-4.11.1/akonadi/resourcescheduler.cpp:246
#11 0x00007febee4f5e54 in Akonadi::ResourceBase::cancelTask (this=this@entry=0x198b790) at /var/tmp/portage/kde-base/kdepimlibs-4.11.1/work/kdepimlibs-4.11.1/akonadi/resourcebase.cpp:986
#12 0x00007febee4f5f02 in Akonadi::ResourceBase::cancelTask (this=0x198b790, msg=...) at /var/tmp/portage/kde-base/kdepimlibs-4.11.1/work/kdepimlibs-4.11.1/akonadi/resourcebase.cpp:992
#13 0x000000000041fd1d in ResourceState::cancelTask (this=0x1b92f10, errorString=...) at /var/tmp/portage/kde-base/kdepim-runtime-4.11.1/work/kdepim-runtime-4.11.1/resources/imap/resourcestate.cpp:428
#14 0x00000000004491e1 in ResourceTask::cancelTask (this=this@entry=0x1da8790, errorString=...) at /var/tmp/portage/kde-base/kdepim-runtime-4.11.1/work/kdepim-runtime-4.11.1/resources/imap/resourcetask.cpp:309
#15 0x00000000004492d1 in ResourceTask::onPoolDisconnect (this=0x1da8790) at /var/tmp/portage/kde-base/kdepim-runtime-4.11.1/work/kdepim-runtime-4.11.1/resources/imap/resourcetask.cpp:139
#16 0x000000000044a055 in ResourceTask::qt_static_metacall (_o=0x19d2b20, _c=13, _id=0, _a=0x7478654e65747563) at /var/tmp/portage/kde-base/kdepim-runtime-4.11.1/work/kdepim-runtime-4.11.1_build/resources/imap/resourcetask.moc:71
#17 0x0000003f83990f38 in QMetaObject::activate (sender=sender@entry=0x19d37c0, m=m@entry=0x46d880 <SessionPool::staticMetaObject>, local_signal_index=local_signal_index@entry=7, argv=argv@entry=0x0) at kernel/qobject.cpp:3547
#18 0x0000000000458b6a in disconnectDone (this=0x19d37c0) at /var/tmp/portage/kde-base/kdepim-runtime-4.11.1/work/kdepim-runtime-4.11.1_build/resources/imap/sessionpool.moc:166
#19 SessionPool::disconnect (this=this@entry=0x19d37c0, termination=termination@entry=SessionPool::LogoutSession) at /var/tmp/portage/kde-base/kdepim-runtime-4.11.1/work/kdepim-runtime-4.11.1/resources/imap/sessionpool.cpp:130
#20 0x0000000000458da7 in SessionPool::~SessionPool (this=0x19d37c0, __in_chrg=<optimized out>) at /var/tmp/portage/kde-base/kdepim-runtime-4.11.1/work/kdepim-runtime-4.11.1/resources/imap/sessionpool.cpp:54
#21 0x0000000000458eb9 in SessionPool::~SessionPool (this=0x19d37c0, __in_chrg=<optimized out>) at /var/tmp/portage/kde-base/kdepim-runtime-4.11.1/work/kdepim-runtime-4.11.1/resources/imap/sessionpool.cpp:55
#22 0x0000003f83993857 in QObjectPrivate::deleteChildren (this=this@entry=0x1993590) at kernel/qobject.cpp:1907
#23 0x0000003f83995e5f in QObject::~QObject (this=0x198b790, __in_chrg=<optimized out>) at kernel/qobject.cpp:926
#24 0x0000000000418469 in ImapResource::~ImapResource (this=0x198b790, __in_chrg=<optimized out>) at /var/tmp/portage/kde-base/kdepim-runtime-4.11.1/work/kdepim-runtime-4.11.1/resources/imap/imapresource.cpp:179
#25 0x00007febee4f0785 in Akonadi::ResourceBase::init (r=r@entry=0x198b790) at /var/tmp/portage/kde-base/kdepimlibs-4.11.1/work/kdepimlibs-4.11.1/akonadi/resourcebase.cpp:549
#26 0x000000000041deb3 in Akonadi::ResourceBase::init<ImapResource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/akonadi/resourcebase.h:192
#27 0x0000003a040219e5 in __libc_start_main () from /lib64/libc.so.6
#28 0x00000000004167b5 in _start ()

Reported using DrKonqi
Comment 1 Daniel Vrátil 2013-10-01 10:14:05 UTC
Git commit 9406e45979a0b363b0262845c452dcd35dacb397 by Dan Vrátil.
Committed on 01/10/2013 at 10:12.
Pushed by dvratil into branch 'KDE/4.11'.

Disconnect session pool manually in ImapResource destructor

Otherwise the pool is disconnected when destroyed from QObject destructor.
Disconnecting while there's a task pending in ResourceScheduler leads to
calling QObject::invokeMethod() on the same QObject, which crashes, because
some of it's data has been already destroyed.
FIXED-IN: 4.11.3

M  +6    -0    resources/imap/imapresource.cpp

http://commits.kde.org/kdepim-runtime/9406e45979a0b363b0262845c452dcd35dacb397
Comment 2 Christian Mollekopf 2013-12-03 16:48:15 UTC
*** Bug 298267 has been marked as a duplicate of this bug. ***