Summary
Our application has started logging an unobserved exception:
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. (Operation canceled)  ---> System.Net.Sockets.SocketException (125): Operation canceled   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)   at System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)   --- End of inner exception stack trace ---
This started happening when we updated our driver to version 3.5. We downgraded until the error disappeared, which was in version 3.1.Â
Driver version: 3.2 - 3.5
MongoDB environment: Version 8.0.13, replica set 4 nodes
How to Reproduce
Start up a application using a MongoDB driver version higher then version 3.1.Â
- related to
-
CSHARP-5661 Fix UnobservedTaskException on socket connecting timeout
-
- Closed
-
-
CSHARP-5777 Avoid ThreadPool-dependent IO methods in sync API
-
- Closed
-
-
CSHARP-5798 Implement test to track if any UnobservedTaskExceptions were raised while test run
-
- Closed
-