Bug 258669 - kmail/korganizer go into a tight loop, rapidly creating nearly empty emails in groupware/Calendar folder
Summary: kmail/korganizer go into a tight loop, rapidly creating nearly empty emails i...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kontact
Classification: Applications
Component: general (show other bugs)
Version: 4.4.5
Platform: Debian unstable Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-03 12:46 UTC by Paul Millar
Modified: 2017-01-07 21:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Millar 2010-12-03 12:46:22 UTC
Version:           4.4.5 (using KDE 4.4.5) 
OS:                Linux

I am using KMail with a Disconnected IMAP account.  I have a "groupware" folder on the IMAP server with the usual collection of subfolders: Calendar, Contacts, Journal, Notes and Tasks.  The groupware folder uses the older Kolab1 (iCal/vCard) format.

I notice that sometimes, after I've created a new event in KOrganizer, the CPU usage of the machine has a non-zero minimum value; i.e., the CPU peaks as demand changes, but the CPU never drops below some fairly constant value.  This is symptomatic of some process in some kind of tight(-ish) loop.

When investigating, using "top", I find a single process consuming most of the CPU: "kontact".  From memory (so might be wrong) there's no indication within kontact of any activity.

I restart kontact: menu: File->Quit then start it again.  Selecting "Check Mail" results in KMail apparently getting stuck when synchronising the groupware/Calendar folder.  Further investigation using icedove found a large number of emails in this folder all submitted in very, very close succession, suggesting they have been written at a rate of roughly 100 emails per second.  Unfortunately, since there is little indication of a problem, it can be a while before I notice.  One time, kontact/kmail created some 600,000 emails in the directory before I stopped kontact.

These rapidly created emails are almost completely empty.  They don't contain an iCal attachment and are missing basic header information like "From:" "To:".

At the beginning of the torrent of nearly-empty emails there is one containing the correct details for the freshly created event.

It seems that kontact/korganizer/kmail is successful in writing the email but then goes into a tight-loop writing these broken, mostly-empty emails.  My suspicion is there's some kind of race-condition that can trigger a retry strategy; however, this retry strategy is broken in this case.

In case it's useful, here's how I recover from the problem:
  1. stop kontact
  2. wait/ensure all kio_imap processes have finished.
  3. start icedove,
  4. select the groupware/Calendar folder,
  5. delete the mostly-empty emails and "compact" the folder,
  6. delete KMail's cache of groupware/Calendar folder: the maildir cache directly in ~/.kde/share/apps/kmail/dimap/... ; I delete all of the three subdirectories ("new", "cur" and "tmp").
  7. start kontact (I have kontact configured to show kmail view on startup),
  8. select "Check Mail", triggering kmail to recreate the local cache,
  9. Switch to Calendar view to verify that the event is still present; recreate it if not.



Reproducible: Sometimes

Steps to Reproduce:
The problem is sporadic (happens approx once every month or so) and I haven't been able to track down what triggers the problem.

It is possible the following procedure increases the likelihood of a problem:
  1. switch to kmail view,
  2. select the groupware/Calendar folder (one can see the emails with attachments),
  3. switch to korganizer view,
  4. add an event,
  5. switch to kmail view,
  6. select "Check Mail" to synchronise email with IMAP server.

I now have kmail configure to hide the groupware folder, so cannot select this folder.  So far, the problem hasn't reappeared, although I do not take this as strong evidence that the problem has gone away.

Actual Results:  
sporadically kmail going into a tight-loop generating nearly-empty emails, as described above.

Expected Results:  
I expect kontact/korganizer/kmail to save the event in the mailbox without generating tons of broken emails.

IMHO the bug is more serious than "Normal".  It doesn't result in kontact crashing so I've marked it as "Major".  Strictly speaking, this is wrong as I believe there's no risk of data-loss.

Sorry, I don't know which component is at fault here (it might be kmail), so I've marked the problem against kontact/generic.
Comment 1 Paul Millar 2010-12-06 14:35:42 UTC
I've just had a similar event.  Kontact/korganiser/kmail went into a tight loop .

I noticed high(-ish) CPU activity spread equally across both CPUs: roughly 60% on each.  "top" revealed that this activity was shared between the kontact, dbus-daemon and korgac processes.  I assume that this is kontact sending messages to korgac about new events and/or deleted events.

I can confirm that, during the problem, the activity feedback (if present, located at the bottom right corner of the window and contains an arrow for more detailed information) was not displayed.  kontact was giving no indication that there was activity.

