Bug 213951 - Removing DIMAP Accounts from KMail crashes Kontact
Summary: Removing DIMAP Accounts from KMail crashes Kontact
Status: RESOLVED NOT A BUG
Alias: None
Product: kontact
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-10 10:23 UTC by Daniel Buus
Modified: 2009-11-16 16:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (393.42 KB, image/png)
2009-11-10 10:29 UTC, Daniel Buus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Buus 2009-11-10 10:23:07 UTC
Application that crashed: kontact
Version of the application: 4.3.2
KDE Version: 4.3.2 (KDE 4.3.2)
Qt Version: 4.5.2
Operating System: Linux 2.6.31-14-generic x86_64
Distribution: Ubuntu 9.10

What I was doing when the application crashed:
Removing personal stuff from my work laptop, I was deleting two DIMAP accounts, one GMail, one Google Apps, ~15 GB of mails in total.

Clicking Apply, disk activitiy maxed out, I assume because KMail started deleting local subscriptions from disk, and I continued working. Some time later, disk activity stopped, and I checked back with KMail to see if it had finished.

I was presented with 10-20 dialogs saying something like "error, can't find folder [some folder from the dimap cache directory]", and after clicking OK on all of them, KMail crashed and took down Kontact with it.

Mail interval checking was on, but only for two other POP3 accounts which were not deleted. The two DIMAP accounts did not have interval mail checking.

 -- Backtrace:
Application: Kontact (kontact), signal: Segmentation fault
[KCrash Handler]
#5  0x00007fbf96927184 in ?? () from /usr/lib/libkmailprivate.so.4
#6  0x00007fbf9692a54c in ?? () from /usr/lib/libkmailprivate.so.4
#7  0x00007fbfac1f2ddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#8  0x00007fbf969216d2 in KMail::AccountManager::checkedMail(bool, bool, QMap<QString, int> const&) () from /usr/lib/libkmailprivate.so.4
#9  0x00007fbf9692370d in KMail::AccountManager::processNextCheck(bool) () from /usr/lib/libkmailprivate.so.4
#10 0x00007fbf96923e02 in KMail::AccountManager::singleCheckMail(KMAccount*, bool) () from /usr/lib/libkmailprivate.so.4
#11 0x00007fbf9689b7d1 in ?? () from /usr/lib/libkmailprivate.so.4
#12 0x00007fbfac1f2ddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#13 0x00007fbfac1ecd83 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#14 0x00007fbfacafdefc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#15 0x00007fbfacb051ce in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#16 0x00007fbfad734ab6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#17 0x00007fbfac1ddc2c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#18 0x00007fbfac208862 in ?? () from /usr/lib/libQtCore.so.4
#19 0x00007fbfac20625d in ?? () from /usr/lib/libQtCore.so.4
#20 0x00007fbfa5a57bbe in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#21 0x00007fbfa5a5b588 in ?? () from /lib/libglib-2.0.so.0
#22 0x00007fbfa5a5b6b0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#23 0x00007fbfac2061a6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#24 0x00007fbfacb924be in ?? () from /usr/lib/libQtGui.so.4
#25 0x00007fbfac1dc532 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#26 0x00007fbfac1dc904 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#27 0x00007fbfacf789de in QDialog::exec() () from /usr/lib/libQtGui.so.4
#28 0x00007fbfad6bb185 in KMessageBox::createKMessageBox(KDialog*, QIcon const&, QString const&, QStringList const&, QString const&, bool*, QFlags<KMessageBox::Option>, QString const&, QMessageBox::Icon) () from /usr/lib/libkdeui.so.5
#29 0x00007fbfad6bc400 in KMessageBox::createKMessageBox(KDialog*, QMessageBox::Icon, QString const&, QStringList const&, QString const&, bool*, QFlags<KMessageBox::Option>, QString const&) ()
   from /usr/lib/libkdeui.so.5
