Bug 127506 - korganizer reminder daemon leaks memory
Summary: korganizer reminder daemon leaks memory
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Reinhold Kainhofer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-17 13:21 UTC by Pierre Habouzit
Modified: 2007-12-16 15:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
valgrind trace (727.80 KB, text/plain)
2006-05-17 13:22 UTC, Pierre Habouzit
Details
valgrind log showing memory leaks (36.55 KB, application/octet-stream)
2006-09-28 16:58 UTC, Rolf Offermanns
Details
possible leak plug (680 bytes, patch)
2006-09-29 00:00 UTC, Allen Winter
Details
Valgrind logfile (4.21 KB, application/octet-stream)
2007-12-16 15:54 UTC, Arne Schmitz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Habouzit 2006-05-17 13:21:52 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Debian testing/unstable Packages

From Debian bug http://bugs.debian.org/357043
=============================================

This is pretty bad: korgac leaks memory so badly that its memory footprint grows
~30% every 5 hours. That means it grows to ~250 MB in about to days. This is a
new "feature" - I used to run korgac for months at a time without problems, but
I cannot tell exactly which version started to leak memory.

Or perhaps the leak comes from accessing a calendar on a webdav directory? That's
another pretty recent change I've made (apart from updating, that is).

The attached valgrind report shows korgac....
Comment 1 Pierre Habouzit 2006-05-17 13:22:30 UTC
Created attachment 16138 [details]
valgrind trace
Comment 2 Rolf Offermanns 2006-09-25 12:33:24 UTC
I see this, too. And I have a calendar on webdav, too! This is KDE-3.5.4.
Comment 3 Rolf Offermanns 2006-09-28 16:58:44 UTC
Created attachment 17954 [details]
valgrind log showing memory leaks
Comment 4 Allen Winter 2006-09-29 00:00:47 UTC
Created attachment 17957 [details]
possible leak plug
Comment 5 Allen Winter 2006-09-29 00:02:03 UTC
Rolf,

Any chance you can apply the patch for kdepim/libkcal/icalformat.cpp
that I just attached to this bug report.

and test again with valgrind?
Comment 6 Allen Winter 2006-09-29 20:37:38 UTC
SVN commit 590304 by winterz:

greatly reduce memory leaking, according to valgrind.

BUGS: 127506


 M  +4 -2      icalformat.cpp  


--- branches/KDE/3.5/kdepim/libkcal/icalformat.cpp #590303:590304
@@ -169,8 +169,10 @@
           setException(new ErrorFormat(ErrorFormat::ParseErrorKcal));
         }
         success = false;
-      } else
+      } else {
         mLoadedProductId = mImpl->loadedProductId();
+      }
+      icalcomponent_free( comp );
     }
   } else if (icalcomponent_isa(calendar) != ICAL_VCALENDAR_COMPONENT) {
     kdDebug(5800) << "ICalFormat::load(): No VCALENDAR component found" << endl;
@@ -489,7 +491,7 @@
   }
 
   kdDebug(5800) << "ICalFormat::parseScheduleMessage() restriction..." << endl;
-  
+
   if (!icalrestriction_check(message)) {
     kdWarning(5800) << k_funcinfo << endl << "libkcal reported a problem while parsing:" << endl;
     kdWarning(5800) << Scheduler::translatedMethodName(method) + ": " + mImpl->extractErrorProperty(c)<< endl;
Comment 7 Arne Schmitz 2007-07-06 22:42:05 UTC
I still experience this problem, although maybe to a lesser extent? Not sure about that.

I am using KDE 3.5.7. I have had korgac running for about 24h and it grew from 19 MB RSS to 88 MB RSS. This seems pretty bad. Maybe some more valgrinding is in order? :-)
Comment 8 Arne Schmitz 2007-12-07 15:45:26 UTC
Running KDE 3.5.8 on Debian testing, and korgac still leaks memory. My uptime is now 5h, and korgac VmRSS size has doubled from 31 MByte to 63 MByte, when I checked.
Comment 9 Arne Schmitz 2007-12-16 15:54:02 UTC
Created attachment 22577 [details]
Valgrind logfile

Ok, I have run valgrind for maybe an hour or so on korgac. You find the log
attached. It shows that korgac still loses significant amounts of memory. In
this case, 10MB.