I looked at the dimap directory for the groupware/Calendar folder

~/.kde/share/apps/kmail/dimap/.1205604567.directory/.groupware.directory/Calendar/cur

After changing directory there, I repeatedly invoked "ls -lt".  I noticed that one or more files were appearing and disappearing.  Most of the time, "ls -lt" didn't reveal any new file (the newest was some month ago) but occasionally I would see a file.  If I saw the new file then, with the next "ls -lt", it would be gone.   The new file contained today's date, so I assume this was the message containing the ical attachment.

Sometimes I saw error messages like:

paul@zitpcx6184:~/.kde/share/apps/kmail/dimap/.1205604567.directory/.groupware.directory/Calendar/cur$ clear;ls -lt|head -10

ls: cannot access 1291638017.26104.JCFxr:2,S: No such file or directory
ls: cannot access 1291638017.26104.SkjZ3:2,S: No such file or directory
total 5292
-rw-r--r-- 1 paul paul  1167 Nov 25 18:54 1290707684.26457.hFBC9:2,S
-rw-r--r-- 1 paul paul  1241 Nov 25 16:49 1290700165.16632.rrPKt:2,S
-rw-r--r-- 1 paul paul  1163 Nov 17 20:40 1290022843.16548.z7gNg:2,S
[..]

I believe here the directory listing is discovering these files but, once "ls -lt" tried to stat(2) the file, the file has already been deleted.

I attached gdb to the kontact process.  kontact had two threads:

  2 Thread 0xb19b4b70 (LWP 26116)  0xb78d6424 in __kernel_vsyscall ()
* 1 Thread 0xb355c710 (LWP 26104)  0xb6d6fa7b in ucstrcmp (a=0xe69cbb2, alen=32, b=0xde3399c, blen=9)
    at tools/qstring.cpp:178

Thread 2 was just idling.

#0  0xb78d6424 in __kernel_vsyscall ()
#1  0xb609f011 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xb6e0024c in QProcessManager::run (this=0xb6f3c390) at io/qprocess_unix.cpp:245
#3  0xb6d28fbe in QThreadPrivate::start (arg=0xb6f3c390) at thread/qthread_unix.cpp:248
#4  0xb4367955 in start_thread (arg=0xb19b4b70) at pthread_create.c:300
#5  0xb60a5e7e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130


Thread 1 contained the following stack-trace:

#0  0xb6d6fa7b in ucstrcmp (a=0xe69cbb2, alen=32, b=0xde3399c, blen=9) at tools/qstring.cpp:178
#1  0xb6d70962 in operator< (s1=..., s2=...) at tools/qstring.cpp:7818
#2  0xb560ddcc in operator< (this=0x9664138, msg=...) at qdbusconnection_p.h:141
#3  qLowerBound<QDBusConnectionPrivate::ObjectTreeNode const*, QStringRef> (this=0x9664138, msg=...)
    at ../../include/QtCore/../../src/corelib/tools/qalgorithms.h:239
#4  findObject (this=0x9664138, msg=...) at qdbusintegrator.cpp:438
#5  QDBusConnectionPrivate::handleObjectCall (this=0x9664138, msg=...) at qdbusintegrator.cpp:1413
#6  0xb560e5c2 in QDBusConnectionPrivate::handleMessage (this=0x9664138, amsg=...) at qdbusintegrator.cpp:548
#7  0xb560e8a4 in QDBusConnectionPrivate::sendWithReplyLocal (this=0x9664138, message=...)
    at qdbusintegrator.cpp:1869
#8  0xb560f979 in QDBusConnectionPrivate::sendWithReplyAsync (this=0x9664138, message=..., timeout=-1)
    at qdbusintegrator.cpp:1903
#9  0xb55fa570 in QDBusConnection::asyncCall (this=0xde33328, message=..., timeout=-1) at qdbusconnection.cpp:553
#10 0xb561b6e8 in QDBusAbstractInterface::asyncCallWithArgumentList (this=0xde33af0, method=..., args=...)
    at qdbusabstractinterface.cpp:472
#11 0xa8fbf74a in storageFormat (this=0xd4d1ce0, type=@0xbfe19c4c, folder=...) at ./kmail_groupwareinterface.h:114
#12 Kolab::KMailConnection::kmailStorageFormat (this=0xd4d1ce0, type=@0xbfe19c4c, folder=...)
    at ../../../../kresources/kolab/shared/kmailconnection.cpp:302
