Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.19k stars 4.55k forks source link

[BUG] NullReferenceException in System.Net.Http.HttpConnection.ContentLengthReadStream.ReadAsync #44884

Open vrozovmicrosoft opened 2 weeks ago

vrozovmicrosoft commented 2 weeks ago

Library name and version

Azure.Storage.Blobs - 12.16 (AzureCore 1.38)

Describe the bug

NullRef exception in DownloadToAsync call: Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at System.Net.Http.HttpConnection.ContentLengthReadStream.ReadAsync(Memory1 buffer, CancellationToken cancellationToken) at Azure.Core.Pipeline.ReadTimeoutStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) at Azure.Core.Pipeline.RetriableStream.RetriableStreamImpl.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) at Azure.Core.Pipeline.RetriableStream.RetriableStreamImpl.RetryAsync(Exception exception, Boolean async, CancellationToken cancellationToken) at Azure.Core.Pipeline.RetriableStream.RetriableStreamImpl.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) at System.IO.Stream.<CopyToAsync>g__Core|29_0(Stream source, Stream destination, Int32 bufferSize, CancellationToken cancellationToken) at Azure.Storage.Blobs.PartitionedDownloader.CopyToAsync(BlobDownloadStreamingResult result, Stream destination, CancellationToken cancellationToken) at Azure.Storage.Blobs.PartitionedDownloader.<>c__DisplayClass9_0.<<DownloadToAsync>g__ConsumeQueuedTask|0>d.MoveNext() --- End of stack trace from previous location --- at Azure.Storage.Blobs.PartitionedDownloader.DownloadToAsync(Stream destination, BlobRequestConditions conditions, CancellationToken cancellationToken) at Azure.Storage.Blobs.Specialized.BlobBaseClient.StagedDownloadAsync(Stream destination, BlobRequestConditions conditions, IProgress1 progressHandler, StorageTransferOptions transferOptions, DownloadTransferValidationOptions transferValidationOverride, Boolean async, CancellationToken cancellationToken) at Azure.Storage.Blobs.Specialized.BlobBaseClient.DownloadToAsync(Stream destination, BlobRequestConditions conditions, StorageTransferOptions transferOptions, CancellationToken cancellationToken) at Kusto.Cloud.Platform.Azure.Storage.ExtendedBlockBlobClient.<>c__DisplayClass6_0.<b__0>d.MoveNext() in .\Src\Common\Kusto.Cloud.Platform.Azure.Storage\XStore\ExtendedBlockBlobClient.cs:line 162

Expected behavior

Ni NullRef

Actual behavior

NullReferenceException

Reproduction Steps

Reproduced only one in the call to DownloadToAsync() for https://5vwtorageadlsprodeu10neu.blob.core.windows.net/2snsignins9md202107092013338675pmd30/databaseObjects_v10%2B0000468317%2B0000000000.lz4

Environment

No response

github-actions[bot] commented 2 weeks ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.