Growl Memory Leak?

The Growl forums have moved to Google Groups, this forum is read only.
Locked
joebadiah
Harmless
Posts: 2
Joined: Mon Nov 28, 2005 10:49 pm

Growl Memory Leak?

Post by joebadiah »

Using top, I've noticed that GrowlHelper (Growl 0.7.2) grows over time in memory usage from an rsize of around 7MB to 40MB or more (and a vsize of over 500MB). If I stop and start Growl from System Preferences, it shrinks to around 7MB once again but after about a day or two it repeats this behavior.

I think I understand the concept that some processes in UNIX only release memory when requested by other programs or the kernel, but many of the other programs I use do not grow in size like Growl (on the other hand, Mail, Safari, and MS Word all exhibit this behavior--I usually quit and reopen those programs every day or so). If I don't quit and reopen these programs, I get an extra 2-3 swapfiles and my system slows down as my hard drive is accessed like crazy (sometimes even to the point of thrashing). I have 1.5GB of RAM and usually have about 10 user processes active at a time (e.g., Mail, Safari, sometimes Word, Adium, Stickies, Default Folder, and a few more).

Any ideas? Is this a memory leak? Is there any way to keep Growl's memory usage from growing in size like this? Thanks!
User avatar
zaudragon
Growl Team
Posts: 1852
Joined: Sat Dec 04, 2004 5:05 am
Location: Kensington, CA, USA
Contact:

Post by zaudragon »

Yes, GHA leaks. It’s a known bug on trac.
Blog | X(tras)
Communists code without classes.
Pandemic
Harmless
Posts: 1
Joined: Thu Dec 01, 2005 8:16 am
Location: BS, Blindern, Oslo, Norway
Contact:

Hm.. that is bad.

Post by Pandemic »

zaudragon wrote:Yes, GHA leaks. It’s a known bug on trac.
don't mean to be picky or anything, but why should anyone bother to use leaking software? I was just about to install it, but now I feel like I am asking for trouble.

I dont wanna restart my Mac, or any services, because they leak? arg.

So, is the general attitude "out there" that leakage is ok? Accepted? No cause for alarm?
- there is always room for improvement. Always.
User avatar
Githon
Frappa
Posts: 162
Joined: Sun Dec 05, 2004 1:03 am

Post by Githon »

You act like his response was "We know and don't care". It's being worked on.

As to why you should use it anyway; Growl will make you way cooler. Having Growl is like AXE Body Spray in the commercials, except you don't have to bathe or leave your house. Also Growl prevents cancer.

It's not as if a memory leak means your RAM liquifies and slides off of your motherboard. A double-click a day prevents it, apparently. You don't have to restart or log out.
User avatar
ofri
Growl Team
Posts: 303
Joined: Sat Dec 04, 2004 12:00 pm
Location: Kiryat Ono, Israel
Contact:

Post by ofri »

We are aware of the fact the GHA leaks, but currently the core is going through a major rewrite so finding the leak will have to wait until the rewrite is done.
Anyway, i never heard that this leak did troubles to anyone (including me) as the growth in memory usage is small.
Gravitation is not responsible for people falling in love.
--Albert Einstein

http://www.dpompa.com
User avatar
The_Tick
Cocoaforge Admin
Posts: 4642
Joined: Thu Dec 02, 2004 6:06 am
Contact:

Post by The_Tick »

Just as a comparison, let's look at Apple's software versus Growl:

Apple

Code: Select all

leaks Finder
Process 465: 62736 nodes malloced for 6458 KB
Process 465: 1015 leaks for 40512 total leaked bytes.

leaks Mail
Process 3657: 139041 nodes malloced for 15866 KB
Process 3657: 149 leaks for 7568 total leaked bytes.

leaks iTunes
Process 3016: 83989 nodes malloced for 28810 KB
Process 3016: 12 leaks for 704 total leaked bytes.
Since I am making this post in Safari, I opted not to run leaks on that process. Running it on terminal was a bad idea ;)

Growl

Code: Select all

leaks GrowlHelperApp
Process 469: 49524 nodes malloced for 81747 KB
Process 469: 995 leaks for 50752 total leaked bytes.
A couple of things to note here though. Applescript is known to be leaky, so anything that we use for Applescript that leaks would appear here. Same with Webkit, which we use extensively for displays.

We are quite aware of the issue and want to resolve it, but currently we are basically modifying or rewriting every source file for Growl.


In general, I've run Growl for months without noticing a problem. Most people I know who use Growl don't mention performance issues.

Also, in general, most applications on os x do leak. This includes Apple applications. If your reasoning for not using Growl is just that, then you need to evaluate that reasoning and either give Growl another shot, or evaluate whether you really want to use OS X.

We're aware of the issue. I have been for a a while now. But we also have a lot of other things to look into as well. And just as a note, my GrowlHelperApp process is only using 4 mb of memory, and has been running for a while. The thing to note is that we do know about it and do intend to resolve it, but it's not a big enough issue that you should want to consider it when not using Growl, unless you have 128 mb of ram and are running on a g3 233.
User avatar
cbarrett
Adium Team
Posts: 389
Joined: Thu Dec 02, 2004 2:30 am
Location: Kailua, HI
Contact:

Post by cbarrett »

To be fair to the original poster, it's possible he thought there was a large leak.

However, like Chris said, Growl doesn't leak all that much. It certainly doesn't hemorrhage memory like some Apple apps (*cough* Xcode *cough*).

I wouldn't worry too much. Many, many people use Growl (probably in the hundreds of thousands, considering there's Growl-withInstaller framework). It's definitely production-ready. Go for it!
joebadiah
Harmless
Posts: 2
Joined: Mon Nov 28, 2005 10:49 pm

Post by joebadiah »

Oops, didn't mean to cause such a ruckus. :oops:

Yeah, it's really not a big deal. I've been using Growl for awhile now and absolutely love it. Memory usage never goes above 40MB, which is nothing compared to Safari or Mail. It really isn't a big deal to stop and start it, either, especially compared to the advantages Growl offers. I was just wondering, that's all.

Keep up the great work!
User avatar
Githon
Frappa
Posts: 162
Joined: Sun Dec 05, 2004 1:03 am

Post by Githon »

The_Tick wrote:In general, I've run Growl for months without noticing a problem. Most people I know who use Growl don't mention performance issues.
I notice one, but I quite admittedly overtax my ram to the extreme. Worse on my laptop, since it has about half as much as my mini. Possibly less, I'm not really sure.

Growl's usefulness still outweighs this though. If I'm desperate for more free ram, naturally I'm going to quit what I don't need. iTunes is usually on the hitlist before Growl is.
User avatar
ajmas
Frappa
Posts: 116
Joined: Wed Oct 12, 2005 7:17 pm
Location: Olympus Mons Colony, Mars

Post by ajmas »

True. When you consider that both Firefox and Safari can end up hogging 1GB memory each after a long session, 50MB is nothing. But then again no leak would be better. I think patience is needed to give the team time to deal with their priorities.

Since the core is going through a rewrite you may find one leak being stopped and another one being created. This is the wrong time to spend the energy on plugging a leak, since it may be invalid in a few months.
Locked