microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.03k stars 399 forks source link

[BUG] UnobservedTaskException 8.0.521 #1245

Open PepijnGramberg opened 3 years ago

PepijnGramberg commented 3 years ago

We upgraded our app from .net core 3.1 to .net5 and servicefabric nugetpackages from 7.2.45 to 8.0.521. Since this point we are seeing some UnobservedTaskExceptions popping up. Currently around 1 or 2 exceptions a day on average. The stack trace is very minimal but we are confident that the issue is somewhere in the SF code, as we also host the same app without SF (single machine, windows service) and those are not giving the exceptions. So the hypotheses is that it is part of the SF internals/communication. If anyone else is seeing this please add your findings!

System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..)
 ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
 ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
   at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](TIOAdapter adapter, Memory`1 buffer)
   --- End of inner exception stack trace ---

Assignees: /cc @microsoft/service-fabric-triage

404-xianjin commented 3 years ago

please help me ! Thank you