[Mono-dev] TCP connects

Greg Young gregoryyoung1 at gmail.com
Fri May 27 08:18:39 UTC 2016


OK I spent some more time looking through this. There is a ton of not
really async stuff happening in async methods also
cancellations/timeouts/etc don't work properly. Moral of the story for
people searching this in the future etc, use the PCL version which
seems to work thus far.



On Thu, May 26, 2016 at 5:36 PM, Greg Young <gregoryyoung1 at gmail.com> wrote:
> 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



-- 
Studying for the Turing test


More information about the Mono-devel-list mailing list