Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-580

Semaphore leak during connection failure.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.6
    • 2.6.3
    • None
    • None

    Description

      _socket_semaphore.acquire() is called in Pool.get_socket() before we attempt to pop a socket from the set of sockets or create a new socket. Unfortunately, if __check fails and/or we can't create a new socket we don't call _socket_semaphore.release(). This causes all application threads to hang once the semaphore's value reaches 0.

      https://groups.google.com/forum/#!topic/mongodb-user/l0PY8zsjZ3c

      Attachments

        1. pool_fix.diff
          0.7 kB
        2. pymongoConnectionSemaphore.py
          1 kB

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: