Bug 296319 - IMAP resources sometimes crashes (or: random crashes on akonadi resources).
Summary: IMAP resources sometimes crashes (or: random crashes on akonadi resources).
Status: RESOLVED WORKSFORME
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 4.8
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Christian Mollekopf
URL:
Keywords: triaged
: 322400 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-19 00:18 UTC by Ildefonso Camargo
Modified: 2018-10-27 02:44 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (7.39 KB, text/plain)
2012-08-19 05:06 UTC, RussianNeuroMancer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ildefonso Camargo 2012-03-19 00:18:40 UTC
Application: akonadi_imap_resource (4.8)
KDE Platform Version: 4.8.1 (4.8.1)
Qt Version: 4.8.0
Operating System: Linux 3.2.9 x86_64
Distribution: Ubuntu 11.10

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

I have two imap accounts, and I just open kontact and leave it open (expecting to get new mail notifications).  After a while, it stops getting new mails (I *know* I got new mails, because the phone reports them, but the messages are not there on kmail).  I have a mail check interval of 3 minutes on one account, and interval mail checking disabled on the other one.  After kmail stops sending notifications, I tried to manually check mail: no luck, still no new messages, so, I closed kontact closing the window, and then the crash message came.

Also, I get this error message on akonadi startup:

"Fetch Job Error - Plasma Desktop Shell

Unknown error. (Unable to fetch item from backend)"

And I also get the error for the KOrganizer Reminder Daemon when I start kontact (same Unknown error... message).

In my case, akonadi is using PostgreSQL backend (external PostgreSQL server, ie: "Use internal PostgreSQL server" checkbox deselected, PostgreSQL 9.1).

Just let me know if I can give you more information.

On kdelibs, I'm using a patched version with patch from bug #295474 (I took sources from kubuntu ppa, KDE version 4.8.1)

Thanks!

Ildefonso Camargo

The crash can be reproduced some of the time.

-- Backtrace:
Application: st-andes of type IMAP E-Mail Server (akonadi_imap_resource), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f3087ff27a0 (LWP 3283))]

Thread 2 (Thread 0x7f306ffff700 (LWP 31335)):
#0  0x00007f3083971473 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f30822c1f68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f30822c2429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f3087424c06 in QEventDispatcherGlib::processEvents (this=0x16dbda0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f30873f43e2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f30873f4637 in QEventLoop::exec (this=0x7f306fffedc0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f30872f4067 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f308602e619 in KIMAP::SessionThread::run (this=0x16d2a90) at ../../kimap/sessionthread.cpp:181
#8  0x00007f30872f708b in QThreadPrivate::start (arg=0x16d2a90) at thread/qthread_unix.cpp:298
#9  0x00007f3083229efc in start_thread (arg=0x7f306ffff700) at pthread_create.c:304
#10 0x00007f308397d59d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f3087ff27a0 (LWP 3283)):
[KCrash Handler]
#6  check_parent_thread (currentThreadData=<optimized out>, parentThreadData=<optimized out>, parent=0x16cf890) at kernel/qobject.cpp:696
#7  check_parent_thread (parent=0x16cf890, parentThreadData=<optimized out>, currentThreadData=<optimized out>) at kernel/qobject.cpp:685
#8  0x00007f308740da57 in QObject::QObject (this=0x15895a0, parent=0x16cf890) at kernel/qobject.cpp:729
#9  0x00007f3084299946 in KJob::KJob (this=0x15895a0, parent=<optimized out>) at ../../kdecore/jobs/kjob.cpp:50
#10 0x00007f30860144ed in KIMAP::Job::Job (this=0x15895a0, dd=...) at ../../kimap/job.cpp:37
#11 0x00007f3086029c41 in KIMAP::SelectJob::SelectJob (this=0x15895a0, session=<optimized out>) at ../../kimap/selectjob.cpp:55
#12 0x000000000041582f in ImapIdleManager::onSessionRequestDone (this=0x159ca10, requestId=<optimized out>, session=<optimized out>, errorCode=<optimized out>) at ../../../resources/imap/imapidlemanager.cpp:88
#13 0x0000000000416300 in ImapIdleManager::qt_metacall (this=0x159ca10, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff9a314550) at ./imapidlemanager.moc:88
#14 0x00007f3087409be9 in QMetaObject::activate (sender=0x156efe0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff9a314550) at kernel/qobject.cpp:3566
#15 0x00000000004541d2 in SessionPool::sessionRequestDone (this=<optimized out>, _t1=7, _t2=0x16cf890, _t3=0, _t4=<optimized out>) at ./sessionpool.moc:140
#16 0x000000000045677e in SessionPool::processPendingRequests (this=0x156efe0) at ../../../resources/imap/sessionpool.cpp:252
#17 0x0000000000456d88 in SessionPool::qt_metacall (this=0x156efe0, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x1776000) at ./sessionpool.moc:116
#18 0x00007f308740eba6 in QObject::event (this=0x156efe0, e=<optimized out>) at kernel/qobject.cpp:1195
#19 0x00007f308677b104 in notify_helper (e=0x17212c0, receiver=0x156efe0, this=0x1509140) at kernel/qapplication.cpp:4555
#20 QApplicationPrivate::notify_helper (this=0x1509140, receiver=0x156efe0, e=0x17212c0) at kernel/qapplication.cpp:4527
#21 0x00007f308677ff83 in QApplication::notify (this=0x7fff9a315040, receiver=0x156efe0, e=0x17212c0) at kernel/qapplication.cpp:4416
#22 0x00007f30848931d6 in KApplication::notify (this=0x7fff9a315040, receiver=0x156efe0, event=0x17212c0) at ../../kdeui/kernel/kapplication.cpp:311
#23 0x00007f30873f55fc in QCoreApplication::notifyInternal (this=0x7fff9a315040, receiver=0x156efe0, event=0x17212c0) at kernel/qcoreapplication.cpp:876
#24 0x00007f30873f93ca in sendEvent (event=0x17212c0, receiver=0x156efe0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#25 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x14d44d0) at kernel/qcoreapplication.cpp:1500
#26 0x00007f3087424773 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#27 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#28 0x00007f30822c1a5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007f30822c2258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f30822c2429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f3087424b9f in QEventDispatcherGlib::processEvents (this=0x14fd590, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#32 0x00007f308682021e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007f30873f43e2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#34 0x00007f30873f4637 in QEventLoop::exec (this=0x7fff9a314fc0, flags=...) at kernel/qeventloop.cpp:204
#35 0x00007f30873f96c7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#36 0x00007f3087b21fd6 in Akonadi::ResourceBase::init (r=0x1684050) at ../../akonadi/resourcebase.cpp:412
#37 0x000000000041a926 in Akonadi::ResourceBase::init<ImapResource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/akonadi/resourcebase.h:188
#38 0x00007f30838bb30d in __libc_start_main (main=0x415200 <main(int, char**)>, argc=3, ubp_av=0x7fff9a315158, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff9a315148) at libc-start.c:226
#39 0x00000000004153b5 in _start ()

