You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Cliff Jansen (JIRA)" <ji...@apache.org> on 2017/11/23 16:50:00 UTC

[jira] [Assigned] (PROTON-1691) Memory leak when creating endpoint objects with a handler

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

Cliff Jansen reassigned PROTON-1691:
------------------------------------

    Assignee: Cliff Jansen

> Memory leak when creating endpoint objects with a handler
> ---------------------------------------------------------
>
>                 Key: PROTON-1691
>                 URL: https://issues.apache.org/jira/browse/PROTON-1691
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.18.1
>         Environment: Reproduced on Windows but the code is not platform specific.
>            Reporter: Xin Chen
>            Assignee: Cliff Jansen
>
> Using the Python binding, one can provide a handler when creating an Endpoint object (Connection/Session/Link). This handler object is set in the record context. In pn_###_finalize methods, the context is not cleared by calling pn_record_clear. This results in a _cadapter object leaking in Python process without any references. The fix is simply to call pn_record_clear before freeing the context. For example, in pn_link_finalize (line 1121 in engine.c),
> +  pn_record_clear(link->context);
>   pn_free(link->context);
> With this fix the memory does not grow anymore with repeated link creation/closing. I only use a handler in link endpoint but I think this is needed for connection and session as well.



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

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