Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-2027

Proactor connection wake after memory freed when using pn_proactor_disconnect().

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: proton-c-0.27.0
    • Fix Version/s: proton-c-0.27.1
    • Component/s: proton-c
    • Labels:
      None

      Description

      The normal cleanup procedure for epoll and win_iocp proactors waits for all async activity to complete before freeing memory.

      pn_proactor_disconnect can't actually force a close so it launches a separate async activity piggy-backed on the internal wake mechanism of any connections to be closed.

      If the disconnect is happening at the same time as a separate thread doing a normal close, a new wake can result after concluding there are none left.

      The solution is to mark the connection as "already awake" before entering the cleanup code so new wakes are no-ops.  The libuv proactor doesn't need this as the disconnect function is managed within libuv and never competes with the normal close operation.

        Attachments

          Activity

            People

            • Assignee:
              cliffjansen Clifford Jansen
              Reporter:
              cliffjansen Clifford Jansen
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: