[jira] [Comment Edited] (PROTON-1394) Creating a Container leaks two file descriptors
[ https://issues.apache.org/jira/browse/PROTON-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100519#comment-16100519 ] Cliff Jansen edited comment on PROTON-1394 at 7/25/17 6:37 PM: --- Fix for goferd segfault. incremental diff: {code:none} diff --git a/proton-c/bindings/python/proton/utils.py b/proton-c/bindings/python/proton/utils.py index 5256dbb..d0679ae 100644 --- a/proton-c/bindings/python/proton/utils.py +++ b/proton-c/bindings/python/proton/utils.py @@ -137,10 +137,10 @@ class BlockingReceiver(BlockingLink): def __del__(self): self.fetcher = None # The next line causes a core dump if the Proton-C reactor finalizes -# first. The self.container reference prevents reactor finalization -# until after it is set to None. -self.link.handler = None -self.container = None +# first. The self.container reference prevents out of order reactor +# finalization. It may not be set if exception in BlockingLink.__init__ +if hasattr(self, "container"): +self.link.handler = None # implicit call to reactor def receive(self, timeout=False): if not self.fetcher: {code} was (Author: cliffjansen): Fix for goferd segfault. incremental diff: {code:diff} diff --git a/proton-c/bindings/python/proton/utils.py b/proton-c/bindings/python/proton/utils.py index 5256dbb..d0679ae 100644 --- a/proton-c/bindings/python/proton/utils.py +++ b/proton-c/bindings/python/proton/utils.py @@ -137,10 +137,10 @@ class BlockingReceiver(BlockingLink): def __del__(self): self.fetcher = None # The next line causes a core dump if the Proton-C reactor finalizes -# first. The self.container reference prevents reactor finalization -# until after it is set to None. -self.link.handler = None -self.container = None +# first. The self.container reference prevents out of order reactor +# finalization. It may not be set if exception in BlockingLink.__init__ +if hasattr(self, "container"): +self.link.handler = None # implicit call to reactor def receive(self, timeout=False): if not self.fetcher: {code} > 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 >Assignee: Cliff Jansen > Fix For: proton-c-0.18.0 > > Attachments: fix_container_leak.patch, leakyprotonpipes.py, > new_fix_container_leak.patch, pn1394_0.patch, pn1394_1.patch, pn1394_2.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
[jira] [Comment Edited] (PROTON-1394) Creating a Container leaks two file descriptors
[ https://issues.apache.org/jira/browse/PROTON-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100519#comment-16100519 ] Cliff Jansen edited comment on PROTON-1394 at 7/25/17 6:36 PM: --- Fix for goferd segfault. incremental diff: {code:diff} diff --git a/proton-c/bindings/python/proton/utils.py b/proton-c/bindings/python/proton/utils.py index 5256dbb..d0679ae 100644 --- a/proton-c/bindings/python/proton/utils.py +++ b/proton-c/bindings/python/proton/utils.py @@ -137,10 +137,10 @@ class BlockingReceiver(BlockingLink): def __del__(self): self.fetcher = None # The next line causes a core dump if the Proton-C reactor finalizes -# first. The self.container reference prevents reactor finalization -# until after it is set to None. -self.link.handler = None -self.container = None +# first. The self.container reference prevents out of order reactor +# finalization. It may not be set if exception in BlockingLink.__init__ +if hasattr(self, "container"): +self.link.handler = None # implicit call to reactor def receive(self, timeout=False): if not self.fetcher: {code} was (Author: cliffjansen): Fix for goferd segfault. incremental diff: diff --git a/proton-c/bindings/python/proton/utils.py b/proton-c/bindings/python/proton/utils.py index 5256dbb..d0679ae 100644 --- a/proton-c/bindings/python/proton/utils.py +++ b/proton-c/bindings/python/proton/utils.py @@ -137,10 +137,10 @@ class BlockingReceiver(BlockingLink): def __del__(self): self.fetcher = None # The next line causes a core dump if the Proton-C reactor finalizes -# first. The self.container reference prevents reactor finalization -# until after it is set to None. -self.link.handler = None -self.container = None +# first. The self.container reference prevents out of order reactor +# finalization. It may not be set if exception in BlockingLink.__init__ +if hasattr(self, "container"): +self.link.handler = None # implicit call to reactor def receive(self, timeout=False): if not self.fetcher: > 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 >Assignee: Cliff Jansen > Fix For: proton-c-0.18.0 > > Attachments: fix_container_leak.patch, leakyprotonpipes.py, > new_fix_container_leak.patch, pn1394_0.patch, pn1394_1.patch, pn1394_2.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
[jira] [Comment Edited] (PROTON-1394) Creating a Container leaks two file descriptors
[ https://issues.apache.org/jira/browse/PROTON-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16051770#comment-16051770 ] Stefan Rijnhart edited comment on PROTON-1394 at 6/16/17 11:13 AM: --- Thanks for the patch. Seems these two lines in _execute_on_error() are redundant {code} else: on_error = on_error {code} We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. was (Author: stefanrijnhart): Thanks for the patch. Seems these two lines in _execute_on_error() are redundant else: on_error = on_error We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. > 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 > > > 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
[jira] [Comment Edited] (PROTON-1394) Creating a Container leaks two file descriptors
[ https://issues.apache.org/jira/browse/PROTON-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16051770#comment-16051770 ] Stefan Rijnhart edited comment on PROTON-1394 at 6/16/17 11:12 AM: --- Thanks for the patch. Seems these two lines in _execute_on_error() are redundant {{else: on_error = on_error }} We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. was (Author: stefanrijnhart): Thanks for the patch. Seems these two lines in _execute_on_error() are redundant {{else: on_error = on_error }} We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. > 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 > > > 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
[jira] [Comment Edited] (PROTON-1394) Creating a Container leaks two file descriptors
[ https://issues.apache.org/jira/browse/PROTON-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16051770#comment-16051770 ] Stefan Rijnhart edited comment on PROTON-1394 at 6/16/17 11:12 AM: --- Thanks for the patch. Seems these two lines in _execute_on_error() are redundant else: on_error = on_error We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. was (Author: stefanrijnhart): Thanks for the patch. Seems these two lines in _execute_on_error() are redundant {{else: on_error = on_error }} We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. > 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 > > > 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
[jira] [Comment Edited] (PROTON-1394) Creating a Container leaks two file descriptors
[ https://issues.apache.org/jira/browse/PROTON-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16051770#comment-16051770 ] Stefan Rijnhart edited comment on PROTON-1394 at 6/16/17 11:10 AM: --- Thanks for the patch. Seems these two lines in _execute_on_error() are redundant {{else: on_error = on_error }} We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. was (Author: stefanrijnhart): Thanks for the patch. Seems these two lines in _execute_on_error() are redundant {{ {quote} else: on_error = on_error{quote}}} We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. > 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 > > > 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
[jira] [Comment Edited] (PROTON-1394) Creating a Container leaks two file descriptors
[ https://issues.apache.org/jira/browse/PROTON-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16051770#comment-16051770 ] Stefan Rijnhart edited comment on PROTON-1394 at 6/16/17 11:09 AM: --- Thanks for the patch. Seems these two lines in _execute_on_error() are redundant {quote} else: on_error = on_error{quote} We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. was (Author: stefanrijnhart): Thanks for the patch. Seems these two lines in _execute_on_error() are redundant ``` else: on_error = on_error ``` We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. > 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 > > > 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
[jira] [Comment Edited] (PROTON-1394) Creating a Container leaks two file descriptors
[ https://issues.apache.org/jira/browse/PROTON-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16051770#comment-16051770 ] Stefan Rijnhart edited comment on PROTON-1394 at 6/16/17 11:09 AM: --- Thanks for the patch. Seems these two lines in _execute_on_error() are redundant {{ {quote} else: on_error = on_error{quote}}} We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. was (Author: stefanrijnhart): Thanks for the patch. Seems these two lines in _execute_on_error() are redundant {quote} else: on_error = on_error{quote} We are currently having a look at https://github.com/twang817/weakrefmethod to include this fix using Python 2. > 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 > > > 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