Memory leaks - what causes them?

View: New views
11 Messages — Rating Filter:   Alert me  

Memory leaks - what causes them?

by Chris Barrett-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I have a leak that’s costing me about 3Mb/hr.

 

Fri 06/02/09 21:00:00  37.9 hours:   0.5 MB in  0.2 hours.  168.1 -> 168.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:10:00  38.1 hours:   0.5 MB in  0.2 hours.  168.6 -> 169.1 at  3.05 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:20:00  38.3 hours:   0.5 MB in  0.2 hours.  169.1 -> 169.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:30:00  38.4 hours:   0.5 MB in  0.2 hours.  169.6 -> 170.1 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:40:00  38.6 hours:   0.5 MB in  0.2 hours.  170.1 -> 170.6 at  3.07 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:50:00  38.8 hours:   0.5 MB in  0.2 hours.  170.6 -> 171.1 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 22:00:00  38.9 hours:   0.5 MB in  0.2 hours.  171.1 -> 171.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 22:10:00  39.1 hours:   1.3 MB in  0.2 hours.  171.6 -> 172.9 at  7.68 MB/hour.  Total:  3.13 MB/hour

 

I have a couple of custom user code “modules” so I’m presuming that it’s in one (or more) of those.

 

What sorts of coding practices lead to memory leaks within MH?  Does, for example, the use of “my($var) = …” within a loop cause a leak?

 

 


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Memory leaks - what causes them?

by David Norwood-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Your leak appears every ten minutes, so I would look for code that runs on that schedule.  Are you running the weather graphing script?  If so, you should comment out the line in the script that generates the graphs (that should probably be a trigger), and see if that solves it.  Otherwise, try disabling each of your scripts for ten minutes.  It shouldn't take too long to find the cause.   
 
If your "my" variable declaration is by itself outside of an "if" clause, subroutine, etc, it will be pulled out of the main loop.  And I think perl handles the case of a "my" declaration inside an "if" clause, subroutine, etc correctly.  
 
To tell you the truth, I've seen this question asked many times but never seen an example of code that causes a memory leak in misterhouse.  This would make a great wiki article if anyone ever figured out some common causes. 
 
David
 
----- Original Message -----
From: chris@...
Sent: Friday, February 06, 2009 3:33 AM
Subject: [mh] Memory leaks - what causes them?

I have a leak that’s costing me about 3Mb/hr.

 

Fri 06/02/09 21:00:00  37.9 hours:   0.5 MB in  0.2 hours.  168.1 -> 168.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:10:00  38.1 hours:   0.5 MB in  0.2 hours.  168.6 -> 169.1 at  3.05 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:20:00  38.3 hours:   0.5 MB in  0.2 hours.  169.1 -> 169.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:30:00  38.4 hours:   0.5 MB in  0.2 hours.  169.6 -> 170.1 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:40:00  38.6 hours:   0.5 MB in  0.2 hours.  170.1 -> 170.6 at  3.07 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:50:00  38.8 hours:   0.5 MB in  0.2 hours.  170.6 -> 171.1 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 22:00:00  38.9 hours:   0.5 MB in  0.2 hours.  171.1 -> 171.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 22:10:00  39.1 hours:   1.3 MB in  0.2 hours.  171.6 -> 172.9 at  7.68 MB/hour.  Total:  3.13 MB/hour

 

I have a couple of custom user code “modules” so I’m presuming that it’s in one (or more) of those.

 

What sorts of coding practices lead to memory leaks within MH?  Does, for example, the use of “my($var) = …” within a loop cause a leak?

 

 


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com


________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Memory leaks - what causes them?

by Chris Barrett-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi David,

 

I’ve modified code/common/monitor_memory.pl so that it runs every minute rather than every 10 minutes and I’ve reduced the reporting threshold from 0.5MB to 0.05MB.

 

I am running the weather graphing script and although I haven’t yet done what you suggested, it is looking like it may be the culprit because the leak spikes at hh:01, hh:11, hh:21, etc which suggests that the leak is being caused by something that runs every 10 minutes.

 

However, equally disturbing is the ~2MB leak that occurs after each of the reloads.  It appears that MH reloads itself after each trigger event because the two at 17:20 correlate to me manually reloading the code and the reloads at 17:35, 19:30 and 20:30 correlate with some one-shot triggers that I had set.

 

I searched back through my archive of the mailing list and through the wiki for info on memory leaks and came up with very little.  Definitely keen to see something written up on them and I’m happy to do so if/when we work out what’s causing them.

 

 

Wed 11/02/09 17:00:01  49.0 hours:   0.2 MB in  0.1 hours.  211.2 -> 211.4 at  1.17 MB/hour.  Total:  3.31 MB/hour

Wed 11/02/09 17:01:00  49.0 hours:   0.2 MB in  0.0 hours.  211.4 -> 211.6 at 11.04 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:02:00  49.0 hours:   0.2 MB in  0.0 hours.  211.6 -> 211.7 at 10.08 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:11:00  49.2 hours:   0.4 MB in  0.1 hours.  211.7 -> 212.1 at  2.69 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:20:00  49.3 hours:   0.6 MB in  0.1 hours.  212.1 -> 212.7 at  4.08 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:20:16    ReLoad

