Bug 282076 - akonadi imap resource crash (segfault) when trying to sync after DNS went away
Summary: akonadi imap resource crash (segfault) when trying to sync after DNS went away
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 4.7
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Kevin Ottens
URL:
Keywords:
: 282598 283581 283764 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-15 11:55 UTC by Sven Eden
Modified: 2012-02-20 08:09 UTC (History)
6 users (show)

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


Attachments
New crash information added by DrKonqi (9.36 KB, text/plain)
2011-10-09 20:59 UTC, Elias Probst
Details
New crash information added by DrKonqi (9.49 KB, text/plain)
2011-10-12 12:18 UTC, Elias Probst
Details
New crash information added by DrKonqi (8.84 KB, text/plain)
2011-10-14 21:48 UTC, Elias Probst
Details
New crash information added by DrKonqi (8.44 KB, text/plain)
2011-10-16 11:00 UTC, Elias Probst
Details
New crash information added by DrKonqi (6.76 KB, text/plain)
2011-10-24 17:28 UTC, Thomas Dreibholz
Details
New crash information added by DrKonqi (6.76 KB, text/plain)
2011-10-24 17:28 UTC, Thomas Dreibholz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Eden 2011-09-15 11:55:24 UTC
Application: akonadi_imap_resource (4.7)
KDE Platform Version: 4.7.1 (4.7.1) (Compiled from sources)
Qt Version: 4.7.3
Operating System: Linux 3.0.4-gentoo x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
- What I was doing when the application crashed:
Working. Kmail2 runs on another screen. Suddenly the crash report tool popped up.

But: While trying to log in to bugs.kde.org I noticed, that the DNS servers have gone out for lunch or something. My internet connection is working fine (I am currently logged into a remote server via SSH located about 600 miles from here) but bot DNS servers don't pong any more.

I have searched for other reports, but they all have actions involved and their "signal" is "Aborted" while this is a Segmentation Fault. Thus I've chosen to open a new report, I guess they are not related.

-- Backtrace:
Application: Akonadi Resource (akonadi_imap_resource), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f04d1b8b780 (LWP 3377))]