#30 0x00007fbfad6bcb30 in KMessageBox::sorryWId(unsigned long, QString const&, QString const&, QFlags<KMessageBox::Option>) () from /usr/lib/libkdeui.so.5
#31 0x00007fbfad6bcc66 in KMessageBox::sorry(QWidget*, QString const&, QString const&, QFlags<KMessageBox::Option>) () from /usr/lib/libkdeui.so.5
#32 0x00007fbf969dead5 in ?? () from /usr/lib/libkmailprivate.so.4
#33 0x00007fbf969dcc44 in ?? () from /usr/lib/libkmailprivate.so.4
#34 0x00007fbf9690985a in ?? () from /usr/lib/libkmailprivate.so.4
#35 0x00007fbf9692719a in ?? () from /usr/lib/libkmailprivate.so.4
#36 0x00007fbf9692a54c in ?? () from /usr/lib/libkmailprivate.so.4
#37 0x00007fbfac1f2ddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#38 0x00007fbf969216d2 in KMail::AccountManager::checkedMail(bool, bool, QMap<QString, int> const&) () from /usr/lib/libkmailprivate.so.4
#39 0x00007fbf9692370d in KMail::AccountManager::processNextCheck(bool) () from /usr/lib/libkmailprivate.so.4
#40 0x00007fbf96923e02 in KMail::AccountManager::singleCheckMail(KMAccount*, bool) () from /usr/lib/libkmailprivate.so.4
#41 0x00007fbf9689b7d1 in ?? () from /usr/lib/libkmailprivate.so.4
#42 0x00007fbf969f4bf0 in ?? () from /usr/lib/libkmailprivate.so.4
#43 0x00007fbfac1f2ddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#44 0x00007fbfac1ecd83 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#45 0x00007fbfacafdefc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#46 0x00007fbfacb051ce in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#47 0x00007fbfad734ab6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#48 0x00007fbfac1ddc2c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#49 0x00007fbfac208862 in ?? () from /usr/lib/libQtCore.so.4
#50 0x00007fbfac20625d in ?? () from /usr/lib/libQtCore.so.4
#51 0x00007fbfa5a57bbe in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#52 0x00007fbfa5a5b588 in ?? () from /lib/libglib-2.0.so.0
#53 0x00007fbfa5a5b6b0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#54 0x00007fbfac2061a6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#55 0x00007fbfacb924be in ?? () from /usr/lib/libQtGui.so.4
#56 0x00007fbfac1dc532 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#57 0x00007fbfac1dc904 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#58 0x00007fbfacf789de in QDialog::exec() () from /usr/lib/libQtGui.so.4
#59 0x00007fbfad6bb185 in KMessageBox::createKMessageBox(KDialog*, QIcon const&, QString const&, QStringList const&, QString const&, bool*, QFlags<KMessageBox::Option>, QString const&, QMessageBox::Icon) () from /usr/lib/libkdeui.so.5
#60 0x00007fbfad6bc400 in KMessageBox::createKMessageBox(KDialog*, QMessageBox::Icon, QString const&, QStringList const&, QString const&, bool*, QFlags<KMessageBox::Option>, QString const&) ()
   from /usr/lib/libkdeui.so.5
#61 0x00007fbfad6bcb30 in KMessageBox::sorryWId(unsigned long, QString const&, QString const&, QFlags<KMessageBox::Option>) () from /usr/lib/libkdeui.so.5
#62 0x00007fbfad6bcc66 in KMessageBox::sorry(QWidget*, QString const&, QString const&, QFlags<KMessageBox::Option>) () from /usr/lib/libkdeui.so.5
#63 0x00007fbf969dead5 in ?? () from /usr/lib/libkmailprivate.so.4
#64 0x00007fbf969dcc44 in ?? () from /usr/lib/libkmailprivate.so.4
#65 0x00007fbf96c00884 in ?? () from /usr/lib/libkmailprivate.so.4
#66 0x00007fbf96803854 in ?? () from /usr/lib/libkmailprivate.so.4
#67 0x00007fbfac1f2ddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#68 0x00007fbf968dfc9a in ?? () from /usr/lib/libkmailprivate.so.4
#69 0x00007fbfac1f2ddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#70 0x00007fbf96909fb2 in ?? () from /usr/lib/libkmailprivate.so.4
#71 0x00007fbf9690cfdb in ?? () from /usr/lib/libkmailprivate.so.4
#72 0x00007fbf969c3474 in ?? () from /usr/lib/libkmailprivate.so.4
#73 0x00007fbf96930fa3 in ?? () from /usr/lib/libkmailprivate.so.4
#74 0x00007fbf96930fbb in ?? () from /usr/lib/libkmailprivate.so.4
#75 0x00007fbf969f841e in KMKernel::cleanupImapFolders() () from /usr/lib/libkmailprivate.so.4
#76 0x00007fbf9682602c in ?? () from /usr/lib/libkmailprivate.so.4
#77 0x00007fbf96864f21 in ConfigModuleWithTabs::save() () from /usr/lib/libkmailprivate.so.4
#78 0x00007fbfab5a38a7 in KCModuleProxy::save() () from /usr/lib/libkutils.so.4
#79 0x00007fbfab59e528 in ?? () from /usr/lib/libkutils.so.4
#80 0x00007fbfab5a09dc in KCMultiDialog::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkutils.so.4
#81 0x00007fbf9682ac70 in ?? () from /usr/lib/libkmailprivate.so.4
#82 0x00007fbfac1f2ddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#83 0x00007fbfad6a938a in KDialog::slotButtonClicked(int) () from /usr/lib/libkdeui.so.5
#84 0x00007fbfad6ab6b9 in KDialog::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkdeui.so.5
#85 0x00007fbfad75fa10 in KPageDialog::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkdeui.so.5
#86 0x00007fbfab5a08f0 in KCMultiDialog::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkutils.so.4
#87 0x00007fbf9682ac70 in ?? () from /usr/lib/libkmailprivate.so.4
#88 0x00007fbfac1f2ddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#89 0x00007fbfac1f590e in QSignalMapper::mapped(int) () from /usr/lib/libQtCore.so.4
#90 0x00007fbfac1f6b00 in QSignalMapper::map(QObject*) () from /usr/lib/libQtCore.so.4
#91 0x00007fbfac1f6d70 in QSignalMapper::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#92 0x00007fbfac1f2ddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#93 0x00007fbfad0ff8e7 in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4
#94 0x00007fbface6141b in ?? () from /usr/lib/libQtGui.so.4
#95 0x00007fbface6302b in ?? () from /usr/lib/libQtGui.so.4
#96 0x00007fbface63275 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#97 0x00007fbfacb4c9c0 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#98 0x00007fbfacafdefc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#99 0x00007fbfacb05011 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#100 0x00007fbfad734ab6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#101 0x00007fbfac1ddc2c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#102 0x00007fbfacb048e0 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&) () from /usr/lib/libQtGui.so.4
#103 0x00007fbfacb6aa0e in ?? () from /usr/lib/libQtGui.so.4
#104 0x00007fbfacb69aa9 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#105 0x00007fbfacb92d0c in ?? () from /usr/lib/libQtGui.so.4
#106 0x00007fbfa5a57bbe in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#107 0x00007fbfa5a5b588 in ?? () from /lib/libglib-2.0.so.0
#108 0x00007fbfa5a5b6b0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#109 0x00007fbfac2061a6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#110 0x00007fbfacb924be in ?? () from /usr/lib/libQtGui.so.4
#111 0x00007fbfac1dc532 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#112 0x00007fbfac1dc904 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#113 0x00007fbfac1deab9 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#114 0x0000000000403f47 in _start ()

