Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7475

HttpConduit enabled Bus blocks pending requests indefinitely after shutdown

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.1.12
    • Fix Version/s: NeedMoreInfo
    • Component/s: Bus, Transports
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Olá

      Just found out an issue with shutting down the Bus when configured with AsyncHttpConduit.

      Problem

      In case it happens, applications won't be able to gracefully shutdown, as it causes requests to hang on the AsyncHTTPConduit.AsyncWrappedOutputStream::getHttpResponse indefinitely.

      How to reproduce

      This is an edge case, but it happens when the Bus is shutdown after the client started the request but before getting the ConnectException. Below there is a link to a Junit test reproducing the problem.

      https://gist.github.com/dwp-joaomelo/80926c3ded0d17e1e94a72245ece2f79

      The test should hang forever on the last statement thread.join();, that is, waiting for the request thread to do it's job.

      Note that you might need to run it a couple of times as it is a timing thing, in case you cannot reproduce the issue, you might need to tweak the Thread.sleep(1000).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              joaomelo Joao Silva de Melo
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: