[ 
https://issues.apache.org/jira/browse/PROTON-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Cliff Jansen updated PROTON-1394:
---------------------------------
    Attachment: pn1394_0.patch

Here is an alternate patch that I hope will work fine with older versions of 
Python and can be backported to older versions of Proton.

By also breaking the circular reference in the handler hierarchy, it allows the 
reactor to free up more than just file descriptors and results in a complete 
release of Python and C resources according to my testing.

It should be noted that weak references to any Wrapper objects (i.e. Reactor 
and Container) is a dubious strategy since the Python Wrapper object's life may 
be very short.  Hence the use of the reactor's C impl rather than a Python 
weakref in the ErrorDelegate.

None of the handlers are Wrapper objects, so a weakref proxy is used to break 
that circular reference.



> Creating a Container leaks two file descriptors
> -----------------------------------------------
>
>                 Key: PROTON-1394
>                 URL: https://issues.apache.org/jira/browse/PROTON-1394
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>    Affects Versions: 0.16.0
>            Reporter: Mike Bonnet
>         Attachments: fix_container_leak.patch, leakyprotonpipes.py, 
> new_fix_container_leak.patch, pn1394_0.patch
>
>
> Creating a Container (Reactor) creates a pipe (two file descriptors). This 
> pipe is never freed, even after the Container is stopped and goes out of 
> scope. An application that creates many short-lived Containers will quickly 
> exhaust file descriptors and Container creation will start failing.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to