#13 0xa8fbc775 in Kolab::ResourceKolabBase::kmailStorageFormat (this=0xddcc6a4, folder=...)
    at ../../../../kresources/kolab/shared/resourcekolabbase.cpp:252
#14 0xa8fdf0e6 in KCal::ResourceKolab::sendKMailUpdate (this=0xddcc690, incidencebase=0xe56ddf8, subresource=...,
    sernum=9724861) at ../../../../kresources/kolab/kcal/resourcekolab.cpp:461
#15 0xa8fe0ae6 in KCal::ResourceKolab::incidenceUpdatedSilent (this=0xddcc690, incidencebase=0xe56ddf8)
    at ../../../../kresources/kolab/kcal/resourcekolab.cpp:363
#16 0xa8fe0c34 in KCal::ResourceKolab::incidenceUpdated (this=0xddcc690, incidencebase=0xe56ddf8)
    at ../../../../kresources/kolab/kcal/resourcekolab.cpp:375
#17 0xa8fe21a9 in KCal::ResourceKolab::addIncidence (this=0xddcc690, incidence=0x15b33d58, _subresource=...,
    sernum=9724861) at ../../../../kresources/kolab/kcal/resourcekolab.cpp:681
#18 0xa8fe2eb7 in KCal::ResourceKolab::fromKMailAddIncidence (this=0xddcc690, type=..., subResource=...,
    sernum=9724861, format=0, data=...) at ../../../../kresources/kolab/kcal/resourcekolab.cpp:925
#19 0xa8fbe946 in Kolab::KMailConnection::fromKMailAddIncidence (this=0xd4d1ce0, type=..., folder=...,
    sernum=9724861, format=0, data=...) at ../../../../kresources/kolab/shared/kmailconnection.cpp:144
#20 0xa8fbf54a in Kolab::KMailConnection::qt_metacall (this=0xd4d1ce0, _c=QMetaObject::InvokeMetaMethod, _id=0,
    _a=0xbfe1a258) at ./kmailconnection.moc:90
#21 0xb6e2a7aa in QMetaObject::metacall (object=0xd4d1ce0, cl=232995228, idx=4, argv=0xbfe1a258)
---Type <return> to continue, or q <return> to quit---
    at kernel/qmetaobject.cpp:237
#22 0xb6e391bb in QMetaObject::activate (sender=0xde33af0, m=0xa8fed224, local_signal_index=1, argv=0xbfe1a258)
    at kernel/qobject.cpp:3295
#23 0xa8fe6a65 in OrgKdeKmailGroupwareInterface::incidenceAdded (this=0xde33af0, _t1=..., _t2=..., _t3=9724861,
    _t4=0, _t5=...) at kmail_groupwareinterface.moc:183
#24 0xa8fe6f4a in OrgKdeKmailGroupwareInterface::qt_metacall (this=0xde33af0, _c=QMetaObject::InvokeMetaMethod,
    _id=1, _a=0xbfe1a578) at kmail_groupwareinterface.moc:132
#25 0xb560bac1 in QDBusConnectionPrivate::deliverCall (this=0x9664138, object=0xde33af0, msg=..., metaTypes=...,
    slotIdx=6) at qdbusintegrator.cpp:904
#26 0xb5616877 in QDBusCallDeliveryEvent::placeMetaCall(QObject*) () from /usr/lib/libQtDBus.so.4
#27 0xb6e35dfe in QObject::event (this=0xde33af0, e=0x15b47d68) at kernel/qobject.cpp:1248
#28 0xb636d5cc in QApplicationPrivate::notify_helper (this=0x966ce20, receiver=0xde33af0, e=0x15b47d68)
    at kernel/qapplication.cpp:4302
#29 0xb637415e in QApplication::notify (this=0xbfe1aec4, receiver=0xde33af0, e=0x15b47d68)
    at kernel/qapplication.cpp:3706
#30 0xb7374bfa in KApplication::notify (this=0xbfe1aec4, receiver=0xde33af0, event=0x15b47d68)
    at ../../kdeui/kernel/kapplication.cpp:302
#31 0xb6e254cb in QCoreApplication::notifyInternal (this=0xbfe1aec4, receiver=0xde33af0, event=0x15b47d68)
    at kernel/qcoreapplication.cpp:726
#32 0xb6e28f2c in sendEvent (receiver=0x0, event_type=0, data=0x964ce00)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#33 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x964ce00)
    at kernel/qcoreapplication.cpp:1367
