Bug 298257 - Akonadi resources start using a lot of memory and cpu when a .dat file is corrupted
Summary: Akonadi resources start using a lot of memory and cpu when a .dat file is cor...
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: libakonadi (show other bugs)
Version: 4.9
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 298121 298626 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-16 17:45 UTC by Christophe Marin
Modified: 2012-10-22 15:37 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.3


Attachments
Corrupted .dat file (8 bytes, application/octet-stream)
2012-04-16 17:45 UTC, Christophe Marin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Marin 2012-04-16 17:45:32 UTC
Created attachment 70435 [details]
Corrupted .dat file

Using master.

I suppose the issue appeared because of a short power outage.

The symptoms:
- The mailfilter agent was using 50% cpu after restart,
- The memory usage keeps increasing
- The mailfilter agent appears offline in akonadiconsole (despite having Online=true in agent_config_akonadi_mailfilter_agent)
- The resource doesn't react to dbus calls.

Renaming agent_config_akonadi_mailfilter_agent_changes.dat fixed the issue. 
and the issue is back as soon as the corrupted file is restored.
Comment 1 Christophe Marin 2012-04-23 20:27:56 UTC
*** Bug 298121 has been marked as a duplicate of this bug. ***
Comment 2 Christophe Marin 2012-04-23 20:28:57 UTC
From bug 298121:

Efter logging into KDE4 my system becomes sluggish for at least 10 - 15 minutes. The problem seems to be that akonadi_agent_launcher claims 1.7GB of my 2GB memory. 
During the first minute after login akonadi_agent_launcher rapidly claims more and more  RAM until 85-90% of my RAM is consumed. During these 10-15 minutes my hard disk is frantically active and my system is in practice not usable. 

The parent process to akonadi_agent_launcher is akonadi_control. 

--

Deleting the concerned .dat file fixed the issue for the reporter
Comment 3 Christophe Marin 2012-04-26 15:30:29 UTC
*** Bug 298626 has been marked as a duplicate of this bug. ***
Comment 4 Christophe Marin 2012-04-26 15:31:29 UTC
From bug 298626
-- Information about the crash:
- What I was doing when the application crashed:

My system was completely frozen due to a kernel panic, so I manually powered it down and started again.  After boot, I got this crash, restarted the mailfilter_agent, and then got it again.  

I saw something similar after upgrading from KDE 4.7 to 4.8.  I suspect some kind of data corruption or unexpected condition causes mailfter_agent to crash.  When this happened before, it took deleting all the local data and then re-importing it to get mailfilter_agent to work again.

---

Deleting the concerned .dat file also fixed the issue for the reporter.
Comment 5 Scott Kitterman 2012-04-26 19:15:40 UTC
akonadi_mailfilter_agent is shipped as part of kmail, so I think the product is wrong on this bug.
Comment 6 Christophe Marin 2012-04-26 19:26:59 UTC
no, the trick above worked also for other Akonadi resources
Comment 7 Christophe Marin 2012-10-22 15:35:45 UTC
Should be fixed in 4.9.3 with commit b927825 (in kdepimlibs)