[rt-devel] debug info on memory leaks under mod_perl.

Jesse Vincent jesse at bestpractical.com
Mon Oct 20 11:56:28 EDT 2003



On Mon, Oct 20, 2003 at 07:41:51PM +0400, Ruslan U. Zakirov wrote:
> 
> We leak at least one CurrentUser object + all object on which it has 
> pointer(PrincipalObj, UserObj...) Why? Because of 'user' references on 
> CurrentUser which have each object inherited from RT::Handle and 
> RT::Record. And also CurrentObject itself have such pointer. So after 
> untie of %session perl never call DESTROY on this objects.
> 
> 1) weaken solution is good, but have issues
> 	a) perl should be >5.6.0, but it's not a problem for RT. RT have 
> 	same requirments.
> 	b) such refs hardly maintainable in RT's OO scheme as I think.

Using weaken seems to be the lowest-impact solution. I want to run this
by a couple folks before I commit to a solution, though.

> 2) emplimenting ProxyObject? I don't have expirience at all in it. 
> Restless nights and of course I do it, but I'm not sure that Jesse apply 
>  patches.(after digging with solution number 3 I think that this is 
> good idea :) ).



> 3) write cleanup function that do all things. It's what I tried to do.

The problem is that this will only work within the web framework as
you've designed it.


> Uff... I hope you understand me. I know my english is terrible.

Your english is still a dozen times better than my Russian, and you
definitely got the point across.  Spasibo bolshoe for the heroic triage.

	Best,
	Jesse


> PS:
> And last. Jesse, I don't understand why RT::Init() call placed in 
> RT::Mason::Handler? This cause another leak as I think, but I don't dig 
> it deep. I only move this call upper just in RT::Mason and my test RT 
> instalation feel fine for me.

IIRC, there are failure modes associated with database disconnects that
used to bite us when the Init was outside the handler block.  Have a
look at the most recent fastcgi handler to see the newer approach we're
using there. Any idea what you think we're leaking on there? Is it the
users we create and destroy? If so, the fix for the first issue you've
raised might solve it.


> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel
> 

-- 
http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.



More information about the Rt-devel mailing list