ActiveMQ
  1. ActiveMQ
  2. AMQ-4307

org.apache.activemq.transport.http.HttpClientReconnectTest hangs occasionally

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.9.0
    • Component/s: Test Cases
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Regression:
      Unit Test Broken

      Description

      This test occasionally hangs, causing the build to hang. I haven't been able to reproduce it yet, but have seen it several times on the Fuse Hudson instance. I'll attach a patch which adds a timeout.

      1. AMQ4307.patch
        4 kB
        Kevin Earls
      2. HttpClientReconnectTestStack.txt
        46 kB
        Kevin Earls

        Issue Links

          Activity

          Hide
          Timothy Bish added a comment -

          patch applied. Would be great if you can get a stack trace of the hung test.

          Show
          Timothy Bish added a comment - patch applied. Would be great if you can get a stack trace of the hung test.
          Hide
          Kevin Earls added a comment -

          Stack trace from a hung test

          Show
          Kevin Earls added a comment - Stack trace from a hung test
          Hide
          Timothy Bish added a comment -

          That's an interesting one, looks like we are stuck when we processing the shutdowninfo command which triggers us calling a stop while the run method is processing some incoming request.

          Show
          Timothy Bish added a comment - That's an interesting one, looks like we are stuck when we processing the shutdowninfo command which triggers us calling a stop while the run method is processing some incoming request.
          Hide
          Timothy Bish added a comment -

          Kevin, can you retest this one as well and see if the HttpClient update might have also resolved it, not reproducible here.

          Show
          Timothy Bish added a comment - Kevin, can you retest this one as well and see if the HttpClient update might have also resolved it, not reproducible here.
          Hide
          Kevin Earls added a comment -

          Sure, I'll start it now.

          Show
          Kevin Earls added a comment - Sure, I'll start it now.
          Hide
          Kevin Earls added a comment -

          Sorry, this is still failing on my old mac. It failed after 3 iterations on the first attempt, 48 the second time.

          Show
          Kevin Earls added a comment - Sorry, this is still failing on my old mac. It failed after 3 iterations on the first attempt, 48 the second time.
          Hide
          Timothy Bish added a comment -

          This one is a bit tricky. The lock occurs because the httpMethod is finishing its write and need to update the SSL Socket's state table and some other internal housekeeping and we come in and try to abort the method and close the socket right away. We should probably at least give the run method a chance to finish before we hard abort the httpMethod, question is how long do we wait. Some Google searching seems to indicate that doesn't happen on every JDK version.

          Show
          Timothy Bish added a comment - This one is a bit tricky. The lock occurs because the httpMethod is finishing its write and need to update the SSL Socket's state table and some other internal housekeeping and we come in and try to abort the method and close the socket right away. We should probably at least give the run method a chance to finish before we hard abort the httpMethod, question is how long do we wait. Some Google searching seems to indicate that doesn't happen on every JDK version.
          Hide
          Timothy Bish added a comment -

          I worked around it as best I could, on my current 1.7 JVM I don't see the lock so hopefully this disappears as later JVMs are installed.

          Show
          Timothy Bish added a comment - I worked around it as best I could, on my current 1.7 JVM I don't see the lock so hopefully this disappears as later JVMs are installed.
          Hide
          Kevin Earls added a comment -

          This now manages to get through 100 iterations on my old slow Mac, so I think we're good.

          Show
          Kevin Earls added a comment - This now manages to get through 100 iterations on my old slow Mac, so I think we're good.

            People

            • Assignee:
              Timothy Bish
              Reporter:
              Kevin Earls
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development