Bug 164235 - High CPU+memory usage when loading corrupted .VCF files
Summary: High CPU+memory usage when loading corrupted .VCF files
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kdepimlibs
Classification: Applications
Component: kabc (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-16 17:46 UTC by T Kleindienst
Modified: 2013-07-01 17:31 UTC (History)
2 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 T Kleindienst 2008-06-16 17:46:06 UTC
Version:           1.9.9 (using 3.5.9, Arch Linux)
Compiler:          Target: i686-pc-linux-gnu
OS:                Linux (i686) release 2.6.25-ARCH

The behaviour I'm noticing only appeared after upgrading from 3.5.8 to 3.5.9 (standard precompiled Arch packages from extra repository).

When starting kmail my system hangs for 10-30 seconds (core2duo 3Ghz with 4G of Ram). CPU usage goes up to 100% during this time. Application memory goes up by around 500 Mb (KsysGuard guessing ;-)

After closing kmail, the window closes, but the top still shows kmail, and kmail starts to eat more and more RAM till the system gets completely unresponsive.

To the rescue the only possibility is to kill the remaining kmail instance.
Comment 1 T Kleindienst 2008-06-17 14:38:25 UTC
sorry.... it's not kmails fault...

After investigating a bit further. I found the reason:

It's kabc (the addressbook). I was loading a .vcf-file with 1600 entries as std.vcf. Sadly kadressbook is not capable of handling large .vcf-files it seems. 1600 adresses were causing 500 megs of RAM usage.. still strange ;-)

so far... don't want to close it yet. Still trying to find out a bit more. No traceback yet.
Comment 2 Thomas McGuire 2008-06-17 18:22:19 UTC
Moving this to Kontact (as we don't seem to have a KABC in the products list)
Comment 3 T Kleindienst 2008-06-23 17:05:25 UTC
The .vcf file was damaged somewhere in the middle. This was causing kabc to memory leak and finally crashing.
kabc is very much capable of handling 1600 entries, but it's not safe to open a corrupted .vcf-file. 
Shall I close this bug?
Comment 4 Thomas McGuire 2008-06-23 17:27:55 UTC
> Shall I close this bug? 
You could attach a minimal testcase (a small .vcf file which has the problem), maybe someone has time to look into that. 
Comment 5 T Kleindienst 2008-06-23 17:40:14 UTC
I don't have the original file anymore, but I remember what it was looking like in khexedit:
it was 2mb of standard .vcf entries, the last entry was _not_ closed with END:VCARD
then, 160mb of nonsense (mainly 0s) were filling up the rest of the file.

I should have seen it right from the beginning. A 162mb .vcf-file is somehow dubious.
Comment 6 FiNeX 2008-12-26 19:29:21 UTC
It this bug reproducible on KDE 4 too?