Reported using DrKonqi
Comment 1 Daniel Buus 2009-11-10 10:29:23 UTC
Created attachment 38223 [details]
Screenshot
Comment 2 Daniel Buus 2009-11-10 10:31:44 UTC
Hmmm... Seems it left KMail in a somewhat half-configured state. At program start I am now presented with previous screen.

Entering KMail Accounts settings, I see no trace of the deleted DIMAP accounts, but each time I exit settings I get several dialogs like,

"Error opening /home/daniel/.kde/share/apps/kmail/dimap/1137026232; this folder is missing."

that I have to click OK to. One directory remains in the dimap directory, totalling 84kB.
Comment 3 Daniel Buus 2009-11-10 11:36:15 UTC
Got rid of the dialogs by cleaning up kmailrc in ~/.kde/share/config/ - there was 120+ kB of crud in there, dating quite awhile back :)
Comment 4 Christophe Marin 2009-11-12 23:45:03 UTC
Glad it's fixed. As the backtrace is missing the debug symbols, I'll just close the bug with 'worksforme' (unless you want to reproduce it :))
Comment 5 Daniel Buus 2009-11-15 11:19:26 UTC
Hi again :) Sorry for the late response - joined the übercool people who have the new improved flu ;)

Also, sorry for being imprecise - what was fixed by my tampering with the rc file was simply the multitude of dialogs that would pop up again and again when using the program after the crash happened. So the OB, the crashing, is still, well, open or whatever :)

Anyway, it happened again at home, where I did the same thing on my home laptop (removing two (actually the same two) DIMAP accounts for Google mails). Eventually went into dialog spasms, then crashed, then spammed me with dialogs on restart and periodically while using the program.

I'm wondering if this has anything to do with the buggy way that big numbers of email is handled in KMail? For instance, when copying/moving many emails from one folder to another, I have to make sure not to copy too many at a time, or KMail will eat all available memory, then all the swap space, then moving the mouse becomes close to impossible, then KDE starts killing processes, then KDM goes down in flames.

Actually, I previously thought that this was probably because KMail copied all source mails into memory before putting them into the target, but I just moved about 1000 mails from one IMAP account to another IMAP account (no local files), and within roughly 10 secs, KMail had eaten 64.5% of my 4GB memory, then started to do the moving. This cannot be because of copying the mails into memory, as they're on an IMAP server, so fetching them would take much longer than 10 secs...

Also, while moving them, the memory usage slowly increased to just over 70%, then slowly decreased to 67.4% when it finished. Interesting, that was half an hour ago, and KMail has still not released the memory. This sounds like a bad memory leak, doesn't it? And would explain why KMail crashes so often when doing interval mail checks on my old DIMAP setup (my GMail has more than 20,000 messages). I actually turned off interval checks on DIMAP to avoid getting the stuttering-mouse-everybody-swapping-argh-konsole-killall-9-kontact-phew scenario :)

Anyway, sorry, this is probably a completely different bug, should've filed it elsewhere, I'm just wondering if these are related... And probably there won't be any work on the mail data structures, since AFAIU, you're currently working on letting Akonadi do the storage now, right? Or maybe I'm just misinformed :)
Comment 6 Christophe Marin 2009-11-15 14:14:09 UTC
The growing memory when moving emails around is already reported: that's bug 185147. It will probably be fixed as soon as KMail uses akonadi (in KDE 4.5).

For the current report: The backtrace is not helpful without the debug symbols.
(the '?? () from /usr/lib/libkmailprivate.so.4' lines are useless).

http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports has some informations about how to improve it.
Comment 7 Daniel Buus 2009-11-16 16:14:43 UTC
Roger! Thanks :)

However, I can't reintroduce the bug, as in the meantime I've finished my email maintenance and no longer have the original files...

I'm therefore marking it resolved. Thanks for your time, though :)

Looking forward to the Akonadi-based new version!