#34 0xb6e290ad in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0)
    at kernel/qcoreapplication.cpp:1260
#35 0xb6e5157f in sendPostedEvents (s=0x967cd58)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#36 postEventSourceDispatch (s=0x967cd58) at kernel/qeventdispatcher_glib.cpp:276
#37 0xb42c1305 in g_main_dispatch (context=0x967ccd8)
    at /build/buildd-glib2.0_2.24.2-1-i386-AScyie/glib2.0-2.24.2/glib/gmain.c:1960
#38 IA__g_main_context_dispatch (context=0x967ccd8)
    at /build/buildd-glib2.0_2.24.2-1-i386-AScyie/glib2.0-2.24.2/glib/gmain.c:2513
#39 0xb42c4fe8 in g_main_context_iterate (context=0x967ccd8, block=<value optimized out>, dispatch=1,
    self=0x967ac70) at /build/buildd-glib2.0_2.24.2-1-i386-AScyie/glib2.0-2.24.2/glib/gmain.c:2591
#40 0xb42c51c8 in IA__g_main_context_iteration (context=0x967ccd8, may_block=1)
---Type <return> to continue, or q <return> to quit---
    at /build/buildd-glib2.0_2.24.2-1-i386-AScyie/glib2.0-2.24.2/glib/gmain.c:2654
#41 0xb6e51075 in QEventDispatcherGlib::processEvents (this=0x964c8c8, flags=...)
    at kernel/qeventdispatcher_glib.cpp:412
#42 0xb642bed5 in QGuiEventDispatcherGlib::processEvents (this=0x964c8c8, flags=...)
    at kernel/qguieventdispatcher_glib.cpp:204
#43 0xb6e23ae9 in QEventLoop::processEvents (this=0xbfe1ae24, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
) at kernel/qeventloop.cpp:149
#44 0xb6e23f3a in QEventLoop::exec (this=0xbfe1ae24, flags=...) at kernel/qeventloop.cpp:201
#45 0xb6e2916f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003
#46 0xb636d667 in QApplication::exec () at kernel/qapplication.cpp:3581
#47 0x0804b472 in main (argc=1, argv=0xbfe1b0e4) at ../../../kontact/src/main.cpp:224


I detached gdb and allowed kontact to continue.

I selected menu items: File -> Quit.

There was a lot of disk activity as Kontact tried to shutdown.  During this shutdown process, Kontact crashed.

An "ls -lt" on the dimap directory (see above) DID NOT show a new email; only the existing emails were present so the newest email was some time ago.

I started kontact.  It started without any problems.

I switched the view to korganiser (selected "Calendar" icon in left navigation panel).  The calendar showed the added event.

I switched to KMail view ("Mail" icon, left nav. panel) and selected "Check Mail" to synchronise against the imap servers.  This succeeded without any apparent problems.

I again quit kontact (menu: File->Quit).  This time, Kontact exited without any problem.

Now, an "ls -lt" on the dimap directory DID show the new email with an iCal attachment.  Icedove confirmed that the new email had been synchronised with the IMAP server.

Although this example didn't create lots of emails; it had the tight-loop in keeping with the other problem.  This problem may or may not be related to the above problem, however it's obvious that something is going wrong here.

HTH,

Paul.
Comment 2 Paul Millar 2010-12-06 16:56:50 UTC
The same problem again: kontact in a tight-loop.  Again, this time it was not generating any additional emails.  The problem was triggered by moving an event to a different day (click-and-drag).  The event was the problematic one discussed above. 

vmstat reports that the two CPUs are (combined) busy roughly 55% of the time with userland activity, 15% kernel/system and 30% idle.  The "top" command shows CPU usage as: 66% kontact, 15% korgac, 11% dbus-daemon, plus some other small things.

Again, kontact shows no indication of this activity: the progress bar at the bottom right-hand corner of the window is absent.

I connected gdb to kontact to get a backtrace.  Again, there were two threads.  One was "parked"

#0  0xb7705424 in __kernel_vsyscall ()
#1  0xb5ece011 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xb6c2f24c in QProcessManager::run (this=0xb6d6b390) at io/qprocess_unix.cpp:245
#3  0xb6b57fbe in QThreadPrivate::start (arg=0xb6d6b390) at thread/qthread_unix.cpp:248
#4  0xb4196955 in start_thread (arg=0xaeb63b70) at pthread_create.c:300
#5  0xb5ed4e7e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130


The other had the following backtrace, apparently in the process of sending a dbus message.

