Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The sdk resurface Microsoft.Azure.Documents.TransportException instead of Microsoft.Azure.Cosmos.CosmosException #5001

Open
samsadsam opened this issue Feb 7, 2025 · 0 comments
Labels
customer-reported Issue created by a customer needs-investigation

Comments

@samsadsam
Copy link

samsadsam commented Feb 7, 2025

Describe the bug
An unobserved task exception Microsoft.Azure.Documents.TransportException surfaces in our application code and we think there are abandoned/orphaned tasks in your sdk.

Additional context
Here is the stack trace:

Microsoft.Azure.Documents.TransportException: A client transport error occurred: The connection failed. (Time: 2025-02-05T23:23:07.7159876Z, activity ID: 2ae749ef-7bb7-4e95-8131-1a58eb3f41d1, error code: ConnectionBroken [0x0012], base error: socket error OperationAborted [0x000003E3], URI: rntbd://azcfg-prod-eus2euap-eastus2euap.documents.azure.com:6808/apps/a29a19db-d121-47f3-878f-003f73d6c630/services/2bd2c5b4-689b-432a-b4db-4ac57d7f7320/partitions/b0993604-2580-4889-becf-9f4e8a87d9f9/replicas/133760161653465095s, connection: 10.24.7.38:45922 -> 10.0.0.5:6808, payload sent: True)
---> Microsoft.Azure.Documents.TransportException: A client transport error occurred: Failed to read the server response. (Time: 2025-02-05T23:23:07.7156099Z, activity ID: 00000000-0000-0000-0000-000000000000, error code: ReceiveFailed [0x000F], base error: socket error OperationAborted [0x000003E3], URI: rntbd://azcfg-prod-eus2euap-eastus2euap.documents.azure.com:6808/, connection: 10.24.7.38:45922 -> 10.0.0.5:6808, payload sent: True)
---> System.IO.IOException: Unable to read data from the transport connection: Operation canceled.
---> System.Net.Sockets.SocketException (125): Operation canceled
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize)
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](Memory1 buffer, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) at System.Threading.Tasks.ValueTask1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
--- End of stack trace from previous location ---
at Microsoft.Azure.Cosmos.Rntbd.RntbdStreamReader.ReadStreamAsync(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.Azure.Cosmos.Rntbd.RntbdStreamReader.PopulateBytesAndReadAsync(Byte[] payload, Int32 offset, Int32 count)
at Microsoft.Azure.Documents.Rntbd.Connection.ReadPayloadAsync(Byte[] payload, Int32 length, String type, ChannelCommonArguments args)
--- End of inner exception stack trace ---
at Microsoft.Azure.Documents.Rntbd.Connection.TraceAndThrowReceiveFailedException(IOException e, String type, ChannelCommonArguments args)
at Microsoft.Azure.Documents.Rntbd.Connection.ReadPayloadAsync(Byte[] payload, Int32 length, String type, ChannelCommonArguments args)
at Microsoft.Azure.Documents.Rntbd.Connection.ReadResponseMetadataAsync(ChannelCommonArguments args)
at Microsoft.Azure.Documents.Rntbd.Dispatcher.ReceiveLoopAsync()
--- End of inner exception stack trace ---
at Microsoft.Azure.Documents.Rntbd.Dispatcher.CallAsync(ChannelCallArguments args, TransportRequestStats transportRequestStats)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issue created by a customer needs-investigation
Projects
None yet
Development

No branches or pull requests

1 participant