[ 
https://issues.apache.org/jira/browse/PROTON-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14998362#comment-14998362
 ] 

Gordon Sim commented on PROTON-1044:
------------------------------------

In the attached reproducer, if you call container.stop() before trying to 
delete it, there is no leak of file descriptors. Once created the reactor must 
be stopped in order to clean everything up.

Trying out the following variation on the attached reproducer, I also see no 
growth in the number of consumed file descriptors:

{noformat}
import os
import gc
from time import sleep

from proton.utils import BlockingConnection


print os.getpid()

for i in range(1000):
    print 'pass #{n}'.format(n=i)
    con = None
    try:
        con = BlockingConnection('localhost')
    except Exception as e:
        print e
    finally:
        if con:
            con.close()
            del con
        gc.collect()
        sleep(1)
{noformat}

Note however that this is based on the latest code upstream, including the most 
recent fix to PROTON-1000 which may be relevant.

> Create/Delete of BlockingConnection leaks file descriptors
> ----------------------------------------------------------
>
>                 Key: PROTON-1044
>                 URL: https://issues.apache.org/jira/browse/PROTON-1044
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>    Affects Versions: 0.9
>         Environment: Fedora 22
>            Reporter: Jeff Ortel
>         Attachments: jortel.py
>
>
> Each time a BlockingConnection is created, it creates a Container.  The 
> Container() opens (2) file descriptors which are never closed.  The result is 
> that (2) file descriptors are leaked for each time BlockingConnection() is 
> called even if properly closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to