#0  memmove () at ../sysdeps/i386/i686/memmove.S:94
#1  0xb3d92c1a in ?? () from /lib/libdbus-1.so.3
#2  0xb3d92f18 in ?? () from /lib/libdbus-1.so.3
#3  0xb3d930a5 in ?? () from /lib/libdbus-1.so.3
#4  0xb3d7b0f2 in ?? () from /lib/libdbus-1.so.3
#5  0xb3d7b653 in ?? () from /lib/libdbus-1.so.3
#6  0xb3d81b8b in ?? () from /lib/libdbus-1.so.3
#7  0xb3d82327 in dbus_message_iter_append_basic () from /lib/libdbus-1.so.3
#8  0xb5468ba3 in q_dbus_message_iter_append_basic (it=0x7, ba=<value optimized out>, type=0, arg=0xbf984a48)
    at qdbus_symbols_p.h:217
#9  qIterAppend (it=0x7, ba=<value optimized out>, type=0, arg=0xbf984a48) at qdbusmarshaller.cpp:53
#10 0xb5469ab4 in QDBusMarshaller::append (this=0xbf984c4c, arg=...) at qdbusmarshaller.cpp:118
#11 0xb546cef1 in QDBusMarshaller::appendVariantInternal (this=0xbf984c4c, arg=...) at qdbusmarshaller.cpp:434
#12 0xb5446f3e in QDBusMessagePrivate::toDBusMessage (message=..., error=0xbf984d94) at qdbusmessage.cpp:185
#13 0xb5435d7c in QDBusConnectionPrivate::relaySignal (this=0x98fb138, obj=0xa225020, mo=0xb00211c4, signalId=6, 
    args=...) at qdbusintegrator.cpp:1161
#14 0xb5478ad8 in QDBusConnectionPrivate::qt_metacall (this=0x98fb138, _c=QMetaObject::InvokeMetaMethod, _id=11, 
    _a=0xbf984f1c) at .moc/release-shared/moc_qdbusconnection_p.cpp:102
#15 0xb6c597aa in QMetaObject::metacall (object=0x98fb138, cl=QMetaObject::InvokeMetaMethod, idx=11, argv=0xbf984f1c)
    at kernel/qmetaobject.cpp:237
#16 0xb6c681bb in QMetaObject::activate (sender=0xab295d8, m=0xb548e884, local_signal_index=2, argv=0xbf984f1c)
    at kernel/qobject.cpp:3295
#17 0xb545ba35 in QDBusAdaptorConnector::relaySignal (this=0xab295d8, _t1=0xa225020, _t2=0xb00211c4, _t3=6, _t4=...)
    at qdbusabstractadaptor.cpp:377
#18 0xb545bc51 in QDBusAdaptorConnector::relay (this=0xab295d8, senderObj=0x990f0a8, lastSignalIdx=6, argv=0xbf985110)
    at qdbusabstractadaptor.cpp:306
#19 0xb545bcfb in QDBusAdaptorConnector::relaySlot (this=0xab295d8, argv=0xbf985110) at qdbusabstractadaptor.cpp:268
#20 0xb545c684 in QDBusAdaptorConnector::qt_metacall (this=0xab295d8, _c=QMetaObject::InvokeMetaMethod, _id=4, 
    _a=0xbf985110) at qdbusabstractadaptor.cpp:364
#21 0xb6c597aa in QMetaObject::metacall (object=0xab295d8, cl=QMetaObject::InvokeMetaMethod, idx=4, argv=0xbf985110)
    at kernel/qmetaobject.cpp:237
#22 0xb6c681bb in QMetaObject::activate (sender=0x990f0a8, m=0xb00211c4, local_signal_index=2, argv=0xbf985110)
    at kernel/qobject.cpp:3295
#23 0xafdbe09f in GroupwareAdaptor::incidenceDeleted (this=0x990f0a8, _t1=..., _t2=..., _t3=...)
    at groupwareadaptor.moc:268
#24 0xafdbe988 in GroupwareAdaptor::qt_metacall (this=0x990f0a8, _c=QMetaObject::InvokeMetaMethod, _id=2, 
    _a=0xbf985290) at groupwareadaptor.moc:212
#25 0xb6c597aa in QMetaObject::metacall (object=0x990f0a8, cl=QMetaObject::InvokeMetaMethod, idx=6, argv=0xbf985290)
    at kernel/qmetaobject.cpp:237