Wed 11/02/09 17:20:25    ReLoad

Wed 11/02/09 17:21:01  49.4 hours:   2.3 MB in  0.0 hours.  212.7 -> 215.0 at 138.00 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 17:35:10    ReLoad

Wed 11/02/09 17:36:01  49.6 hours:   1.5 MB in  0.2 hours.  215.0 -> 216.5 at  5.87 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 17:51:01  49.9 hours:   0.3 MB in  0.2 hours.  216.5 -> 216.8 at  1.30 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 17:58:00  50.0 hours:   0.2 MB in  0.1 hours.  216.8 -> 217.0 at  1.44 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:01:00  50.0 hours:   0.3 MB in  0.1 hours.  217.0 -> 217.3 at  5.04 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:02:00  50.0 hours:   0.2 MB in  0.0 hours.  217.3 -> 217.5 at 12.72 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 18:10:00  50.2 hours:   0.1 MB in  0.1 hours.  217.5 -> 217.6 at  1.02 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:11:00  50.2 hours:   0.2 MB in  0.0 hours.  217.6 -> 217.8 at 11.04 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:12:01  50.2 hours:   0.2 MB in  0.0 hours.  217.8 -> 218.0 at 12.48 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 18:20:00  50.3 hours:   0.1 MB in  0.1 hours.  218.0 -> 218.1 at  0.99 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:21:01  50.4 hours:   0.2 MB in  0.0 hours.  218.1 -> 218.3 at 12.72 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:22:00  50.4 hours:   0.2 MB in  0.0 hours.  218.3 -> 218.5 at 11.76 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 18:31:00  50.5 hours:   0.4 MB in  0.1 hours.  218.5 -> 219.0 at  2.83 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:38:00  50.6 hours:   0.1 MB in  0.1 hours.  219.0 -> 219.1 at  1.20 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:41:00  50.7 hours:   0.3 MB in  0.1 hours.  219.1 -> 219.4 at  5.92 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:43:00  50.7 hours:   0.2 MB in  0.0 hours.  219.4 -> 219.6 at  5.52 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:51:01  50.9 hours:   0.3 MB in  0.1 hours.  219.6 -> 219.9 at  2.49 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:52:00  50.9 hours:   0.2 MB in  0.0 hours.  219.9 -> 220.1 at 11.52 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:01:00  51.0 hours:   0.4 MB in  0.1 hours.  220.1 -> 220.5 at  2.91 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:08:00  51.1 hours:   0.1 MB in  0.1 hours.  220.5 -> 220.7 at  1.17 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:11:00  51.2 hours:   0.3 MB in  0.1 hours.  220.7 -> 221.0 at  5.68 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:13:00  51.2 hours:   0.2 MB in  0.0 hours.  221.0 -> 221.2 at  6.00 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:21:01  51.4 hours:   0.3 MB in  0.1 hours.  221.2 -> 221.5 at  2.31 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:22:00  51.4 hours:   0.2 MB in  0.0 hours.  221.5 -> 221.7 at 12.96 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:30:14    ReLoad

Wed 11/02/09 19:31:00  51.5 hours:   1.9 MB in  0.1 hours.  221.7 -> 223.6 at 12.75 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 19:48:01  51.8 hours:   0.1 MB in  0.3 hours.  223.6 -> 223.7 at  0.49 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 19:51:01  51.9 hours:   0.3 MB in  0.1 hours.  223.7 -> 224.0 at  5.28 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 19:52:00  51.9 hours:   0.2 MB in  0.0 hours.  224.0 -> 224.2 at 12.48 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 19:59:00  52.0 hours:   0.1 MB in  0.1 hours.  224.2 -> 224.4 at  1.20 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:01:00  52.0 hours:   0.2 MB in  0.0 hours.  224.4 -> 224.6 at  6.72 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:02:00  52.0 hours:   0.2 MB in  0.0 hours.  224.6 -> 224.7 at  9.84 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 20:11:00  52.2 hours:   0.4 MB in  0.1 hours.  224.7 -> 225.1 at  2.64 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:17:00  52.3 hours:   0.2 MB in  0.1 hours.  225.1 -> 225.3 at  1.60 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:21:01  52.4 hours:   0.3 MB in  0.1 hours.  225.3 -> 225.6 at  4.56 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:22:00  52.4 hours:   0.2 MB in  0.0 hours.  225.6 -> 225.8 at 10.32 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 20:30:01  52.5 hours:   0.1 MB in  0.1 hours.  225.8 -> 225.9 at  1.08 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:30:13    ReLoad

Wed 11/02/09 20:31:00  52.5 hours:   1.8 MB in  0.0 hours.  225.9 -> 227.8 at 110.16 MB/hour.  Total:  3.40 MB/hour