Reported using DrKonqi
Comment 1 RussianNeuroMancer 2012-08-19 05:06:47 UTC
Created attachment 73286 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.9) on KDE Platform 4.9.00 using Qt 4.8.1

- What I was doing when the application crashed:
Same situation with two accounts. One IMAP resourse still crash on KDE 4.9.0

-- Backtrace (Reduced):
#6  check_parent_thread (currentThreadData=<optimized out>, parentThreadData=<optimized out>, parent=0x14b0290) at kernel/qobject.cpp:696
#7  check_parent_thread (parent=0x14b0290, parentThreadData=<optimized out>, currentThreadData=<optimized out>) at kernel/qobject.cpp:685
#8  0x00007f75c0f612f7 in QObject::QObject (this=0x1591e70, parent=0x14b0290) at kernel/qobject.cpp:729
#9  0x00007f75bde18bb6 in KJob::KJob (this=0x1591e70, parent=<optimized out>) at ../../kdecore/jobs/kjob.cpp:50
#10 0x00007f75bfb63b1d in KIMAP::Job::Job (this=0x1591e70, dd=...) at ../../kimap/job.cpp:37
Comment 2 Bruno Friedmann 2013-01-30 14:02:44 UTC
After starting from a blank home, with kde4.10 I use akonadi on external pg (9.2) and 11 imap offline account

I'm getting new message and segfault of postgresql 
013-01-30 10:33:19 CET   LOG:  server process (PID 3525) was terminated by signal 11: Segmentation fault
2013-01-30 10:33:19 CET   DETAIL:  Failed process was running: EXECUTE qpsqlpstmt_ef (197)
2013-01-30 10:33:19 CET   LOG:  terminating any other active server processes
2013-01-30 10:33:19 CET bf_akonadi bf_akonadi WARNING:  terminating connection because of crash of another server process
2013-01-30 10:33:19 CET bf_akonadi bf_akonadi DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2013-01-30 10:33:19 CET bf_akonadi bf_akonadi HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2013-01-30 10:33:19 CET bf_akonadi bf_akonadi WARNING:  terminating connection because of crash of another server process
2013-01-30 10:33:19 CET bf_akonadi bf_akonadi DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.



cat postgresql-2013-01-30_133734.log
2013-01-30 13:37:34 CET   LOG:  database system was shut down at 2013-01-30 13:37:33 CET
2013-01-30 13:37:34 CET   LOG:  database system is ready to accept connections
2013-01-30 13:37:34 CET   LOG:  autovacuum launcher started
2013-01-30 14:54:04 CET bf_akonadi bf_akonadi ERROR:  compressed data is corrupt
2013-01-30 14:54:04 CET bf_akonadi bf_akonadi STATEMENT:  EXECUTE qpsqlpstmt_10d (407042, 'PLD:HEAD')

The postgresql server is used for geographic & statistics treatment (heavy load but not when akonadi was working) and didn't segfault ?
Comment 3 Bruno Friedmann 2013-02-18 13:57:34 UTC
Trying to backup the data on a full new setup.

psql -d bf_akonadi -c "\COPY public.parttable (id, pimitemid, name, data, datasize, version, external) TO parttable.copy"

What could explain this ? happening twice in less than two weeks.
ps : other database work just great ( even those with billions records )
Comment 4 Jekyll Wu 2013-07-16 02:27:38 UTC
*** Bug 322400 has been marked as a duplicate of this bug. ***
Comment 5 Kevin Ottens 2013-11-16 07:28:22 UTC
The IMAP resource has a new maintainer, reassigning to him.
Comment 6 Christian Mollekopf 2013-11-19 16:37:42 UTC
Does this still apply to >=4.11.3?
Looks like a threading related crash, of which many have been fixed meanwhile.
Comment 7 Bruno Friedmann 2013-11-19 20:28:31 UTC
I've not seen those trouble actually with running 4.11.3 and postgresql 9.2.4
and the \copy command work not perfectly.
Comment 8 Andrew Crouthamel 2018-09-25 03:34:49 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Andrew Crouthamel 2018-10-27 02:44:58 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!