[Mono-dev] TCP connects

Greg Young gregoryyoung1 at gmail.com
Thu May 26 15:36:00 UTC 2016


In looking through a recent issue, when a node disappears we end up with:

"Threadpool worker" at <unknown> <0xffffffff>
at (wrapper managed-to-native)
System.Net.Sockets.Socket.Connect_internal
(intptr,System.Net.SocketAddress,int&) <0xffffffff>
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint) <0x00135>
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest) <0x00615>
at System.Net.WebConnection.InitConnection (object) <0x0031a>
at System.Net.WebConnection.<WebConnection>m__0 (object) <0x00024>
at (wrapper runtime-invoke)
<Module>.runtime_invoke_void__this___object
(object,intptr,intptr,intptr) <0xffffffff>

"Threadpool worker" at <unknown> <0xffffffff>
at (wrapper managed-to-native)
System.Net.Sockets.Socket.Connect_internal
(intptr,System.Net.SocketAddress,int&) <0xffffffff>
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint) <0x00135>
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest) <0x00615>
at System.Net.WebConnection.InitConnection (object) <0x0031a>
at System.Net.WebConnection.<WebConnection>m__0 (object) <0x00024>
at (wrapper runtime-invoke)
<Module>.runtime_invoke_void__this___object
(object,intptr,intptr,intptr) <0xffffffff>

On every thread from our async code. As the connection is timing out
the entire ThreadPool very quickly blocks.

https://github.com/mono/mono/blob/master/mcs/class/System/System.Net/WebConnection.cs#L195

I am guessing the right fix here would be to use async connect?

Cheers,

Greg


-- 
Studying for the Turing test


More information about the Mono-devel-list mailing list