Wed 11/02/09 20:46:00  52.8 hours:   0.1 MB in  0.2 hours.  227.8 -> 227.9 at  0.54 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 20:50:00  52.8 hours:   0.1 MB in  0.1 hours.  227.9 -> 228.0 at  1.98 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 20:51:01  52.9 hours:   0.2 MB in  0.0 hours.  228.0 -> 228.2 at 11.04 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 20:52:00  52.9 hours:   0.2 MB in  0.0 hours.  228.2 -> 228.4 at 11.28 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:00:01  53.0 hours:   0.1 MB in  0.1 hours.  228.4 -> 228.5 at  1.05 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:01:00  53.0 hours:   0.2 MB in  0.0 hours.  228.5 -> 228.7 at 11.04 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:02:00  53.0 hours:   0.2 MB in  0.0 hours.  228.7 -> 228.9 at 12.00 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:10:00  53.2 hours:   0.1 MB in  0.1 hours.  228.9 -> 229.0 at  0.99 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:11:00  53.2 hours:   0.2 MB in  0.0 hours.  229.0 -> 229.3 at 12.48 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:12:01  53.2 hours:   0.2 MB in  0.0 hours.  229.3 -> 229.4 at 10.80 MB/hour.  Total:  3.39 MB/hour

 

 

 


From: David Norwood [mailto:dnorwood2@...]
Sent: Sunday, 8 February 2009 2:48 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] Memory leaks - what causes them?

 

Your leak appears every ten minutes, so I would look for code that runs on that schedule.  Are you running the weather graphing script?  If so, you should comment out the line in the script that generates the graphs (that should probably be a trigger), and see if that solves it.  Otherwise, try disabling each of your scripts for ten minutes.  It shouldn't take too long to find the cause.   

 

If your "my" variable declaration is by itself outside of an "if" clause, subroutine, etc, it will be pulled out of the main loop.  And I think perl handles the case of a "my" declaration inside an "if" clause, subroutine, etc correctly.  

 

To tell you the truth, I've seen this question asked many times but never seen an example of code that causes a memory leak in misterhouse.  This would make a great wiki article if anyone ever figured out some common causes. 

 

David

 

----- Original Message -----

From: chris@...

Sent: Friday, February 06, 2009 3:33 AM

Subject: [mh] Memory leaks - what causes them?

 

I have a leak that’s costing me about 3Mb/hr.

 

Fri 06/02/09 21:00:00  37.9 hours:   0.5 MB in  0.2 hours.  168.1 -> 168.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:10:00  38.1 hours:   0.5 MB in  0.2 hours.  168.6 -> 169.1 at  3.05 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:20:00  38.3 hours:   0.5 MB in  0.2 hours.  169.1 -> 169.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:30:00  38.4 hours:   0.5 MB in  0.2 hours.  169.6 -> 170.1 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:40:00  38.6 hours:   0.5 MB in  0.2 hours.  170.1 -> 170.6 at  3.07 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:50:00  38.8 hours:   0.5 MB in  0.2 hours.  170.6 -> 171.1 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 22:00:00  38.9 hours:   0.5 MB in  0.2 hours.  171.1 -> 171.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 22:10:00  39.1 hours:   1.3 MB in  0.2 hours.  171.6 -> 172.9 at  7.68 MB/hour.  Total:  3.13 MB/hour

 

I have a couple of custom user code “modules” so I’m presuming that it’s in one (or more) of those.

 

What sorts of coding practices lead to memory leaks within MH?  Does, for example, the use of “my($var) = …” within a loop cause a leak?

 

 


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com


________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Memory leaks - what causes them?

by Gregg Liming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David Norwood wrote:

> To tell you the truth, I've seen this question asked many times but
> never seen an example of code that causes a memory leak in misterhouse.

It's always been unbounded arrays that I've seen be the culprit.
Specifically, shoving the same value or object into an array w/o
checking on its existence first (if appropriate).  An example here of
proper bounding is Base_Item::add_item_if_not_present.  If memory leaks
happen on reload, then it's usually non-object arrays that I've seen in
both common code and libs.

Also, consuming memory doesn't necessarily mean a "leak" (where the
occurrence is accidental) since some code/objects "accumulate"
data/objects over time.

I don't see my own mh instance grow by more than 10M over a week.  So, I
attribute that to either "slow leaks" or just normal object "accumulated
bloat".  And, since I routinely develop libs, then I have to restart
usually far more frequently.  Any time I've seen memory leaks grow by
more than that, tracking it down requires you to know a great deal about
what your specific environment/config is implying as well as detailed
knowledge of the code.  Unfortunately, no "magic bullets" for easy
detection (unless good "gut intuition" counts).

Gregg

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Memory leaks - what causes them?

by Gregg Liming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gregg Liming wrote:

> David Norwood wrote:
>
>> To tell you the truth, I've seen this question asked many times but
>> never seen an example of code that causes a memory leak in misterhouse.
>
> It's always been unbounded arrays that I've seen be the culprit.
> Specifically, shoving the same value or object into an array w/o
> checking on its existence first (if appropriate).  An example here of
> proper bounding is Base_Item::add_item_if_not_present.  If memory leaks
> happen on reload, then it's usually non-object arrays that I've seen in
> both common code and libs.
>
> Also, consuming memory doesn't necessarily mean a "leak" (where the
> occurrence is accidental) since some code/objects "accumulate"
> data/objects over time.
>
> I don't see my own mh instance grow by more than 10M over a week.  So, I
> attribute that to either "slow leaks" or just normal object "accumulated
> bloat".  And, since I routinely develop libs, then I have to restart
> usually far more frequently.  Any time I've seen memory leaks grow by
> more than that, tracking it down requires you to know a great deal about
> what your specific environment/config is implying as well as detailed
> knowledge of the code.  Unfortunately, no "magic bullets" for easy
> detection (unless good "gut intuition" counts).

