Bug 146156 - Mails sometimes disappear in IMAP folder
Summary: Mails sometimes disappear in IMAP folder
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: 1.9.7
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-30 15:57 UTC by Michael
Modified: 2010-01-07 02:31 UTC (History)
1 user (show)

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 Michael 2007-05-30 15:57:53 UTC
Version:           1.9.7 (using KDE KDE 3.5.7)
Installed from:    Ubuntu Packages
OS:                Linux

Sometimes when I select an unopened e-mail in my IMAP folder either it or another unopened e-mail disappears from KMail/Kontact's display.  I have to refresh once or twice to get it back.  This only happens with this particular IMAP account, but does not occur in Thunderbird.  I have been seeing this problem since KDE 3.3 or 3.4 (but formerly it occurred much more frequently).

In addition (I suspect that it is related, but I am not sure), when the mailbox is refreshed (I have interval checking set), the currently selected e-mail is not always remembered, but instead KMail switches to one further up the list.  Occasionally, all mails except the first few disappear in the inbox until I refresh once or twice.

And finally (related or not?), KMail shows the contents of my inbox when I select the drafts folder on the IMAP account, and shows the drafts folder as having new mail when new mail arrives.

Please let me know if I can provide any additional information.  If you can tell me where to look, I can also try getting Ubuntu's debug symbols and taking a look inside gdb.
Comment 1 Michael 2007-05-30 16:02:18 UTC
Mails also sometimes disappear (not just unread ones) when I delete other mails.
Comment 2 Michael 2007-05-30 16:21:23 UTC
And sometimes when I refresh, no mail is found at all.
Comment 3 Michael 2007-05-30 17:44:30 UTC
Mails disappearing (as per comment #1) mainly occurs if I delete several mails in close succession.
Comment 4 Michael 2007-05-31 16:55:42 UTC
The first time I delete an e-mail after a refresh of the IMAP mailbox this works fine.  If I delete subsequent e-mails without refreshing first, the e-mail below the deleted one tends to disappear.
Comment 5 Michael 2007-05-31 17:55:16 UTC
Deleting a message after a refresh and selecting another causes the selected message to disappear.  I currently have some 500 messages in my inbox, although I don't think I have had that many the whole time that I have been experiencing this problem.
Comment 6 Thomas McGuire 2007-06-05 22:54:40 UTC
Are you using online or disconnected IMAP?
Comment 7 Michael 2007-06-05 23:20:25 UTC
Online.
Comment 8 Thomas McGuire 2007-06-07 19:02:02 UTC
This sounds a lot like bug 121866. Do you think this is the same problem?
Comment 9 Michael 2007-06-08 10:20:08 UTC
It sounds similar, but there is at least one important difference.  When I refresh Thunderbird's mail display during a KMail update, nothing disappears in Thunderbird's display.  And I have not lost any data so far, even though KMail occasionally crashes during mail updates (that is, its memory consumption increases until either I or Linux shoot it down).  I saw other symptoms which looked similar to what was reported in the other bug (mails being shown twice in the inbox) in earlier KDE/KMail versions, but they have disappeared for me in 3.5.7, or possibly in an earlier version.
Comment 10 Michael 2007-06-11 10:12:19 UTC
Sorry that I am continuing to add things that may or may not be related.  Over the last couple of days, KMail has started freezing when I try to refresh my e-mail manually after deleting a couple of mails (in order to get back the entries which have disappeared).  CPU usage roughly 50%, constant memory usage of 3.8%.

I took a backtrace of Kontact in this frozen state (I currently only have limited debugging information available):

(gdb) thread apply all bt

Thread 5 (Thread -1259996272 (LWP 6676)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb62225c6 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb781edbd in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0xb72ca214 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#4  0xb7f2a1b6 in KPIM::ThreadWeaver::Weaver::applyForWork ()
   from /usr/lib/libkdepim.so.1
#5  0xb7f2ac66 in KPIM::ThreadWeaver::Thread::run ()
   from /usr/lib/libkdepim.so.1
#6  0xb6f7afd9 in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
#7  0xb621e31b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8  0xb781257e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 4 (Thread -1268388976 (LWP 6677)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb62225c6 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb781edbd in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0xb72ca214 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#4  0xb7f2a1b6 in KPIM::ThreadWeaver::Weaver::applyForWork ()
   from /usr/lib/libkdepim.so.1
#5  0xb7f2ac66 in KPIM::ThreadWeaver::Thread::run ()
   from /usr/lib/libkdepim.so.1
#6  0xb6f7afd9 in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
#7  0xb621e31b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8  0xb781257e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 3 (Thread -1276781680 (LWP 6678)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb62225c6 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb781edbd in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0xb72ca214 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#4  0xb7f2a1b6 in KPIM::ThreadWeaver::Weaver::applyForWork ()
   from /usr/lib/libkdepim.so.1
#5  0xb7f2ac66 in KPIM::ThreadWeaver::Thread::run ()
   from /usr/lib/libkdepim.so.1
#6  0xb6f7afd9 in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
#7  0xb621e31b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8  0xb781257e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread -1285174384 (LWP 6679)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb62225c6 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb781edbd in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0xb72ca214 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#4  0xb7f2a1b6 in KPIM::ThreadWeaver::Weaver::applyForWork ()
   from /usr/lib/libkdepim.so.1
#5  0xb7f2ac66 in KPIM::ThreadWeaver::Thread::run ()
   from /usr/lib/libkdepim.so.1
#6  0xb6f7afd9 in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
#7  0xb621e31b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8  0xb781257e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread -1242642736 (LWP 6675)):
#0  0xb70de56f in QListViewItem::listView () from /usr/lib/libqt-mt.so.3
#1  0xb67f7864 in KListViewItem::insertItem () from /usr/lib/libkdeui.so.4
#2  0xb51f15b2 in KMHeaders::msgRemoved () from /usr/lib/libkmailprivate.so
#3  0xb53031a0 in KMHeaders::qt_invoke () from /usr/lib/libkmailprivate.so
#4  0xb6feb88b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#5  0xb50f6b80 in KMFolder::msgRemoved () from /usr/lib/libkmailprivate.so
#6  0xb51e718f in KMFolder::qt_emit () from /usr/lib/libkmailprivate.so
#7  0xb6feb85f in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#8  0xb50f5bf0 in FolderStorage::msgRemoved () from /usr/lib/libkmailprivate.so
#9  0xb5263392 in FolderStorage::removeMsg () from /usr/lib/libkmailprivate.so
#10 0xb536b31a in KMFolderImap::removeMsg () from /usr/lib/libkmailprivate.so
#11 0xb536f6a3 in KMFolderImap::slotListFolderResult ()
   from /usr/lib/libkmailprivate.so
#12 0xb537a35a in KMFolderImap::qt_invoke () from /usr/lib/libkmailprivate.so
#13 0xb6feb88b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#14 0xb6a99eee in KIO::Job::result () from /usr/lib/libkio.so.4
#15 0xb6adbbad in KIO::Job::emitResult () from /usr/lib/libkio.so.4
#16 0xb6ae7e3e in KIO::SimpleJob::slotFinished () from /usr/lib/libkio.so.4
#17 0xb6ae81bd in KIO::ListJob::slotFinished () from /usr/lib/libkio.so.4
#18 0xb6aebd1e in KIO::ListJob::qt_invoke () from /usr/lib/libkio.so.4
#19 0xb6feb88b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#20 0xb6fec330 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#21 0xb6a9587c in KIO::SlaveInterface::finished () from /usr/lib/libkio.so.4
#22 0xb6b05e50 in KIO::SlaveInterface::dispatch () from /usr/lib/libkio.so.4
#23 0xb6b04e4a in KIO::SlaveInterface::dispatch () from /usr/lib/libkio.so.4
#24 0xb6aab11c in KIO::Slave::gotInput () from /usr/lib/libkio.so.4
#25 0xb6af5000 in KIO::Slave::qt_invoke () from /usr/lib/libkio.so.4
#26 0xb6feb88b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#27 0xb6fec1a2 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#28 0xb7378877 in QSocketNotifier::activated () from /usr/lib/libqt-mt.so.3
#29 0xb700e44a in QSocketNotifier::event () from /usr/lib/libqt-mt.so.3
#30 0xb6f82a60 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#31 0xb6f8488f in QApplication::notify () from /usr/lib/libqt-mt.so.3
#32 0xb76bec32 in KApplication::notify () from /usr/lib/libkdecore.so.4
#33 0xb6f151e9 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#34 0xb6f74e59 in QEventLoop::activateSocketNotifiers ()
   from /usr/lib/libqt-mt.so.3
#35 0xb6f29d07 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#36 0xb6f9d136 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#37 0xb6f9cf46 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#38 0xb6f84609 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#39 0x08061e25 in ?? ()
#40 0xbfcca6dc in ?? ()
#41 0x00000001 in ?? ()
#42 0x00000001 in ?? ()
#43 0x00000000 in ?? ()
#0  0xb70de56f in QListViewItem::listView () from /usr/lib/libqt-mt.so.3
Comment 11 Michael 2007-06-15 08:22:30 UTC
And the daily update of interesting things I am seeing in KMail - after a mail refresh, I just found that all e-mails in my inbox were listed twice.
Comment 12 Michael 2007-10-30 15:40:20 UTC
I tried kmail 1.9.6 in Kubuntu 7.10 (KDE 3.5.8) and kmail 1.7.2 in Knoppix 3.8 in a virtual machine (KDE 3.3.2).  The first shows this bug, but the second (the old version) seems to work without any problems!  This sounds like it might be an old regression.  I will try some other versions and setups when I have time.
Comment 13 Michael 2007-10-31 17:26:19 UTC
This seems to occur in KMail 1.8.1 in Knoppix 4.0.2.
Comment 14 Michael 2007-10-31 18:22:04 UTC
Sorry, I did reproduce it with kmail 1.7.2 after all.
Comment 15 Björn Ruberg 2010-01-06 01:56:29 UTC
How about a recent KDE 4.3? I have closed some similar bug reports as fixed, so its worth investigating
Comment 16 Michael 2010-01-06 22:17:34 UTC
Thanks for the answer.  I'm afraid though that I no longer use KDE as my DE (and had long forgotten about this open bug :) ), so you are probably best closing this bug as obsolete.