Bug 59069 - Attaching large files eats up system memory
Summary: Attaching large files eats up system memory
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.10 pre
Platform: unspecified Linux
: NOR crash with 20 votes (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 15465 17067 58615 61959 83703 87152 87309 92878 100431 105051 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-28 04:51 UTC by michael
Modified: 2017-01-07 21:30 UTC (History)
13 users (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 2003-05-28 04:51:20 UTC
Version:           1.5.2 (using KDE 3.1.2)
Installed from:     (3.0)
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease)
OS:          Linux (i686) release 2.2.20

There are several other bugs reported on large file crashes, but I didn't see a resolution, only that they were imported into bugs.kde.org.
Attached a 7 MG file and 6 MG file, both .deb's and after about 10 seonds during which it appeared to be trying to send (hourglass) a kmail crash with NO CRASH HANDLER.
Comment 1 Chris Howells 2003-05-28 21:31:07 UTC
KMail is most likely not crashing but being killed by the out of memory killer,
which is why you don't see a crash handler (check the end of dmesg for
confirmation).

In any case, please _do not_ knowingly report duplicates, it merely wastes
developer time.

*** This bug has been marked as a duplicate of 17067 ***
Comment 2 michael 2003-05-28 22:07:38 UTC
In this case, I could NOT confirm it was a duplicate of another bug, as there was no 
info or comments on the bug I was comparing it to.  And I find this one hard to 
believe that it was killed by the OOM killer, as at the time, the machine was lightly 
loaded, and the swap was never touched. 
Comment 3 Ingo Klöcker 2003-05-29 00:30:37 UTC
Subject: Re:  New: kmail attachment large file crash

Please run kmail with gdb ('gdb /pathtokmail/kmail' and then 'run 
--nofork') and reproduce the crash. You should then get a backtrace 
with 'bt'.

I just tried to send a 23 MB attachment with KMail 1.5.2. Apart from the 
facts that my SMTP server rejected the message (Error: message too 
large) and that KMail used the incredible amount of 270 MB (after 
starting it consumed ~40 MB and after attaching the 23 MB is consumed 
~70 MB) everything worked. No crash.

Comment 4 michael 2003-05-29 01:06:38 UTC
Subject: Re:  kmail attachment large file crash

Okay, I may be proven wrong once again.. *GASP*
Ran as below, and surprised to see.. kmail initially wanted 47 MG, but quickly 
presumed to use over 140 Mg and I was only attaching 13 MG worth of 
attachments to the email.  How in the heck does it need all that memory?
But it may be something else as well.

Result?

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 12532)]
0x0807b94e in KDialog::marginHint ()

PS, when I re-opened kmail normally after the test, the outbound offending 
email had reached the outbox, and was sent normally albeit, kmail used 50 MG 
of ram, when I sent this message.