I forgot one thing... folks that don't understand using # noloop or the
# noloop=start and # noloop=end "blocks" on methods/statements that do
not inherently perform bounding are just asking for trouble.  If you
have much personal user code, then that's the first place I'd look.
Since I don't always want to have to scrutinize the code, I tend to
"over-use" # noloop even when I know it's pointless (e.g., on "add"
methods).

Gregg

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Memory leaks - what causes them?

by David Norwood-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Chris,
 
I have a memory leak as well, though smaller than yours:
 

Thu 02/19/09 16:10:00 283.5 hours: 1.3 MB in 1.0 hours. 321.9 -> 323.1 at 1.26 MB/hour. Total: 0.98 MB/hour

Thu 02/19/09 17:10:00 284.5 hours: 1.0 MB in 1.0 hours. 323.1 -> 324.1 at 0.98 MB/hour. Total: 0.98 MB/hour

Thu 02/19/09 18:10:00 285.5 hours: 0.7 MB in 1.0 hours. 324.1 -> 324.8 at 0.70 MB/hour. Total: 0.98 MB/hour

Thu 02/19/09 19:10:00 286.5 hours: 1.1 MB in 1.0 hours. 324.8 -> 326.0 at 1.14 MB/hour. Total: 0.98 MB/hour

Thu 02/19/09 20:10:00 287.5 hours: 1.0 MB in 1.0 hours. 326.0 -> 327.0 at 1.01 MB/hour. Total: 0.98 MB/hour

 

I just made the same changes to the memory monitor script, and restarted misterhouse.  I also disabled the rrd graph creation, so we'll see if that lowers the leak.  I'm thinking the leak is in Process Item.

It's normal for misterhouse to reload after a OneShot trigger runs, because the trigger file is changed.  It doesn't reload when a NoExpire trigger runs.  I don't know why there is a memory leak after a reload on your system, and I can't recreate it here.  

What version of perl are you running?  I'm on 5.10 with ubuntu ibex.  

David

 

----- Original Message -----
From: chris@...
Sent: Wednesday, February 11, 2009 5:01 AM
Subject: Re: [mh] Memory leaks - what causes them?

Hi David,

 

I’ve modified code/common/monitor_memory.pl so that it runs every minute rather than every 10 minutes and I’ve reduced the reporting threshold from 0.5MB to 0.05MB.

 

I am running the weather graphing script and although I haven’t yet done what you suggested, it is looking like it may be the culprit because the leak spikes at hh:01, hh:11, hh:21, etc which suggests that the leak is being caused by something that runs every 10 minutes.

 

However, equally disturbing is the ~2MB leak that occurs after each of the reloads.  It appears that MH reloads itself after each trigger event because the two at 17:20 correlate to me manually reloading the code and the reloads at 17:35, 19:30 and 20:30 correlate with some one-shot triggers that I had set.

 

I searched back through my archive of the mailing list and through the wiki for info on memory leaks and came up with very little.  Definitely keen to see something written up on them and I’m happy to do so if/when we work out what’s causing them.

 

 

Wed 11/02/09 17:00:01  49.0 hours:   0.2 MB in  0.1 hours.  211.2 -> 211.4 at  1.17 MB/hour.  Total:  3.31 MB/hour

Wed 11/02/09 17:01:00  49.0 hours:   0.2 MB in  0.0 hours.  211.4 -> 211.6 at 11.04 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:02:00  49.0 hours:   0.2 MB in  0.0 hours.  211.6 -> 211.7 at 10.08 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:11:00  49.2 hours:   0.4 MB in  0.1 hours.  211.7 -> 212.1 at  2.69 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:20:00  49.3 hours:   0.6 MB in  0.1 hours.  212.1 -> 212.7 at  4.08 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:20:16    ReLoad

Wed 11/02/09 17:20:25    ReLoad

Wed 11/02/09 17:21:01  49.4 hours:   2.3 MB in  0.0 hours.  212.7 -> 215.0 at 138.00 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 17:35:10    ReLoad

