Bug 72226

Summary: kpilotdaemon eats up memory while sync
Product: [Applications] kpilot Reporter: Thomas Vollmer <thomas-ml>
Component: kpilotDaemonAssignee: groot
Status: RESOLVED FIXED    
Severity: grave CC: drac
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: A valgrind log of the problem
Backtrace of todo sync

Description Thomas Vollmer 2004-01-09 10:31:51 UTC
Version:           CVS HEAD from 09.01.2004 (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.2 
OS:          Linux

Hi,

since around 2 weeks my kpilotDaemon crashes while syncing the todos. 

First it eats up all my memory and swap until it is killed by the kernel.

I will attach a valgrind log in the next step

Thomas
Comment 1 Thomas Vollmer 2004-01-09 10:32:48 UTC
Created attachment 4063 [details]
A valgrind log of the problem
Comment 2 Reinhold Kainhofer 2004-01-11 09:44:37 UTC
*** Bug 72345 has been marked as a duplicate of this bug. ***
Comment 3 Reinhold Kainhofer 2004-01-12 18:39:21 UTC
*** Bug 72492 has been marked as a duplicate of this bug. ***
Comment 4 groot 2004-01-13 01:01:21 UTC
How is one supposed to read a valgrind log like that? The only suspicious thing I see is that the 232 bytes which are lost, are lost in a qt function for converting strings to (from?) latin1. There have been several other latin1-related crashes reported recently.
Comment 5 Thomas Vollmer 2004-01-13 08:30:15 UTC
Sorry, this is the first time I use valgrind (and related). When You need something different, then give me a hint. I already tried to run calltree kpilotDaemon, but I run into timeing problems while sync.

And the problem is really related to the to-do conduit part. When I disable this one, I can sync the rest normal.

Thomas
Comment 6 Reinhold Kainhofer 2004-01-13 09:23:33 UTC
Subject: Re:  kpilotdaemon eats up memory while sync

Obviously (from the valgrind log) the problem is not really a leak, but rather 
something like an endless loop where in each loop some memory is allocated 
(e.g. adding the same entry to a list over and over again). I guess we really 
need to fix that for 3.2...

Reinhold
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAkADquAACgkQTqjEwhXvPN3MCACeIlqxYPjsbG27xvyiYX7uWsJq
4FUAn0e2L5iogZK+OM65M8JjbpD2ZDjc
=povc
-----END PGP SIGNATURE-----

Comment 7 Thomas Vollmer 2004-01-13 16:11:57 UTC
Created attachment 4145 [details]
Backtrace of todo sync

Okay, to make some further investigation I deleted all todos on the Plam and
also on the computer.

When I now try to sync I get a crash. So I added this BT.

Thomas
Comment 8 Reinhold Kainhofer 2004-01-15 10:59:19 UTC
Subject: kdepim/kpilot/conduits/vcalconduit

CVS commit by kainhofe: 

Fix infinite recursion (function calling itself instead of the specialized function), which made kpilotDaemon eat up all the memory.

I'd call this a pretty critical bug (not only did kpilot not work, but it consumed all memory of the system, thus locking up the whole system until the process is killed by the kernel. Meanwhile all other apps trying to allocate memory also crashed ("out of memory").

CCMAIL: 72226-done@bugs.kde.org


  M +2 -2      todo-conduit.cc   1.41


--- kdepim/kpilot/conduits/vcalconduit/todo-conduit.cc  #1.40:1.41
@@ -281,5 +281,5 @@ PilotRecord*TodoConduit::recordFromIncid
         const KCal::Todo *te = dynamic_cast<const KCal::Todo*>(e);
 
-        return recordFromIncidence(tde, te);
+        return recordFromTodo(tde, te);
 }