#26 0xb6c681bb in QMetaObject::activate (sender=0xa225020, m=0xb001b208, local_signal_index=2, argv=0xbf985290)
    at kernel/qobject.cpp:3295
#27 0xafc9042f in KMailICalIfaceImpl::incidenceDeleted (this=0xa225020, _t1=..., _t2=..., _t3=...)
    at ./kmailicalifaceimpl.moc:155
#28 0xafca5777 in KMailICalIfaceImpl::slotIncidenceDeleted (this=0xa225020, folder=0xa8b2988, sernum=9771497)
    at ../../kmail/kmailicalifaceimpl.cpp:1232
#29 0xafca5d65 in KMailICalIfaceImpl::qt_metacall (this=0xa225020, _c=QMetaObject::InvokeMetaMethod, _id=9, 
    _a=0xbf985494) at ./kmailicalifaceimpl.moc:121
#30 0xb6c597aa in QMetaObject::metacall (object=0xa225020, cl=QMetaObject::InvokeMetaMethod, idx=13, argv=0xbf985494)
    at kernel/qmetaobject.cpp:237
#31 0xb6c681bb in QMetaObject::activate (sender=0xa8b2988, m=0xb0013280, local_signal_index=8, argv=0xbf985494)
    at kernel/qobject.cpp:3295
#32 0xafa3cd69 in KMFolder::msgRemoved (this=0xa8b2988, _t1=0xa8b2988, _t2=9771497) at ./kmfolder.moc:216
#33 0xafa3d425 in KMFolder::qt_metacall (this=0xa8b2988, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0xbf9855b4)
    at ./kmfolder.moc:131
#34 0xb6c597aa in QMetaObject::metacall (object=0xa8b2988, cl=QMetaObject::InvokeMetaMethod, idx=12, argv=0xbf9855b4)
    at kernel/qmetaobject.cpp:237
#35 0xb6c681bb in QMetaObject::activate (sender=0xa8cf698, m=0xb0013868, local_signal_index=11, argv=0xbf9855b4)
    at kernel/qobject.cpp:3295
#36 0xafa6d539 in FolderStorage::msgRemoved (this=0xa8cf698, _t1=0xa8b2988, _t2=9771497) at ./folderstorage.moc:238
#37 0xafa70703 in FolderStorage::removeMsg (this=0xa8cf698, idx=1314) at ../../kmail/folderstorage.cpp:399
#38 0xafb585b5 in KMFolderMaildir::removeMsg (this=0xa8cf698, idx=1314) at ../../kmail/kmfoldermaildir.cpp:908
#39 0xafb3849e in KMFolderCachedImap::removeMsg (this=0xa8cf698, idx=1314, imapQuiet=7)
    at ../../kmail/kmfoldercachedimap.cpp:591
#40 0xafa3c0c6 in KMFolder::removeMsg (this=0xa8b2988, i=1314, imapQuiet=<value optimized out>)
    at ../../kmail/kmfolder.cpp:468
#41 0xafc94e9b in KMailICalIfaceImpl::deleteMsg (this=0xa225020, msg=0xa47e3ae8)
    at ../../kmail/kmailicalifaceimpl.cpp:1436
#42 0xafc9f0bb in KMailICalIfaceImpl::update (this=0xa225020, resource=..., sernum=9771497, subject=..., 
    plainTextBody=..., customHeaders=..., attachmentURLs=..., attachmentMimetypes=..., attachmentNames=..., 
    deletedAttachments=...) at ../../kmail/kmailicalifaceimpl.cpp:952
#43 0xafdbe8f2 in update (this=0x990f0a8, _c=QMetaObject::InvokeMetaMethod, _id=19, _a=0xbf985998)
    at groupwareadaptor.cpp:117
#44 GroupwareAdaptor::qt_metacall (this=0x990f0a8, _c=QMetaObject::InvokeMetaMethod, _id=19, _a=0xbf985998)
    at groupwareadaptor.moc:241
#45 0xb543aac1 in QDBusConnectionPrivate::deliverCall (this=0x98fb138, object=0x990f0a8, msg=..., metaTypes=..., 
    slotIdx=23) at qdbusintegrator.cpp:904
#46 0xb543bd05 in QDBusConnectionPrivate::activateCall (this=0x98fb138, object=0x990f0a8, flags=273, msg=...)
    at qdbusintegrator.cpp:816
#47 0xb543c740 in QDBusConnectionPrivate::activateObject (this=0x98fb138, node=..., msg=..., pathStartPos=10)
    at qdbusintegrator.cpp:1364