Wed 11/02/09 17:36:01  49.6 hours:   1.5 MB in  0.2 hours.  215.0 -> 216.5 at  5.87 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 17:51:01  49.9 hours:   0.3 MB in  0.2 hours.  216.5 -> 216.8 at  1.30 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 17:58:00  50.0 hours:   0.2 MB in  0.1 hours.  216.8 -> 217.0 at  1.44 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:01:00  50.0 hours:   0.3 MB in  0.1 hours.  217.0 -> 217.3 at  5.04 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:02:00  50.0 hours:   0.2 MB in  0.0 hours.  217.3 -> 217.5 at 12.72 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 18:10:00  50.2 hours:   0.1 MB in  0.1 hours.  217.5 -> 217.6 at  1.02 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:11:00  50.2 hours:   0.2 MB in  0.0 hours.  217.6 -> 217.8 at 11.04 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:12:01  50.2 hours:   0.2 MB in  0.0 hours.  217.8 -> 218.0 at 12.48 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 18:20:00  50.3 hours:   0.1 MB in  0.1 hours.  218.0 -> 218.1 at  0.99 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:21:01  50.4 hours:   0.2 MB in  0.0 hours.  218.1 -> 218.3 at 12.72 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:22:00  50.4 hours:   0.2 MB in  0.0 hours.  218.3 -> 218.5 at 11.76 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 18:31:00  50.5 hours:   0.4 MB in  0.1 hours.  218.5 -> 219.0 at  2.83 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:38:00  50.6 hours:   0.1 MB in  0.1 hours.  219.0 -> 219.1 at  1.20 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:41:00  50.7 hours:   0.3 MB in  0.1 hours.  219.1 -> 219.4 at  5.92 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:43:00  50.7 hours:   0.2 MB in  0.0 hours.  219.4 -> 219.6 at  5.52 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:51:01  50.9 hours:   0.3 MB in  0.1 hours.  219.6 -> 219.9 at  2.49 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:52:00  50.9 hours:   0.2 MB in  0.0 hours.  219.9 -> 220.1 at 11.52 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:01:00  51.0 hours:   0.4 MB in  0.1 hours.  220.1 -> 220.5 at  2.91 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:08:00  51.1 hours:   0.1 MB in  0.1 hours.  220.5 -> 220.7 at  1.17 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:11:00  51.2 hours:   0.3 MB in  0.1 hours.  220.7 -> 221.0 at  5.68 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:13:00  51.2 hours:   0.2 MB in  0.0 hours.  221.0 -> 221.2 at  6.00 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:21:01  51.4 hours:   0.3 MB in  0.1 hours.  221.2 -> 221.5 at  2.31 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:22:00  51.4 hours:   0.2 MB in  0.0 hours.  221.5 -> 221.7 at 12.96 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:30:14    ReLoad

Wed 11/02/09 19:31:00  51.5 hours:   1.9 MB in  0.1 hours.  221.7 -> 223.6 at 12.75 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 19:48:01  51.8 hours:   0.1 MB in  0.3 hours.  223.6 -> 223.7 at  0.49 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 19:51:01  51.9 hours:   0.3 MB in  0.1 hours.  223.7 -> 224.0 at  5.28 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 19:52:00  51.9 hours:   0.2 MB in  0.0 hours.  224.0 -> 224.2 at 12.48 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 19:59:00  52.0 hours:   0.1 MB in  0.1 hours.  224.2 -> 224.4 at  1.20 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:01:00  52.0 hours:   0.2 MB in  0.0 hours.  224.4 -> 224.6 at  6.72 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:02:00  52.0 hours:   0.2 MB in  0.0 hours.  224.6 -> 224.7 at  9.84 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 20:11:00  52.2 hours:   0.4 MB in  0.1 hours.  224.7 -> 225.1 at  2.64 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:17:00  52.3 hours:   0.2 MB in  0.1 hours.  225.1 -> 225.3 at  1.60 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:21:01  52.4 hours:   0.3 MB in  0.1 hours.  225.3 -> 225.6 at  4.56 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:22:00  52.4 hours:   0.2 MB in  0.0 hours.  225.6 -> 225.8 at 10.32 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 20:30:01  52.5 hours:   0.1 MB in  0.1 hours.  225.8 -> 225.9 at  1.08 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:30:13    ReLoad

Wed 11/02/09 20:31:00  52.5 hours:   1.8 MB in  0.0 hours.  225.9 -> 227.8 at 110.16 MB/hour.  Total:  3.40 MB/hour

Wed 11/02/09 20:46:00  52.8 hours:   0.1 MB in  0.2 hours.  227.8 -> 227.9 at  0.54 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 20:50:00  52.8 hours:   0.1 MB in  0.1 hours.  227.9 -> 228.0 at  1.98 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 20:51:01  52.9 hours:   0.2 MB in  0.0 hours.  228.0 -> 228.2 at 11.04 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 20:52:00  52.9 hours:   0.2 MB in  0.0 hours.  228.2 -> 228.4 at 11.28 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:00:01  53.0 hours:   0.1 MB in  0.1 hours.  228.4 -> 228.5 at  1.05 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:01:00  53.0 hours:   0.2 MB in  0.0 hours.  228.5 -> 228.7 at 11.04 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:02:00  53.0 hours:   0.2 MB in  0.0 hours.  228.7 -> 228.9 at 12.00 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:10:00  53.2 hours:   0.1 MB in  0.1 hours.  228.9 -> 229.0 at  0.99 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:11:00  53.2 hours:   0.2 MB in  0.0 hours.  229.0 -> 229.3 at 12.48 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:12:01  53.2 hours:   0.2 MB in  0.0 hours.  229.3 -> 229.4 at 10.80 MB/hour.  Total:  3.39 MB/hour

 

 

 


From: David Norwood [mailto:dnorwood2@...]
Sent: Sunday, 8 February 2009 2:48 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] Memory leaks - what causes them?

 

