activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom (JIRA)" <>
Subject [jira] [Commented] (AMQNET-338) TcpTransport.cs - Close() taking 30 seconds
Date Wed, 24 Apr 2013 10:15:15 GMT


Tom commented on AMQNET-338:

Can we reopon this one? We have the exact same issue but with .Net 4.5 and Apache.NMS.ActiveMq
1.5.6.  It's quite possible that we're doing something wrong but we're seeing identical delays
and the thread abort.  

We're currently trying to isolate the conditions for this to occur but having difficulty extracting
a reliable test case.

>From our reading of the code it is not obvious under what conditions this timeout/abort
will occur, closing the connection should cause the Socket.Receive in the unmarshal code to
throw an exception causing the read loop to break and terminate.

Is there a reason the exception might not get thrown?  There seem to be a number of empty
catch statements in TcpTransport.Close() could it be that some more error handling is required
in these cases.

Any help understanding this issue would be greatly appreciated.
> TcpTransport.cs - Close() taking 30 seconds
> -------------------------------------------
>                 Key: AMQNET-338
>                 URL:
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.1
>         Environment: Windows 7, .NET 2.0, Visual Studio 2008, Unity 3.4
>            Reporter: Eddie Fast
>            Assignee: Timothy Bish
> 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:
> {noformat}
> if(null != readThread)
> {
> 	if(Thread.CurrentThread != readThread && readThread.IsAlive)
> 	{
> 		if(!readThread.Join((int) MAX_THREAD_WAIT.TotalMilliseconds))
> 		{
> 			readThread.Abort();
> 		}
> 	}
> 	readThread = null;
> }
> {noformat}
> 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

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message