Thread 3 (Thread 0x7f04c71ce700 (LWP 6093)):
#0  0x00000035c2611d2b in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#1  0x00000035c260da26 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#2  0x00000035c261195a in _dl_open () from /lib64/ld-linux-x86-64.so.2
#3  0x00000035c3f0d7b0 in do_dlopen () from /lib64/libc.so.6
#4  0x00000035c260da26 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00000035c3f0d84f in dlerror_run () from /lib64/libc.so.6
#6  0x00000035c3f0d8b7 in __libc_dlopen_mode () from /lib64/libc.so.6
#7  0x00000035c3ee9105 in init () from /lib64/libc.so.6
#8  0x00000035c4a0caf3 in pthread_once () from /lib64/libpthread.so.0
#9  0x00000035c3ee91fc in backtrace () from /lib64/libc.so.6
#10 0x00000035c3e6d7a6 in __libc_message () from /lib64/libc.so.6
#11 0x00000035c3e72c15 in malloc_printerr () from /lib64/libc.so.6
#12 0x00000035c3e77b4c in free () from /lib64/libc.so.6
#13 0x0000003c6aeb904c in QString::free(QString::Data*) () from /usr/lib64/qt4/libQtCore.so.4
#14 0x0000003c6aebd793 in QString::vsprintf(char const*, __va_list_tag*) () from /usr/lib64/qt4/libQtCore.so.4
#15 0x0000003c6ae6a8b9 in qt_message(QtMsgType, char const*, __va_list_tag*) () from /usr/lib64/qt4/libQtCore.so.4
#16 0x0000003c6ae6b115 in qWarning(char const*, ...) () from /usr/lib64/qt4/libQtCore.so.4
#17 0x0000003c6af8836c in socketNotifierSourceCheck(_GSource*) () from /usr/lib64/qt4/libQtCore.so.4
#18 0x00000035c7e4249e in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#19 0x00000035c7e42daa in g_main_context_iterate.clone.6 () from /usr/lib64/libglib-2.0.so.0
#20 0x00000035c7e432bd in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#21 0x0000003c6af8890f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#22 0x0000003c6af5cd42 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#23 0x0000003c6af5cf84 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#24 0x0000003c6ae715b4 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#25 0x00000035f723c113 in KIMAP::SessionThread::run (this=0x28d7a00) at /var/tmp/portage/kde-base/kdepimlibs-4.7.1/work/kdepimlibs-4.7.1/kimap/sessionthread.cpp:169
#26 0x0000003c6ae73e05 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#27 0x00000035c4a06d4c in start_thread () from /lib64/libpthread.so.0
#28 0x00000035c3ed6ded in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f04cd3de700 (LWP 9305)):
#0  0x00000035c3ece173 in poll () from /lib64/libc.so.6
#1  0x00000035c7e42d8d in g_main_context_iterate.clone.6 () from /usr/lib64/libglib-2.0.so.0
#2  0x00000035c7e432bd in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x0000003c6af88966 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x0000003c6af5cd42 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x0000003c6af5cf84 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x0000003c6ae715b4 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00000035f723c113 in KIMAP::SessionThread::run (this=0x28c61d0) at /var/tmp/portage/kde-base/kdepimlibs-4.7.1/work/kdepimlibs-4.7.1/kimap/sessionthread.cpp:169
#8  0x0000003c6ae73e05 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00000035c4a06d4c in start_thread () from /lib64/libpthread.so.0
#10 0x00000035c3ed6ded in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f04d1b8b780 (LWP 3377)):
[KCrash Handler]
#6  0x00000035c3f2b097 in __memmove_ssse3_back () from /lib64/libc.so.6
#7  0x0000003c6ae9217d in QListData::remove(int) () from /usr/lib64/qt4/libQtCore.so.4
#8  0x0000003c6ae9244b in QListData::erase(void**) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x0000000000453169 in erase (it=<optimized out>, this=<optimized out>) at /usr/include/qt4/QtCore/qlist.h:453
#10 removeFirst (this=0x267dbb8) at /usr/include/qt4/QtCore/qlist.h:273
#11 takeFirst (this=0x267dbb8) at /usr/include/qt4/QtCore/qlist.h:477
#12 SessionPool::declareSessionReady (this=0x267db70, session=0x26d8a70) at /var/tmp/portage/kde-base/kdepim-runtime-4.7.1/work/kdepim-runtime-4.7.1/resources/imap/sessionpool.cpp:207
#13 0x0000000000454bc3 in SessionPool::onLoginDone (this=0x267db70, job=0x29ac7e0) at /var/tmp/portage/kde-base/kdepim-runtime-4.7.1/work/kdepim-runtime-4.7.1/resources/imap/sessionpool.cpp:348
#14 0x0000000000454ebf in SessionPool::qt_metacall (this=0x267db70, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0x7fff78633770) at /var/tmp/portage/kde-base/kdepim-runtime-4.7.1/work/kdepim-runtime-4.7.1_build/resources/imap/sessionpool.moc:118
#15 0x0000003c6af72087 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#16 0x00000034c0939b52 in KJob::result (this=<optimized out>, _t1=0x29ac7e0) at /var/tmp/portage/kde-base/kdelibs-4.7.1/work/kdelibs-4.7.1_build/kdecore/kjob.moc:194
#17 0x00000034c0939b90 in KJob::emitResult (this=0x29ac7e0) at /var/tmp/portage/kde-base/kdelibs-4.7.1/work/kdelibs-4.7.1/kdecore/jobs/kjob.cpp:312
#18 0x00000035f723b00d in KIMAP::SessionPrivate::clearJobQueue (this=0x28f7bb0) at /var/tmp/portage/kde-base/kdepimlibs-4.7.1/work/kdepimlibs-4.7.1/kimap/session.cpp:393
#19 0x00000035f723b24d in KIMAP::Session::qt_metacall (this=0x26d8a70, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x2664ac0) at /var/tmp/portage/kde-base/kdepimlibs-4.7.1/work/kdepimlibs-4.7.1_build/kimap/session.moc:116
#20 0x0000003c6af71b8a in QObject::event(QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#21 0x0000003fd21b5db4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#22 0x0000003fd21ba92a in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#23 0x00000034c1049ab6 in KApplication::notify (this=0x7fff78634200, receiver=0x26d8a70, event=0x28c6850) at /var/tmp/portage/kde-base/kdelibs-4.7.1/work/kdelibs-4.7.1/kdeui/kernel/kapplication.cpp:311
#24 0x0000003c6af5d99b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#25 0x0000003c6af61154 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/qt4/libQtCore.so.4
#26 0x0000003c6af88773 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/qt4/libQtCore.so.4
#27 0x00000035c7e4283e in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#28 0x00000035c7e43028 in g_main_context_iterate.clone.6 () from /usr/lib64/libglib-2.0.so.0
#29 0x00000035c7e432bd in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#30 0x0000003c6af8890f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#31 0x0000003fd225b25e in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtGui.so.4
#32 0x0000003c6af5cd42 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#33 0x0000003c6af5cf84 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#34 0x0000003c6af6140b in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#35 0x00000035ef949096 in Akonadi::ResourceBase::init (r=0x26a1ff0) at /var/tmp/portage/kde-base/kdepimlibs-4.7.1/work/kdepimlibs-4.7.1/akonadi/resourcebase.cpp:393
#36 0x0000000000418028 in init<ImapResource> (argv=<optimized out>, argc=<optimized out>) at /usr/include/akonadi/resourcebase.h:188
#37 main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-base/kdepim-runtime-4.7.1/work/kdepim-runtime-4.7.1/resources/imap/imapresource.cpp:598