Your leak appears every ten minutes, so I would look for code that runs on that schedule.  Are you running the weather graphing script?  If so, you should comment out the line in the script that generates the graphs (that should probably be a trigger), and see if that solves it.  Otherwise, try disabling each of your scripts for ten minutes.  It shouldn't take too long to find the cause.   

 

If your "my" variable declaration is by itself outside of an "if" clause, subroutine, etc, it will be pulled out of the main loop.  And I think perl handles the case of a "my" declaration inside an "if" clause, subroutine, etc correctly.  

 

To tell you the truth, I've seen this question asked many times but never seen an example of code that causes a memory leak in misterhouse.  This would make a great wiki article if anyone ever figured out some common causes. 

 

David

 

----- Original Message -----

From: chris@...

Sent: Friday, February 06, 2009 3:33 AM

Subject: [mh] Memory leaks - what causes them?

 

I have a leak that’s costing me about 3Mb/hr.

 

Fri 06/02/09 21:00:00  37.9 hours:   0.5 MB in  0.2 hours.  168.1 -> 168.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:10:00  38.1 hours:   0.5 MB in  0.2 hours.  168.6 -> 169.1 at  3.05 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:20:00  38.3 hours:   0.5 MB in  0.2 hours.  169.1 -> 169.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:30:00  38.4 hours:   0.5 MB in  0.2 hours.  169.6 -> 170.1 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:40:00  38.6 hours:   0.5 MB in  0.2 hours.  170.1 -> 170.6 at  3.07 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 21:50:00  38.8 hours:   0.5 MB in  0.2 hours.  170.6 -> 171.1 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 22:00:00  38.9 hours:   0.5 MB in  0.2 hours.  171.1 -> 171.6 at  3.02 MB/hour.  Total:  3.11 MB/hour

Fri 06/02/09 22:10:00  39.1 hours:   1.3 MB in  0.2 hours.  171.6 -> 172.9 at  7.68 MB/hour.  Total:  3.13 MB/hour

 

I have a couple of custom user code “modules” so I’m presuming that it’s in one (or more) of those.

 

What sorts of coding practices lead to memory leaks within MH?  Does, for example, the use of “my($var) = …” within a loop cause a leak?

 

 


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com


________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com


________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Memory leaks - what causes them?

by David Norwood-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gregg wrote:

> David Norwood wrote:
>
>> To tell you the truth, I've seen this question asked many times but
>> never seen an example of code that causes a memory leak in misterhouse.
>
> It's always been unbounded arrays that I've seen be the culprit.
> Specifically, shoving the same value or object into an array w/o
> checking on its existence first (if appropriate).  An example here of
> proper bounding is Base_Item::add_item_if_not_present.  If memory leaks
> happen on reload, then it's usually non-object arrays that I've seen in
> both common code and libs.

I've narrowed my memory leak problem down to the rss_file_process subroutine
in my mh/code/common/rss_subscriber.pl script.  Each of the arrays and
hashes are defined locally to the subroutine in "my  ..." statements.
Doesn't that mean the memory they take up is freed when the subroutine
returns?

Would you mind taking a look at the rss_file_process subroutine in
mh/code/common/rss_subscriber.pl and see if you find a problem?

David



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Memory leaks - what causes them?

by Gregg Liming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David Norwood wrote:

> Gregg wrote:
>
>> David Norwood wrote:
>>
>>> To tell you the truth, I've seen this question asked many times but
>>> never seen an example of code that causes a memory leak in misterhouse.
>> It's always been unbounded arrays that I've seen be the culprit.
>> Specifically, shoving the same value or object into an array w/o
>> checking on its existence first (if appropriate).  An example here of
>> proper bounding is Base_Item::add_item_if_not_present.  If memory leaks
>> happen on reload, then it's usually non-object arrays that I've seen in
>> both common code and libs.
>
> I've narrowed my memory leak problem down to the rss_file_process subroutine
> in my mh/code/common/rss_subscriber.pl script.  Each of the arrays and
> hashes are defined locally to the subroutine in "my  ..." statements.
> Doesn't that mean the memory they take up is freed when the subroutine
> returns?

I can't think of a reason why they wouldn't be.

> Would you mind taking a look at the rss_file_process subroutine in
> mh/code/common/rss_subscriber.pl and see if you find a problem?

Nothing immediately "jumps out".  But a couple of questions:

1) Do you ever see "Process Eval results: ... " displayed?  If so, then
I wonder if there is a problem if the untie is never reached (line 210
in rss_subscribed.pl).

2) Have you tried uncommenting exit and commenting out exec 'true' in
Process_Item (lines 193 and 196)?  You'd have to assess whether doing so
might cause issues elsewhere.  Given the comments there about DESTROY, I
wonder if there's missing garbage collection.

3) Is there any purpose to $list and @itemslist in rss_file_process?
(this is more a "housekeeping" question than anything else).

I'll stare at it some more; but, am quite curious about #1 and #2.

Gregg

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Memory leaks - what causes them?

by Gregg Liming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gregg Liming wrote:

> 2) Have you tried uncommenting exit and commenting out exec 'true' in
> Process_Item (lines 193 and 196)?  You'd have to assess whether doing so
> might cause issues elsewhere.  Given the comments there about DESTROY, I
> wonder if there's missing garbage collection.

