Bug 126624 - kmail sometimes burns lots of resources reading old messages
Summary: kmail sometimes burns lots of resources reading old messages
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-02 17:30 UTC by Gareth McCaughan
Modified: 2009-12-25 23:44 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 Gareth McCaughan 2006-05-02 17:30:15 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    FreeBSD Ports
Compiler:          gcc 2.95.4, unless the FreeBSD port requests something later (which I don't think it does) 
OS:                FreeBSD

I sometimes find that KMail becomes very unresponsive and eats as many CPU cycles as it can get. On watching it with "truss", I find it exhibiting the following repeating pattern of syscalls:

gettimeofday(0xbfbfe8ec,0x0)                     = 0 (0x0)
break(0x9752000)                                 = 0 (0x0)
break(0x980f000)                                 = 0 (0x0)
break(0x998f000)                                 = 0 (0x0)
break(0x9762000)                                 = 0 (0x0)
break(0x9595000)                                 = 0 (0x0)
access("<name of a mail message file>",0) = 0 (0x0)
lstat("<name of a mail message file>",0x8a71980) = 0 (0x0)
access("<name of a mail message file>",2) = 0 (0x0)
open("<name of a mail message file>",0x2,00) = 23 (0x17)
fcntl(0x17,0x3,0x0)                              = 2 (0x2)
fcntl(0x17,0x4,0x6)                              = 0 (0x0)
break(0x95fd000)                                 = 0 (0x0)
fstat(23,0xbfbfea80)                             = 0 (0x0)
read(0x17,0x8f02000,0x200)                       = 512 (0x200)
read(0x17,0x8f02000,0x200)                       = 512 (0x200)
...
read(0x17,0x8f02000,0x200)                       = 487 (0x1e7)
fstat(23,0xbfbfead0)                             = 0 (0x0)
fcntl(0x17,0x3,0x0)                              = 6 (0x6)
fcntl(0x17,0x4,0x2)                              = 0 (0x0)
close(23)                                        = 0 (0x0)

... at which point it begins again with another file. I think (but haven't checked with great care) that it's running through every single message in my mail folders, and reading every byte of each one, 512 bytes at a time.

This seems odd. It certainly renders KMail unusable when it happens.

I don't currently have a very good handle on what determines when it happens and when it doesn't. It doesn't appear to be dependent on doing anything specific; sometimes it appears to afflict me from the moment when KMail starts running.

Background info that might be relevant:

I'm running KMail 1.8.2 on FreeBSD 4.10. My mail is on an NFS-mounted drive, symlinked from my home directory. My inbox is in mbox format and ~ 50MB in size. All my other folders are in maildir format, and they vary greatly in size.

So far as I can tell, my machine's notion of time is well synchronized with that of the NFS server. In particular, (1) if I create a file and "ls" it, the timestamp is within 1s of the time reported by "date", and (2) "ntpdate" reports very little skew (milliseconds) relative to another machine to which I believe the NFS server to be synchronized.

I'm not running KDE-as-a-whole; I'm using the (rather quirky) Ion window manager. I don't have any plugins or anything. The nearest thing to an oddity in my setup, beyond what I've already mentioned, is that I feed most of my incoming mail through bogofilter. It's definitely KMail, not bogofilter, that's eating cycles and reading lots of files.
Comment 1 Gareth McCaughan 2006-05-09 16:39:02 UTC
I've just upgraded to version 1.9.1 of KMail (from KDE 3.5.2) and this behaviour is still there.
Comment 2 Martin Koller 2006-10-28 22:19:48 UTC
Just a guess: have you configured auto-expiration of the mail folders where you see this behaviour ? Probably kmail checks the folders for this. (Still I would think kmail needs only to read the headers, but who knows ...)
Comment 3 Gareth McCaughan 2006-10-31 18:43:58 UTC
I haven't configured auto-expiration of any folder.
Comment 4 Björn Ruberg 2009-12-25 23:44:09 UTC
Still a problem in a recent kmail version?