Possible duplicates by query: bug 278756, bug 276376, bug 272921, bug 265308, bug 265173.

Reported using DrKonqi
Comment 1 Kevin Ottens 2011-09-17 16:20:40 UTC
I will need more information for that one, namely the mail server used.

Also to debug that kind of cases efficiently, I'd need to be provided with some idea of the IMAP traffic which created the issue. That can be done by setting the KIMAP_LOGFILE environment variable and restarting the akonadiserver.

For instance:
export KIMAP_LOGFILE=imaplog
akonadictl restart

Look at the pid of the imap resource you should then have a couple of imaplog.pid.* files. Wait for the crash, and then provide me what happened before the crash. It's the best way for me to create a test case that I can reproduce here. Only caveat though is that some private data is likely in the log (except the authentication phase, after that it logs everything) so you'd have to trust me with your data and send it privately.
Comment 2 Sven Eden 2011-09-18 11:41:54 UTC
It's the old companies mail server, using squirrel if I am not mistaken. I'll look into it on Monday. I _hope_ I can reproduce the error by simply altering /etc/resolv.conf to something unresponsive, but that's a shot in the dark. I have never - in over three years - seen the dns servers going down, but maybe it works out that way.
Comment 3 Christophe Marin 2011-10-08 09:30:14 UTC
*** Bug 283581 has been marked as a duplicate of this bug. ***
Comment 4 Elias Probst 2011-10-09 20:59:37 UTC
Created attachment 64373 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.2

- What I was doing when the application crashed:
→ Suspended my notebook
→ Resumed while being offline (at the train)
→ After ~15 minutes, the IMAP resource crashed

Not sure about the used mailserver, very likely Dovecot.
Couldn't reproduce it so far to generate more debug information.

-- Backtrace (Reduced):
#6  _wordcopy_fwd_aligned (dstp=<value optimized out>, srcp=<value optimized out>, len=2305843009213345392) at wordcopy.c:118
#7  0x00007f1cf23a61c8 in memmove (dest=0xa6e348, src=<value optimized out>, len=18446744073709551608) at memmove.c:73
#8  0x00007f1cf5c6882c in QListData::remove (this=0x8283e8, i=<value optimized out>) at /usr/include/bits/string3.h:58
#9  0x00007f1cf5c68861 in QListData::erase (this=0xd16fb8, xi=<value optimized out>) at tools/qlist.cpp:412
#10 0x000000000044f703 in erase (this=0x8283a0, session=0x853740) at /usr/include/qt4/QtCore/qlist.h:453
Comment 5 Christophe Marin 2011-10-11 09:06:31 UTC
*** Bug 283764 has been marked as a duplicate of this bug. ***
Comment 6 Christophe Marin 2011-10-11 09:06:44 UTC
*** Bug 282598 has been marked as a duplicate of this bug. ***
Comment 7 Christophe Marin 2011-10-11 09:07:27 UTC
Note: If your bug was marked as a duplicate of this one, please read the comment #1.
Comment 8 Elias Probst 2011-10-12 12:18:49 UTC
Created attachment 64459 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.2

- What I was doing when the application crashed:
It happened here again, when the gateway was temporarily out of service.
Unfortunately I didn't have Akonadi started manually to generate detailed log information at this time, but I think the backtrace looks a little different this time and therefore probably provides additional helpful information.

-- Backtrace (Reduced):
#6  _wordcopy_fwd_aligned (dstp=<value optimized out>, srcp=<value optimized out>, len=2305843009213617696) at wordcopy.c:109
#7  0x00007f3d9bfed1c8 in memmove (dest=0xab40e0, src=<value optimized out>, len=18446744073709551608) at memmove.c:73
#8  0x00007f3d9f8af82c in QListData::remove (this=0x83c668, i=<value optimized out>) at /usr/include/bits/string3.h:58
#9  0x00007f3d9f8af861 in QListData::erase (this=0xb48fd0, xi=<value optimized out>) at tools/qlist.cpp:412
#10 0x000000000044f703 in erase (this=0x83c620, session=0x8e3e60) at /usr/include/qt4/QtCore/qlist.h:453
Comment 9 Elias Probst 2011-10-14 21:48:19 UTC
Created attachment 64527 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.2

