[Bug 258669] kmail/korganizer go into a tight loop, rapidly creating nearly empty emails in groupware/Calendar folder

Paul Millar paul at astro.gla.ac.uk
Mon Dec 6 13:35:50 GMT 2010


https://bugs.kde.org/show_bug.cgi?id=258669





--- Comment #1 from Paul Millar <paul astro gla ac uk>  2010-12-06 14:35:42 ---
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 at 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.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list