qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan David Mol (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (QPID-6402) python: freeze on session.close() if an exception was raised in session.receiver()
Date Fri, 20 Feb 2015 16:31:11 GMT

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

Jan David Mol updated QPID-6402:
--------------------------------
    Description: 
If a receiver is created but causes an error (no such queue, malformed address, etc), the
session.close() can freeze in certain circumstances. Example code:

{code}
class Foo:
  def __init__(self):
    self.conn = m.Connection("127.0.0.1")
    self.conn.open()
    self.session = self.c.session()
    try:
      self.r = self.s.receiver("sdklfdsdls")
    except:
      print "no such queue"

  def __del__(self):
    self.session.close()

f = Foo()
{code}

The above sequence does not stall if the code is simply put in a function (or __del__ is merged
into __init__).

Note that providing session.close() with a timeout prevents the freeze, but of course can
cause data loss if the stall was legit.


  was:
If a receiver is created but causes an error (no such queue, malformed address, etc), the
session.close() can freeze in certain circumstances. Example code:

class Foo:
  def __init__(self):
    self.conn = m.Connection("127.0.0.1")
    self.conn.open()
    self.session = self.c.session()
    try:
      self.r = self.s.receiver("sdklfdsdls")
    except:
      print "no such queue"

  def __del__(self):
    self.session.close()

f = Foo()

The above sequence does not stall if the code is simply put in a function (or __del__ is merged
into __init__).

Note that providing session.close() with a timeout prevents the freeze, but of course can
cause data loss if the stall was legit.



> python: freeze on session.close() if an exception was raised in session.receiver()
> ----------------------------------------------------------------------------------
>
>                 Key: QPID-6402
>                 URL: https://issues.apache.org/jira/browse/QPID-6402
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>    Affects Versions: 0.30
>         Environment: Ubuntu 10.04 (python 2.6.5) and 12.04 (python 2.7.3). QPID is compiled
from source on both platforms, with proton 0.8.
>            Reporter: Jan David Mol
>
> If a receiver is created but causes an error (no such queue, malformed address, etc),
the session.close() can freeze in certain circumstances. Example code:
> {code}
> class Foo:
>   def __init__(self):
>     self.conn = m.Connection("127.0.0.1")
>     self.conn.open()
>     self.session = self.c.session()
>     try:
>       self.r = self.s.receiver("sdklfdsdls")
>     except:
>       print "no such queue"
>   def __del__(self):
>     self.session.close()
> f = Foo()
> {code}
> The above sequence does not stall if the code is simply put in a function (or __del__
is merged into __init__).
> Note that providing session.close() with a timeout prevents the freeze, but of course
can cause data loss if the stall was legit.



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

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


Mime
View raw message