- What I was doing when the application crashed:
It happened again. This time I was able to get the IMAP debug log, which I sent now privately to Kevin Ottens.

-- Backtrace (Reduced):
#6  _wordcopy_fwd_aligned (dstp=<value optimized out>, srcp=<value optimized out>, len=2305843009213281472) at wordcopy.c:106
#7  0x00007f212055e1c8 in memmove (dest=0x8705e8, src=<value optimized out>, len=18446744073709551608) at memmove.c:73
#8  0x00007f2123e2082c in QListData::remove (this=0x881368, i=<value optimized out>) at /usr/include/bits/string3.h:58
#9  0x00007f2123e20861 in QListData::erase (this=0xb95fd8, xi=<value optimized out>) at tools/qlist.cpp:412
#10 0x000000000044f703 in erase (this=0x881320, session=0xaa6480) at /usr/include/qt4/QtCore/qlist.h:453
Comment 10 Elias Probst 2011-10-16 11:00:20 UTC
Created attachment 64576 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.2

- What I was doing when the application crashed:
It happened again. I think I missed some logfiles last time, so I sent all related current logfiles again to Kevin Ottens privately.

-- Backtrace (Reduced):
#6  _wordcopy_fwd_aligned (dstp=<value optimized out>, srcp=<value optimized out>, len=2305843009213410456) at wordcopy.c:112
#7  0x00007f587d3fe1c8 in memmove (dest=0xa55498, src=<value optimized out>, len=18446744073709551608) at memmove.c:73
#8  0x00007f5880cc082c in QListData::remove (this=0x81bea8, i=<value optimized out>) at /usr/include/bits/string3.h:58
#9  0x00007f5880cc0861 in QListData::erase (this=0xc7efc8, xi=<value optimized out>) at tools/qlist.cpp:412
#10 0x000000000044f703 in erase (this=0x81be60, session=0x7f43e0) at /usr/include/qt4/QtCore/qlist.h:453
Comment 11 Thomas Dreibholz 2011-10-24 17:28:09 UTC
Created attachment 64842 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

- What I was doing when the application crashed:

Program has crashed while synchronizing e-mails over unreliable Internet connection (via UMTS on moving train).

-- Backtrace (Reduced):
#6  __memmove_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:2819
#7  0x00007fbb8c7098b9 in QListData::remove (this=0xaca378, i=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:58
#8  0x00007fbb8c709b9b in QListData::erase (this=0xaca378, xi=<optimized out>) at tools/qlist.cpp:412
#9  0x0000000000454595 in erase (it=<optimized out>, this=<optimized out>) at /usr/include/qt4/QtCore/qlist.h:453
#10 removeFirst (this=0xaca378) at /usr/include/qt4/QtCore/qlist.h:273
Comment 12 Thomas Dreibholz 2011-10-24 17:28:26 UTC
Created attachment 64843 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

- What I was doing when the application crashed:

Program has crashed while synchronizing e-mails over unreliable Internet connection (via UMTS on moving train).

-- Backtrace (Reduced):
#6  __memmove_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:2819
#7  0x00007fbb8c7098b9 in QListData::remove (this=0xaca378, i=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:58
#8  0x00007fbb8c709b9b in QListData::erase (this=0xaca378, xi=<optimized out>) at tools/qlist.cpp:412
#9  0x0000000000454595 in erase (it=<optimized out>, this=<optimized out>) at /usr/include/qt4/QtCore/qlist.h:453
#10 removeFirst (this=0xaca378) at /usr/include/qt4/QtCore/qlist.h:273
Comment 13 Kevin Ottens 2012-02-18 15:56:25 UTC
OK, it's now likely fixed by all the commits gone into the direction of handling connection losses better. Please test again with 4.8.1 when it will be out and reopen if it still shows up.
Comment 14 Sven Eden 2012-02-20 08:09:41 UTC
I just tried to have kmail (4.8.0) to crash again, but couldn't reproduce. I changed the nameserver entry in /etc/resolv.conf to something non-existant and fetched mails. I get a message that the pop3 server is not available, but the imap account simply stays silent. No crash anymore! *yay*