This may be more trouble than it's worth as I would suggest against
trying it on your production instance and instead isolate to a test
instance that only has your rss_subscribed enabled.

Gregg

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Memory leaks - what causes them?

by Chris Barrett-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Just as a follow up to this – I finally had a bit of time to play with this and I think that I found the issue.

 

It turns out that I had three NoExpire triggers set for “common” modules that I had installed at some stage but subsequently deactivated/disabled.  I deleted all three of the redundant triggers and now my leak (hemorrhage would be more appropriate) appears to have stopped.  The modules were “get AP news” (get_ap_breaking.pl), “get top 10 list” (internet_top10.pl), and “get daily news” (news_yahoo.pl).  I deleted all 3 triggers in one hit so I don’t know if it was one particular script that was causing the problem or if it was caused by MH trying to call routines that didn’t exist – the latter seems more likely.

 

It’s now been 40 minutes since I removed the modules and MH hasn’t leaked (apart from a ~2mb leak straight after the reload) – previously I was getting one every 5-6 minutes.

 


From: Chris Barrett [mailto:chris@...]
Sent: Thursday, 12 February 2009 12:02 AM
To: 'The main list for the MisterHouse home automation program'
Subject: Re: [mh] Memory leaks - what causes them?

 

Hi David,

 

I’ve modified code/common/monitor_memory.pl so that it runs every minute rather than every 10 minutes and I’ve reduced the reporting threshold from 0.5MB to 0.05MB.

 

I am running the weather graphing script and although I haven’t yet done what you suggested, it is looking like it may be the culprit because the leak spikes at hh:01, hh:11, hh:21, etc which suggests that the leak is being caused by something that runs every 10 minutes.

 

However, equally disturbing is the ~2MB leak that occurs after each of the reloads.  It appears that MH reloads itself after each trigger event because the two at 17:20 correlate to me manually reloading the code and the reloads at 17:35, 19:30 and 20:30 correlate with some one-shot triggers that I had set.

 

I searched back through my archive of the mailing list and through the wiki for info on memory leaks and came up with very little.  Definitely keen to see something written up on them and I’m happy to do so if/when we work out what’s causing them.

 

 

Wed 11/02/09 17:00:01  49.0 hours:   0.2 MB in  0.1 hours.  211.2 -> 211.4 at  1.17 MB/hour.  Total:  3.31 MB/hour

Wed 11/02/09 17:01:00  49.0 hours:   0.2 MB in  0.0 hours.  211.4 -> 211.6 at 11.04 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:02:00  49.0 hours:   0.2 MB in  0.0 hours.  211.6 -> 211.7 at 10.08 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:11:00  49.2 hours:   0.4 MB in  0.1 hours.  211.7 -> 212.1 at  2.69 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:20:00  49.3 hours:   0.6 MB in  0.1 hours.  212.1 -> 212.7 at  4.08 MB/hour.  Total:  3.32 MB/hour

Wed 11/02/09 17:20:16    ReLoad

Wed 11/02/09 17:20:25    ReLoad

Wed 11/02/09 17:21:01  49.4 hours:   2.3 MB in  0.0 hours.  212.7 -> 215.0 at 138.00 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 17:35:10    ReLoad

Wed 11/02/09 17:36:01  49.6 hours:   1.5 MB in  0.2 hours.  215.0 -> 216.5 at  5.87 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 17:51:01  49.9 hours:   0.3 MB in  0.2 hours.  216.5 -> 216.8 at  1.30 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 17:58:00  50.0 hours:   0.2 MB in  0.1 hours.  216.8 -> 217.0 at  1.44 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:01:00  50.0 hours:   0.3 MB in  0.1 hours.  217.0 -> 217.3 at  5.04 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:02:00  50.0 hours:   0.2 MB in  0.0 hours.  217.3 -> 217.5 at 12.72 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 18:10:00  50.2 hours:   0.1 MB in  0.1 hours.  217.5 -> 217.6 at  1.02 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:11:00  50.2 hours:   0.2 MB in  0.0 hours.  217.6 -> 217.8 at 11.04 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:12:01  50.2 hours:   0.2 MB in  0.0 hours.  217.8 -> 218.0 at 12.48 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 18:20:00  50.3 hours:   0.1 MB in  0.1 hours.  218.0 -> 218.1 at  0.99 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:21:01  50.4 hours:   0.2 MB in  0.0 hours.  218.1 -> 218.3 at 12.72 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:22:00  50.4 hours:   0.2 MB in  0.0 hours.  218.3 -> 218.5 at 11.76 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 18:31:00  50.5 hours:   0.4 MB in  0.1 hours.  218.5 -> 219.0 at  2.83 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:38:00  50.6 hours:   0.1 MB in  0.1 hours.  219.0 -> 219.1 at  1.20 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:41:00  50.7 hours:   0.3 MB in  0.1 hours.  219.1 -> 219.4 at  5.92 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:43:00  50.7 hours:   0.2 MB in  0.0 hours.  219.4 -> 219.6 at  5.52 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:51:01  50.9 hours:   0.3 MB in  0.1 hours.  219.6 -> 219.9 at  2.49 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 18:52:00  50.9 hours:   0.2 MB in  0.0 hours.  219.9 -> 220.1 at 11.52 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:01:00  51.0 hours:   0.4 MB in  0.1 hours.  220.1 -> 220.5 at  2.91 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:08:00  51.1 hours:   0.1 MB in  0.1 hours.  220.5 -> 220.7 at  1.17 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:11:00  51.2 hours:   0.3 MB in  0.1 hours.  220.7 -> 221.0 at  5.68 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:13:00  51.2 hours:   0.2 MB in  0.0 hours.  221.0 -> 221.2 at  6.00 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:21:01  51.4 hours:   0.3 MB in  0.1 hours.  221.2 -> 221.5 at  2.31 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:22:00  51.4 hours:   0.2 MB in  0.0 hours.  221.5 -> 221.7 at 12.96 MB/hour.  Total:  3.36 MB/hour

