[IronPython] IronPython with CherryPy through WSGI Memory issue

Dino Viehland dinov at microsoft.com
Fri Apr 2 22:52:42 CEST 2010

Jeff wrote:
> I'm seeing a lot of objects with !gcroots that start with
> DOMAIN(005F5F48):HANDLE(Strong):161100:Root:02913dac(System.Threading.Thread)-
> >
> 0b93e034(System.Object[][])->
> 0b93e048(System.Object[])->
> 223edd34(System.Collections.Generic.List`1[[Microsoft.Scripting.Runtime.Dynami
> cStackFrame,
> Microsoft.Dynamic]])->
> 223edd6c(System.Object[])->
> 223edd4c(IronPython.Runtime.PythonDynamicStackFrame)->
> 09441a48(IronPython.Runtime.FunctionCode)->
> ...
> So it looks like it might be related to dynamic stack frames --
> something that is in thread local storage and not getting cleaned up.

Is this 2.6 or 2.6.1RC?  I wonder if this could be the finalizer thread.  
!do on the thread object should give you the managed thread ID which can be
associated with the values in !threads.

Anyway this is definitely the exception leak - which is now fixed for 2.7.  If 
This is happening on the finalizer thread then maybe there's somewhere else we
need to clear this data for pre-2.7.

More information about the Ironpython-users mailing list