#48 0xb543d15c in QDBusConnectionPrivate::handleObjectCall (this=0x98fb138, msg=...) at qdbusintegrator.cpp:1456
#49 0xb543d5c2 in QDBusConnectionPrivate::handleMessage (this=0x98fb138, amsg=...) at qdbusintegrator.cpp:548
#50 0xb543d8a4 in QDBusConnectionPrivate::sendWithReplyLocal (this=0x98fb138, message=...) at qdbusintegrator.cpp:1869
#51 0xb543e979 in QDBusConnectionPrivate::sendWithReplyAsync (this=0x98fb138, message=..., timeout=-1)
    at qdbusintegrator.cpp:1903
#52 0xb5429570 in QDBusConnection::asyncCall (this=0xb382ea8, message=..., timeout=-1) at qdbusconnection.cpp:553
#53 0xb544a6e8 in QDBusAbstractInterface::asyncCallWithArgumentList (this=0xadaa200, method=..., args=...)
    at qdbusabstractinterface.cpp:472
#54 0xaec55b47 in OrgKdeKmailGroupwareInterface::update(QString const&, unsigned int, QString const&, QString const&, QList<KMail::CustomHeader> const&, QStringList const&, QStringList const&, QStringList const&, QStringList const&) ()
   from /usr/lib/libkcalkolab.so.4
#55 0xaec51eaa in Kolab::KMailConnection::kmailUpdate (this=0xb2c3620, resource=..., sernum=@0xbf98644c, subject=..., 
    plainTextBody=..., customHeaders=..., attachmentURLs=..., attachmentMimetypes=..., attachmentNames=..., 
    deletedAttachments=...) at ../../../../kresources/kolab/shared/kmailconnection.cpp:277
#56 0xaec4f31d in Kolab::ResourceKolabBase::kmailUpdate (this=0xb2c0d94, resource=..., sernum=@0xbf98644c, xml=..., 
    mimetype=..., subject=..., _customHeaders=..., _attachmentURLs=..., _attachmentMimetypes=..., 
    _attachmentNames=..., deletedAttachments=...) at ../../../../kresources/kolab/shared/resourcekolabbase.cpp:185
#57 0xaec70890 in KCal::ResourceKolab::sendKMailUpdate (this=0xb2c0d80, incidencebase=0xbc85700, subresource=..., 
    sernum=9771497) at ../../../../kresources/kolab/kcal/resourcekolab.cpp:537
#58 0xaec71ae6 in KCal::ResourceKolab::incidenceUpdatedSilent (this=0xb2c0d80, incidencebase=0xbc85700)
    at ../../../../kresources/kolab/kcal/resourcekolab.cpp:363
#59 0xaec71c34 in KCal::ResourceKolab::incidenceUpdated (this=0xb2c0d80, incidencebase=0xbc85700)
    at ../../../../kresources/kolab/kcal/resourcekolab.cpp:375
#60 0xaec731a9 in KCal::ResourceKolab::addIncidence (this=0xb2c0d80, incidence=0xa47d4e90, _subresource=..., 
    sernum=9771497) at ../../../../kresources/kolab/kcal/resourcekolab.cpp:681
#61 0xaec73eb7 in KCal::ResourceKolab::fromKMailAddIncidence (this=0xb2c0d80, type=..., subResource=..., 
    sernum=9771497, format=0, data=...) at ../../../../kresources/kolab/kcal/resourcekolab.cpp:925
#62 0xaec4f946 in Kolab::KMailConnection::fromKMailAddIncidence (this=0xb2c3620, type=..., folder=..., sernum=9771497, 
    format=0, data=...) at ../../../../kresources/kolab/shared/kmailconnection.cpp:144
#63 0xaec5054a in Kolab::KMailConnection::qt_metacall (this=0xb2c3620, _c=QMetaObject::InvokeMetaMethod, _id=0, 
    _a=0xbf986888) at ./kmailconnection.moc:90
#64 0xb6c597aa in QMetaObject::metacall (object=0xb2c3620, cl=QMetaObject::InvokeMetaMethod, idx=4, argv=0xbf986888)
    at kernel/qmetaobject.cpp:237
#65 0xb6c681bb in QMetaObject::activate (sender=0xadaa200, m=0xaec7e224, local_signal_index=1, argv=0xbf986888)
    at kernel/qobject.cpp:3295
#66 0xaec77a65 in OrgKdeKmailGroupwareInterface::incidenceAdded (this=0xadaa200, _t1=..., _t2=..., _t3=9771497, _t4=0, 
    _t5=...) at kmail_groupwareinterface.moc:183