On Wednesday 28 May 2003 15:30, you wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=59069
>
>
>
>
> ------- Additional Comments From kloecker@kde.org  2003-05-29 00:30 -------
> Subject: Re:  New: kmail attachment large file crash
>
> Please run kmail with gdb ('gdb /pathtokmail/kmail' and then 'run
> --nofork') and reproduce the crash. You should then get a backtrace
> with 'bt'.
>
> I just tried to send a 23 MB attachment with KMail 1.5.2. Apart from the
> facts that my SMTP server rejected the message (Error: message too
> large) and that KMail used the incredible amount of 270 MB (after
> starting it consumed ~40 MB and after attaching the 23 MB is consumed
> ~70 MB) everything worked. No crash.

Comment 5 Stephan Kulow 2003-09-20 15:17:08 UTC
*** Bug 58615 has been marked as a duplicate of this bug. ***
Comment 6 Stephan Kulow 2003-09-20 19:20:54 UTC
*** Bug 17067 has been marked as a duplicate of this bug. ***
Comment 7 Stephan Kulow 2003-09-20 19:56:14 UTC
*** Bug 61959 has been marked as a duplicate of this bug. ***
Comment 8 noster 2003-11-05 22:12:18 UTC
I actually tested KMail 1.5.93 [KDE 3.1.93 (CVS>=20031028)] and it still is being closed by out of memory killer after eating whole system memory and swap (512+1024 MB total) for encoding ~110MB of attachment. It's insane quantity of attachment but still...
Comment 9 Ingo Klöcker 2003-11-06 11:40:28 UTC
Michael, can you still reproduce this problem, i.e. the crash due to a segmentation fault, not the ridiculous amount of memory KMail uses? If yes, then please either try with a self-compiled version of the latest stable KMail version (cf. http://kmail.ingo-kloecker.de/) or with a self-compiled (with full debug information) KMail from KDE 3.2beta1 or later.
Comment 10 michael 2003-11-06 17:16:24 UTC
Sorry, just been really swamped here with the business, and haven't had 10 minutes to set aside to test this again..  And my main box is in a certain state that I dont' want to add a kmail compiled from source right now, will have to test it on a seperate server.. Sorry, that I am not more helpful right now Ingo, days dont' have enough hours..  I will ATTEMPT to set aside a time, but this issue is a lower priority for me, and since most of our clients aren't sending large files, they haven't complained about it, so hard to treat this as a support incident.
Comment 11 Ingo Klöcker 2004-01-15 20:50:46 UTC
*** Bug 15465 has been marked as a duplicate of this bug. ***
Comment 12 Till Adam 2004-07-18 16:56:07 UTC
*** Bug 83703 has been marked as a duplicate of this bug. ***
Comment 13 Ismail Donmez 2004-07-20 18:28:04 UTC
Attached a 184mb  file it took about 1 minute. Tried to send kmail disappeared meaning it possibly get killed.
Comment 14 Till Adam 2004-12-14 00:06:15 UTC
*** Bug 87152 has been marked as a duplicate of this bug. ***
Comment 15 Till Adam 2004-12-14 00:07:41 UTC
*** Bug 92878 has been marked as a duplicate of this bug. ***
Comment 16 Till Adam 2004-12-14 00:10:32 UTC
*** Bug 87309 has been marked as a duplicate of this bug. ***
Comment 17 Carsten Burghardt 2005-03-03 09:57:09 UTC
*** Bug 100431 has been marked as a duplicate of this bug. ***
Comment 18 Virgil Nisly 2005-03-16 06:30:10 UTC
Just confirming that this still happenes in kmail 1.8 (novell linux desktop, w/ suse 9.2 kde rpm's), the swap usage goes up and up when trying to view (the email) a 18MB video (that was attatched in the email)... don't have any concrete figures, but I'd say it used up an extra 200MB to try to open it, and became unresponsive (on a Athlon 2800+ w/ 512MB ram).
Thanks!
Comment 19 Thomas Keller 2005-05-03 22:30:13 UTC
Sorry that I ask, but this bug seems to be open since almost 2 years. I myself encounter problems whenever I have to handle emails with attachments >5MB (temporary lookups, even crashes). Is there no resolution for this problem?
Comment 20 Giuseppe Torelli 2005-05-04 08:09:46 UTC
>Is there no resolution for this problem?

Thunderbird :-)
Comment 21 Ismail Donmez 2005-06-12 22:36:43 UTC
*** Bug 105051 has been marked as a duplicate of this bug. ***
Comment 22 Martin Koller 2006-10-28 22:58:06 UTC
I just tested this with KDE-3.5.5 (Intel(R) Pentium(R) M processor 2.00GHz, 1GB RAM): kmail now limits to create attachement > 30MB; still with 30MB kmail is very responsive. Yes, it needs some more memory (~200MB), but it's still ok and clicking on the mail reacts in a few seconds.
Comment 23 Martin Koller 2006-11-26 11:16:05 UTC
For me it looks like a workaround has been implemented in current kmail, therefore I close this.
Comment 24 lampsys 2009-11-09 17:09:51 UTC
using kmail 1.12.3 on kde 4.3.3 trying to attach a 141M size file will result in very high memory usage (more than 1G + 1G swap) and then kmail being killed

same operation using thunderbird does not show ANY increase in memory usage

please reopen this
Comment 25 Bernd Oliver Sünderhauf 2012-12-03 14:07:49 UTC
Reopening per comment #24.
There can be no doubt that this behaviour persists on kmail2.
I basically reproduced it on KDE 4.8.90:

I'm starting with a basic memory footprint of 38M.
Adding a 29M large attachment to a new message adds ~22M of memory to the footprint, saving the message as draft temporarily takes another 90M of memory.
53M RAM are never released until restarting kmail.
Comment 26 Laurent Montel 2012-12-03 14:38:49 UTC
So you add big attachment and kmail takes memory ?
Will look at it soon.
Comment 27 Laurent Montel 2012-12-03 17:47:53 UTC
it increases each time that you attach a file or just once ?

because ok memory increases but not each time that I attach file.
Comment 28 Denis Kurz 2016-09-24 18:12:40 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 kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 29 Denis Kurz 2017-01-07 21:30:49 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.