Bug 266358 - Akonadi agent crashes when sending e-mail and on KDE login
Summary: Akonadi agent crashes when sending e-mail and on KDE login
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Mail Dispatcher Agent (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-15 08:55 UTC by Alexander van Loon
Modified: 2011-02-26 22:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Valgrind log of Akonadi (145.42 KB, application/octet-stream)
2011-02-16 19:45 UTC, Alexander van Loon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander van Loon 2011-02-15 08:55:49 UTC
Application: akonadi_maildispatcher_agent (0.1)
KDE Platform Version: 4.6.00 (4.6.0)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-25-generic x86_64
Distribution: Ubuntu 10.10

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

I’ve been using the beta version (4.6 beta 4) of KDE PIM for some months now, but yesterday was the first time I ever encountered this issue. I simply had Kontact opened for quite some time, idling, and then I tried to send an e-mail. This triggered the crash of Akonadi Agent. After restarting or logging in again Kontact finally did send the e-mail, so I thought everything was fine, If I remember correctly. Then I logged in to KDE today, and right after the login, without me doing anything (didn’t start Kontact yet) the crash message telling me that Akonadi Agent failed occurs again.

Bug #253150 was suggested as a duplicate of my issue, but the backtrace and the cause of the crash were quite different, so I filed this new bug report.

The crash can be reproduced some of the time.

-- Backtrace:
Application: Akonadi Agent (akonadi_maildispatcher_agent), signal: Segmentation fault
[KCrash Handler]
#6  QSharedDataPointer (one=..., other=...) at /usr/include/qt4/QtCore/qshareddata.h:93
#7  assignEntityPrivate (one=..., other=...) at ../../akonadi/entity.cpp:49
#8  0x00007f55731ec5ae in Akonadi::Entity::operator= (this=0x1b9f658, other=...) at ../../akonadi/entity.cpp:116
#9  0x000000000040a30b in operator= (this=0x1b9f640, item=...) at /usr/include/KDE/Akonadi/../../akonadi/item.h:116
#10 MailDispatcherAgent::Private::itemFetched (this=0x1b9f640, item=...) at ../../../agents/maildispatcher/maildispatcheragent.cpp:257
#11 0x000000000040b372 in MailDispatcherAgent::qt_metacall (this=0x1c04e40, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffe0ef4bd0) at ./maildispatcheragent.moc:101
#12 0x00007f5572c12b27 in QMetaObject::activate (sender=0x1b93a00, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3280
#13 0x000000000040be90 in OutboxQueue::itemReady (this=0x1b9f658, _t1=<value optimized out>) at ./outboxqueue.moc:119
#14 0x000000000040c7ba in OutboxQueue::Private::itemFetched (this=0x1b86c70, job=<value optimized out>) at ../../../agents/maildispatcher/outboxqueue.cpp:274
#15 0x000000000040fc25 in OutboxQueue::qt_metacall (this=0x1b93a00, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffe0ef4de0) at ./outboxqueue.moc:100
#16 0x00007f5572c12b27 in QMetaObject::activate (sender=0x1b5b850, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3280
#17 0x00007f557245aa82 in KJob::result (this=0x1b9f658, _t1=0x1b5b850) at ./kjob.moc:194
#18 0x00007f557245ad20 in KJob::emitResult (this=0x1b5b850) at ../../kdecore/jobs/kjob.cpp:312
#19 0x00007f55732a0c6c in Akonadi::JobPrivate::handleResponse (this=<value optimized out>, tag=<value optimized out>, data=<value optimized out>) at ../../akonadi/job.cpp:66
#20 0x00007f55732db4a8 in Akonadi::SessionPrivate::dataReceived (this=0x1bfca80) at ../../akonadi/session.cpp:218
#21 0x00007f55732dbe0d in Akonadi::Session::qt_metacall (this=0x1bfa540, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffe0ef5130) at ./session.moc:96
#22 0x00007f5572c12b27 in QMetaObject::activate (sender=0x1c16c40, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3280
#23 0x00007f5572c5d318 in QIODevice::qt_metacall (this=0x1c16c40, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffe0ef5270) at .moc/release-shared/moc_qiodevice.cpp:77
#24 0x00007f556ffa4860 in QLocalSocket::qt_metacall (this=0x1b9f658, _c=81, _id=0, _a=0x1) at .moc/release-shared/moc_qlocalsocket.cpp:81
#25 0x00007f5572c12b27 in QMetaObject::activate (sender=0x1c15270, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3280
#26 0x00007f556ff9d7ef in QAbstractSocketPrivate::canReadNotification (this=0x1c17aa0) at socket/qabstractsocket.cpp:639
#27 0x00007f556ff8c0a1 in QReadNotifier::event (this=<value optimized out>, e=0x51) at socket/qnativesocketengine.cpp:1103
#28 0x00007f5570c63fdc in QApplicationPrivate::notify_helper (this=0x1b09e80, receiver=0x1b623e0, e=0x7fffe0ef5820) at kernel/qapplication.cpp:4396
#29 0x00007f5570c69aed in QApplication::notify (this=0x7fffe0ef5b00, receiver=0x1b623e0, e=0x7fffe0ef5820) at kernel/qapplication.cpp:4277
#30 0x00007f55719f3a36 in KApplication::notify (this=0x7fffe0ef5b00, receiver=0x1b623e0, event=0x7fffe0ef5820) at ../../kdeui/kernel/kapplication.cpp:311
#31 0x00007f5572bfacdc in QCoreApplication::notifyInternal (this=0x7fffe0ef5b00, receiver=0x1b623e0, event=0x7fffe0ef5820) at kernel/qcoreapplication.cpp:732
#32 0x00007f5572c2754a in sendEvent (source=0x1b0da20) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#33 socketNotifierSourceDispatch (source=0x1b0da20) at kernel/qeventdispatcher_glib.cpp:110
#34 0x00007f556e5d3342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#35 0x00007f556e5d72a8 in ?? () from /lib/libglib-2.0.so.0
#36 0x00007f556e5d745c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#37 0x00007f5572c27193 in QEventDispatcherGlib::processEvents (this=0x1aefcd0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#38 0x00007f5570d16a4e in QGuiEventDispatcherGlib::processEvents (this=0x1b9f658, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#39 0x00007f5572bf9a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#40 0x00007f5572bf9dec in QEventLoop::exec (this=0x7fffe0ef5a80, flags=) at kernel/qeventloop.cpp:201
#41 0x00007f5572bfdebb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#42 0x00007f55731f4fd6 in Akonadi::AgentBase::init (r=0x1c04e40) at ../../akonadi/agentbase.cpp:541
#43 0x0000000000409255 in init<MailDispatcherAgent> (argc=<value optimized out>, argv=<value optimized out>) at /usr/include/KDE/Akonadi/../../akonadi/agentbase.h:342
#44 main (argc=<value optimized out>, argv=<value optimized out>) at ../../../agents/maildispatcher/maildispatcheragent.cpp:369

Possible duplicates by query: bug 253150.

Reported using DrKonqi
Comment 1 Alexander van Loon 2011-02-15 09:05:56 UTC
I have some more information to add. Even after logging out and in again after seeing the crash today, Akonadi Agent keeps crashing and restarting the application results in another crash, so it’s nagging me with three of those crash information dialogs until it shuts up. Also it seems I cannot send e-mails anymore. If I open the message stuck in my outbox (the e-mail I tried to send at the first time the crash hit me) Kontact gives me a progress dialog telling me ‘Please wait while the message is transferred’ for a long time, until it stops and nothing happens. So it seems the bug is reproducible for me every time now.

I would appreciate to hear if there is any quick fix or workaround for this bug?
Comment 2 Alexander van Loon 2011-02-16 19:45:37 UTC
Created attachment 57309 [details]
Valgrind log of Akonadi

I went to the Akonadi IRC channel to ask for help, sergio helped me (thank you very much) and advised me to install Valgrind and get a log. The log file is attached.
Comment 3 Sergio Martins 2011-02-16 19:50:13 UTC
==2734== Invalid read of size 8
==2734==    at 0x40C7B0: OutboxQueue::Private::itemFetched(KJob*) (outboxqueue.cpp:274)
==2734==    by 0x40FC24: OutboxQueue::qt_metacall(QMetaObject::Call, int, void**) (outboxqueue.moc:100)
==2734==    by 0x5620B26: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3280)
==2734==    by 0x5CF1A81: KJob::result(KJob*) (kjob.moc:194)
==2734==    by 0x5CF1D1F: KJob::emitResult() (kjob.cpp:312)
==2734==    by 0x4F59C6B: Akonadi::JobPrivate::handleResponse(QByteArray const&, QByteArray const&) (job.cpp:66)
==2734==    by 0x4F944A7: Akonadi::SessionPrivate::dataReceived() (session.cpp:218)
==2734==    by 0x4F94E0C: Akonadi::Session::qt_metacall(QMetaObject::Call, int, void**) (session.moc:96)
==2734==    by 0x5620B26: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3280)
==2734==    by 0x566B317: QIODevice::qt_metacall(QMetaObject::Call, int, void**) (moc_qiodevice.cpp:77)
==2734==    by 0x828785F: QLocalSocket::qt_metacall(QMetaObject::Call, int, void**) (moc_qlocalsocket.cpp:81)
==2734==    by 0x5620B26: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3280)
==2734==  Address 0x16951938 is 0 bytes after a block of size 24 alloc'd
==2734==    at 0x4C2815C: malloc (vg_replace_malloc.c:236)
==2734==    by 0x5533E9A: QListData::detach(int) (qlist.cpp:185)
==2734==    by 0x41051B: QList<Akonadi::Item>::detach_helper(int) (qlist.h:693)
==2734==    by 0x40C7A3: OutboxQueue::Private::itemFetched(KJob*) (qlist.h:709)
==2734==    by 0x40FC24: OutboxQueue::qt_metacall(QMetaObject::Call, int, void**) (outboxqueue.moc:100)
==2734==    by 0x5620B26: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3280)
==2734==    by 0x5CF1A81: KJob::result(KJob*) (kjob.moc:194)
==2734==    by 0x5CF1D1F: KJob::emitResult() (kjob.cpp:312)
==2734==    by 0x4F59C6B: Akonadi::JobPrivate::handleResponse(QByteArray const&, QByteArray const&) (job.cpp:66)
==2734==    by 0x4F944A7: Akonadi::SessionPrivate::dataReceived() (session.cpp:218)
==2734==    by 0x4F94E0C: Akonadi::Session::qt_metacall(QMetaObject::Call, int, void**) (session.moc:96)
==2734==    by 0x5620B26: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3280)
Comment 4 Sergio Martins 2011-02-26 22:51:58 UTC
Git commit c4d25f2104e7275ac439a1c578790f635fb7445b by Sergio Martins.
Committed on 26/02/2011 at 22:47.
Pushed by smartins into branch 'master'.

Don't crash because the list is empty.

Review: 100669
BUG: 266358

M  +3    -1    agents/maildispatcher/outboxqueue.cpp     

http://commits.kde.org/kdepim-runtime/c4d25f2104e7275ac439a1c578790f635fb7445b