Deadlock problems with send function (wodWebServer / wodWebServer.NET)
Hello,
I'm using the SSH.net component for Telnet and SSH communications.
I'm using a none blocking type, and I get very bad results when using Telnet protocol.
I have a textbox with a KeyDown event, and when ever I press a key for a few seconds (and calling the SSH.Send(..) function for each event) my main thread gets blocked.
When looking at the stacktrace, I get:
[code]
[In a sleep, wait, or join] WindowsBase.dll!System.Windows.Threading.DispatcherSynchronizationContext.Wait(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout) + 0x26 bytes
mscorlib.dll!System.Threading.SynchronizationContext.InvokeWaitMethodHelper(System.Threading.SynchronizationContext syncContext, System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout) + 0x1a bytes
[Native to Managed Transition]
[Managed to Native Transition]
WeOnlyDo.Client.SSH.dll!WeOnlyDo.Protocols.SSH.MethodNotification(System.IAsyncResult ar) + 0x70 bytes
WeOnlyDo.Client.SSH.dll!WeOnlyDo.Protocols.SSH.SendNotification(System.IAsyncResult ar) + 0xc6 bytes
System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) + 0x69 bytes
System.dll!System.Net.ContextAwareResult.CaptureOrComplete(ref System.Threading.ExecutionContext cachedContext, bool returnContext) + 0xab bytes
System.dll!System.Net.ContextAwareResult.FinishPostingAsyncOp(ref System.Net.CallbackClosure closure) + 0x3c bytes
System.dll!System.Net.Sockets.Socket.BeginSend(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback callback, object state) + 0xef bytes
System.dll!System.Net.Sockets.Socket.BeginSend(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback callback, object state) + 0x23 bytes
WeOnlyDo.Client.SSH.dll!WeOnlyDo.Net.Sockets.FileSocket.BeginSend(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback callback, object state) + 0x6f bytes
WeOnlyDo.Client.SSH.dll!WeOnlyDo.Protocols.SSH.SendPacket(ref byte[] data, int start, int len) + 0x27a bytes
WeOnlyDo.Client.SSH.dll!WeOnlyDo.Protocols.SSH.Send() + 0x10a bytes
WeOnlyDo.Client.SSH.dll!WeOnlyDo.Protocols.SSH.Send(ref byte[] Data, int Offset, int Len) + 0x42b bytes
WeOnlyDo.Client.SSH.dll!WeOnlyDo.Protocols.SSH.Send(ref byte[] Data) + 0x30 bytes
WeOnlyDo.Client.SSH.dll!WeOnlyDo.Client.SSH.Send(byte[] Data) + 0x2b bytes
[/code]
I would appreciate your quick response.
Complete thread:
- Deadlock problems with send function - Marian, 2010-05-08, 08:37
- Re: Deadlock problems with send function - Marian, 2010-05-08, 08:38
- Re: Deadlock problems with send function - woddrazen, 2010-05-08, 11:13
- Re: Deadlock problems with send function - Marian, 2011-01-15, 00:43
- Re: Deadlock problems with send function - woddrazen, 2011-01-15, 12:24
- Re: Deadlock problems with send function - Marian, 2011-01-15, 12:44
- Re: Deadlock problems with send function - Marian, 2011-01-15, 18:04
- Re: Deadlock problems with send function - woddrazen, 2011-01-16, 10:24
- Re: Deadlock problems with send function - Marian, 2011-01-16, 18:51
- Re: Deadlock problems with send function - woddrazen, 2011-01-16, 18:53
- Re: Deadlock problems with send function - Marian, 2011-01-16, 22:17
- Re: Deadlock problems with send function - woddrazen, 2011-01-16, 23:44
- Re: Deadlock problems with send function - Marian, 2011-01-16, 22:17
- Re: Deadlock problems with send function - woddrazen, 2011-01-16, 18:53
- Re: Deadlock problems with send function - Marian, 2011-01-16, 18:51
- Re: Deadlock problems with send function - woddrazen, 2011-01-16, 10:24
- Re: Deadlock problems with send function - Marian, 2011-01-15, 18:04
- Re: Deadlock problems with send function - Marian, 2011-01-15, 12:44
- Re: Deadlock problems with send function - woddrazen, 2011-01-15, 12:24
- Re: Deadlock problems with send function - Marian, 2011-01-15, 00:43
- Re: Deadlock problems with send function - woddrazen, 2010-05-08, 11:13
- Re: Deadlock problems with send function - Marian, 2010-05-08, 08:38