Wed 11/02/09 19:30:14    ReLoad

Wed 11/02/09 19:31:00  51.5 hours:   1.9 MB in  0.1 hours.  221.7 -> 223.6 at 12.75 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 19:48:01  51.8 hours:   0.1 MB in  0.3 hours.  223.6 -> 223.7 at  0.49 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 19:51:01  51.9 hours:   0.3 MB in  0.1 hours.  223.7 -> 224.0 at  5.28 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 19:52:00  51.9 hours:   0.2 MB in  0.0 hours.  224.0 -> 224.2 at 12.48 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 19:59:00  52.0 hours:   0.1 MB in  0.1 hours.  224.2 -> 224.4 at  1.20 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:01:00  52.0 hours:   0.2 MB in  0.0 hours.  224.4 -> 224.6 at  6.72 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:02:00  52.0 hours:   0.2 MB in  0.0 hours.  224.6 -> 224.7 at  9.84 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 20:11:00  52.2 hours:   0.4 MB in  0.1 hours.  224.7 -> 225.1 at  2.64 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:17:00  52.3 hours:   0.2 MB in  0.1 hours.  225.1 -> 225.3 at  1.60 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:21:01  52.4 hours:   0.3 MB in  0.1 hours.  225.3 -> 225.6 at  4.56 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:22:00  52.4 hours:   0.2 MB in  0.0 hours.  225.6 -> 225.8 at 10.32 MB/hour.  Total:  3.38 MB/hour

Wed 11/02/09 20:30:01  52.5 hours:   0.1 MB in  0.1 hours.  225.8 -> 225.9 at  1.08 MB/hour.  Total:  3.37 MB/hour

Wed 11/02/09 20:30:13    ReLoad

Wed 11/02/09 20:31:00  52.5 hours:   1.8 MB in  0.0 hours.  225.9 -> 227.8 at 110.16 MB/hour.  Total:  3.40 MB/hour

Wed 11/02/09 20:46:00  52.8 hours:   0.1 MB in  0.2 hours.  227.8 -> 227.9 at  0.54 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 20:50:00  52.8 hours:   0.1 MB in  0.1 hours.  227.9 -> 228.0 at  1.98 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 20:51:01  52.9 hours:   0.2 MB in  0.0 hours.  228.0 -> 228.2 at 11.04 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 20:52:00  52.9 hours:   0.2 MB in  0.0 hours.  228.2 -> 228.4 at 11.28 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:00:01  53.0 hours:   0.1 MB in  0.1 hours.  228.4 -> 228.5 at  1.05 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:01:00  53.0 hours:   0.2 MB in  0.0 hours.  228.5 -> 228.7 at 11.04 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:02:00  53.0 hours:   0.2 MB in  0.0 hours.  228.7 -> 228.9 at 12.00 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:10:00  53.2 hours:   0.1 MB in  0.1 hours.  228.9 -> 229.0 at  0.99 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:11:00  53.2 hours:   0.2 MB in  0.0 hours.  229.0 -> 229.3 at 12.48 MB/hour.  Total:  3.39 MB/hour

Wed 11/02/09 21:12:01  53.2 hours:   0.2 MB in  0.0 hours.  229.3 -> 229.4 at 10.80 MB/hour.  Total:  3.39 MB/hour


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Memory leaks - what causes them?

by Gregg Liming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Chris Barrett wrote:

> Just as a follow up to this – I finally had a bit of time to play with
> this and I think that I found the issue.
>
>  
>
> It turns out that I had three NoExpire triggers set for “common” modules
> that I had installed at some stage but subsequently
> deactivated/disabled.  I deleted all three of the redundant triggers and
> now my leak (hemorrhage would be more appropriate) appears to have
> stopped.  The modules were “get AP news” (get_ap_breaking.pl), “get top
> 10 list” (internet_top10.pl), and “get daily news” (news_yahoo.pl).  I
> deleted all 3 triggers in one hit so I don’t know if it was one
> particular script that was causing the problem or if it was caused by MH
> trying to call routines that didn’t exist – the latter seems more likely.

I took a quick look at news_yahoo.pl and noticed that the %news
hashtable never gets cleared out after writing out to the temporary
files.  So, it's pretty obvious where the problem lies with that one.
I'm guessing the same thing exists in the others as well.

Gregg

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365