Uploaded image for project: 'ActiveMQ .Net'
  1. ActiveMQ .Net
  2. AMQNET-338

TcpTransport.cs - Close() taking 30 seconds

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.1, 1.5.6
    • Fix Version/s: 1.6.0, 1.6.3, 1.7.0
    • Component/s: ActiveMQ, Stomp
    • Labels:
      None
    • Environment:

      Windows 7, .NET 2.0, Visual Studio 2008, Unity 3.4

      Description

      We've been noticing a random freeze on exit for 30 seconds. The frequency is different per machine, but it happens about 10-30% of the time, sometimes more. We've traced it down to TcpTransport.Close(), in this block:

      if(null != readThread)
      {
      	if(Thread.CurrentThread != readThread && readThread.IsAlive)
      	{
      		if(!readThread.Join((int) MAX_THREAD_WAIT.TotalMilliseconds))
      		{
      			readThread.Abort();
      		}
      	}
      
      	readThread = null;
      }
      

      We're running this in the Unity game engine, which run C# script in a Mono environment.

      I understand that reproducing this on your end would be difficult, but I'm reporting this in the hopes that I can gain some insight why this is happening.

      • What thread is this code waiting for?
      • What would be some of the causes of the deadlock?

      No messages are being sent or received. It's basically starting up and closing down.

      Our temporary workaround is to reduce this wait time from 30 seconds to 5 seconds, but I'd like to eventually find a cause.

      Thanks

        Attachments

          Activity

            People

            • Assignee:
              jgomes Jim Gomes
              Reporter:
              fasteddie Eddie Fast
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: