Qpid
  1. Qpid
  2. QPID-3447

Creating invalid federation link causes file descriptor leak

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10
    • Fix Version/s: 0.13
    • Component/s: C++ Broker
    • Labels:

      Description

      Specifying invalid IP address of destination broker causes repeatable file
      descriptor leak.

      Steps to Reproduce:
      1. qpid-route -v link add localhost 10:17700
      (alternativelly, create a dynamic route like qpid-route dynamic add localhost 10:17700 amq.direct )
      2. lsof -p $(pgrep qpidd) | grep "can't identify protocol"

      Since then, lsof will show "can't identify protocol" file descriptors whose number is increasing in time.

      1. fd_leak.patch
        1 kB
        Pavel Moravec

        Activity

        Hide
        Pavel Moravec added a comment -

        Patch proposal.

        The root cause of the FD leak is missing Socket::close() method when ::connect method returns negative (i.e. connection fails).

        Patch adds the close method invocation plus logs the failure via QPID_LOG.

        Show
        Pavel Moravec added a comment - Patch proposal. The root cause of the FD leak is missing Socket::close() method when ::connect method returns negative (i.e. connection fails). Patch adds the close method invocation plus logs the failure via QPID_LOG.
        Hide
        Andrew Stitcher added a comment -

        Note the attached fix is not the fix that was applied as it only ameliorates the symptom of running out of file handles rather than fixing the underlying Socket leak.

        Show
        Andrew Stitcher added a comment - Note the attached fix is not the fix that was applied as it only ameliorates the symptom of running out of file handles rather than fixing the underlying Socket leak.

          People

          • Assignee:
            Andrew Stitcher
            Reporter:
            Pavel Moravec
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2h
              2h
              Remaining:
              Remaining Estimate - 2h
              2h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development