Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6402

python: freeze on session.close() if an exception was raised in session.receiver()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.30
    • Fix Version/s: None
    • Component/s: Python Client
    • Labels:
      None
    • 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.

      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:

      import qpid.messaging as m
      
      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jandavidmol Jan David Mol
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: