Closed Trolldemorted closed 4 years ago
I'm not sure if this is the exact same issue or not.
I'm running a .NET Core 2.0 CLI app.
What I'm noticing is if the remote host abruptly closes the connection, and I attempt to call SendAsync or ReceiveAsync immediately thereafter (I'm in a multi-threaded environment so this is possible), I receive a non-.NET exception.
Here's what that looks like:
dotnet(75902,0x700010355000) malloc: *** error for object 0x7fe5669dbf20: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
This of course, is uncatchable.
dotnet(75902,0x700010355000) malloc: error for object 0x7fe5669dbf20: pointer being freed was not allocated set a breakpoint in malloc_error_break to debug
That exception above is not related to this open issue.
This issue is only about Windows 10 UWP apps (which use the WinRT WebSockets implementation underneath System.Web.WebSockets.Client).
@davidsh Ok, I'll create a new issue. Thanks.
cc: @weshaggard @karelz This issue is a request for a servicing backport of a UWP bug in .NET Core (UWP implementation only) presumably in the .NET Core 1.0 or 1.1 branch. Fixing this would require a backport of the fix itself plus a rebuild of the System.Net.WebSockets.Client NuGet package. Also, might need to have to update any other meta-packages as well.
If you don't release a backport of the fix to 1.x you might want to remove System.Net.WebSockets.Client's public listing. On NETStandard20 the classes are included anyways, and I believe every platform except those suffering from the bug are able to use NETStandard20, so there should be no benefit from its existence.
Is full NETStandard20 support for every w10 device out of the question? Platforms and devices being left behind really restrains the standard's usefulness, as we developers will be stuck with ancient releases forever.
Is full NETStandard20 support for every w10 device out of the question?
In terms of UWP apps, the requirement currently is that NETStandard20 requires Windows 10 Fall Creators Update. That is unlikely to ever change due to architectural differences.
In terms of non-UWP apps, NETStandard20 runs on a variety of Windows OS versions including Windows 7, etc.
cc: @terrajobst @richlander
cc: @DavidGoll
@davidsh @DavidGoll for a 1.x hotfix, it would be good to understand the impact on customers -- how many apps/customers are impacted and how often? (those which cannot upgrade to UWP6.0 on FCU)
Is it possible for apps to use their own patched build of the lib? (might be viable temporary workaround, until we get data on impact)
One of our devs downloaded the mopbile 15254 emulator (which has W10M's FCU) and noticed that UniversalApiContract 5/UWP6/NETStandard20 is not supported.
So I assume all w10m devices are affected, and the bug occurs everytime a websocket is closed by the server or a connection failure occurs.
@zamont
Hi, any ETA when System.Net.WebSockets.Client v4.3.2 will be available on nuget.org?
Hi, any ETA when System.Net.WebSockets.Client v4.3.2 will be available on nuget.org?
We think sometime within the next week. We are doing final testing of packages.
cc: @weshaggard
The updated packages went live today:
https://www.nuget.org/packages/System.Net.WebSockets.Client/4.0.2 https://www.nuget.org/packages/System.Net.WebSockets.Client/4.3.2
The 4.0.2 package is based on the release/1.0.x servicing branch. The 4.3.2 package is based on the release/1.1.x servicing branch. In terms of UWP payload, they are identical. Please pick the package based on what your app is currently pulling in for other package references. Most customers can just reference the 4.0.2 package for their UWP app.
You will need to add explicit references to one of these System.Net.WebSockets.Client packages because the current UWP meta-packages hasn't been updated yet to link to the newer WebSocket.Client package.
As as been reported here, if the connection of a
ClientWebSocket
in NETStandard16 is terminated, the process will crash because the exception cannot be handled.This issue has been adressed in NETStandard20/UWP6.0 and the FCU, and it works if you target W10 build 16299 on a desktop. However, on W10M devices like the Lumia 640, the build and thus NETStandard20 is unavailable and everytime a connection is disrupted the app will crash.
Could a fix for this be made available, preferably in the near future? Seeing your app being killed without anything you can do for several months because of a known and identified issue is tiresome.