#67 0xaec77f4a in OrgKdeKmailGroupwareInterface::qt_metacall (this=0xadaa200, _c=QMetaObject::InvokeMetaMethod, _id=1, 
    _a=0xbf986ba8) at kmail_groupwareinterface.moc:132
#68 0xb543aac1 in QDBusConnectionPrivate::deliverCall (this=0x98fb138, object=0xadaa200, msg=..., metaTypes=..., 
    slotIdx=6) at qdbusintegrator.cpp:904
#69 0xb5445877 in QDBusCallDeliveryEvent::placeMetaCall(QObject*) () from /usr/lib/libQtDBus.so.4
#70 0xb6c64dfe in QObject::event (this=0xadaa200, e=0xa47dd7f0) at kernel/qobject.cpp:1248
#71 0xb619c5cc in QApplicationPrivate::notify_helper (this=0x9903e20, receiver=0xadaa200, e=0xa47dd7f0)
    at kernel/qapplication.cpp:4302
#72 0xb61a315e in QApplication::notify (this=0xbf9874f4, receiver=0xadaa200, e=0xa47dd7f0)
    at kernel/qapplication.cpp:3706
#73 0xb71a3bfa in KApplication::notify (this=0xbf9874f4, receiver=0xadaa200, event=0xa47dd7f0)
    at ../../kdeui/kernel/kapplication.cpp:302
#74 0xb6c544cb in QCoreApplication::notifyInternal (this=0xbf9874f4, receiver=0xadaa200, event=0xa47dd7f0)
    at kernel/qcoreapplication.cpp:726
#75 0xb6c57f2c in sendEvent (receiver=0x0, event_type=0, data=0x98e3e00)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#76 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x98e3e00)
    at kernel/qcoreapplication.cpp:1367
#77 0xb6c580ad in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1260
#78 0xb6c8057f in sendPostedEvents (s=0x990b870)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#79 postEventSourceDispatch (s=0x990b870) at kernel/qeventdispatcher_glib.cpp:276
#80 0xb40f0305 in g_main_dispatch (context=0x99134d8)
    at /build/buildd-glib2.0_2.24.2-1-i386-AScyie/glib2.0-2.24.2/glib/gmain.c:1960
#81 IA__g_main_context_dispatch (context=0x99134d8)
    at /build/buildd-glib2.0_2.24.2-1-i386-AScyie/glib2.0-2.24.2/glib/gmain.c:2513
#82 0xb40f3fe8 in g_main_context_iterate (context=0x99134d8, block=<value optimized out>, dispatch=1, self=0x9911c70)
    at /build/buildd-glib2.0_2.24.2-1-i386-AScyie/glib2.0-2.24.2/glib/gmain.c:2591
#83 0xb40f41c8 in IA__g_main_context_iteration (context=0x99134d8, may_block=1)
    at /build/buildd-glib2.0_2.24.2-1-i386-AScyie/glib2.0-2.24.2/glib/gmain.c:2654
#84 0xb6c80075 in QEventDispatcherGlib::processEvents (this=0x98e38c8, flags=...)
    at kernel/qeventdispatcher_glib.cpp:412
#85 0xb625aed5 in QGuiEventDispatcherGlib::processEvents (this=0x98e38c8, flags=...)
    at kernel/qguieventdispatcher_glib.cpp:204
#86 0xb6c52ae9 in QEventLoop::processEvents (this=0xbf987454, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
) at kernel/qeventloop.cpp:149
#87 0xb6c52f3a in QEventLoop::exec (this=0xbf987454, flags=...) at kernel/qeventloop.cpp:201
#88 0xb6c5816f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003
#89 0xb619c667 in QApplication::exec () at kernel/qapplication.cpp:3581
#90 0x0804b472 in main (argc=1, argv=0xbf987714) at ../../../kontact/src/main.cpp:224

Detached kontact from gdb and did Menu: File -> Quit.  This time kontact didn't crash when shutting down.

This time, the file existed and has the correct, modified value.

Started kontact and switched to the Calendar view.  The event appears at the correct time without being caught in a loop.

Changed view to "Mail" view and selected "Check Mail" button.  Kontact/kmail was able to update the dimap account without any problem.
Comment 3 Denis Kurz 2016-09-24 19:24:38 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kontact (version 5.0 or later, as part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 4 Denis Kurz 2017-01-07 21:59:51 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.