question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] SDKv12 crashes during GetBlockList for blobs with large blocks

See original GitHub issue

Describe the bug Int32 overflow exception when parsing blobs with large block >2.1GiB after calling GetBlockListAsync(…).

Expected behavior A BlockList to be returned without an exception.

Actual behavior (include Exception or Stack Trace) An OverflowException is being thrown:

{
  "ExceptionMessage":"Value was either too large or too small for an Int32.","ExceptionType":"OverflowException","ExceptionStack":"
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)\r\n
   at Azure.Storage.Blobs.Models.BlobBlock.FromXml(XElement element)\r\n
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n
   at Azure.Storage.Blobs.Models.BlockList.FromXml(XElement element)\r\n
   at Azure.Storage.Blobs.BlobRestClient.BlockBlob.GetBlockListAsync_CreateResponse(ClientDiagnostics clientDiagnostics, Response response)\r\n
   at Azure.Storage.Blobs.BlobRestClient.BlockBlob.<GetBlockListAsync>d__12.MoveNext()\r\n
--- End of stack trace from previous location where exception was thrown ---\r\n
   […]
}

To Reproduce

  1. Create a blob with any block size > Int32.MaxValue.
  2. Call GetBlockListAsync(…) from SDK for that created blob.

Environment:

  • Name and version of the Library package used: Azure.Storage.Blobs 12.7.0
  • Hosting platform or OS and .NET runtime version: Windows 10 .NET Framework 4.7.2
  • IDE and version : Visual Studio 16.5

Alias ergros

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
seanmcc-msftcommented, Mar 31, 2021
1reaction
jaschrep-msftcommented, Mar 1, 2021

This fix will ship with the next release, currently scheduled to be 12.9.0-beta.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Block Blob: "The specified block list is invalid" when ...
Based on various documentation, it seems the way to do this is to commit a list of previously committed block IDs along with...
Read more >
Uploading blob or block content fails in Azure Blob Storage
This error can occur during concurrent upload commits after you start the upload but before you commit. In this case, the upload fails....
Read more >
How to delete uncommitted blocks in Azure Blob Storage?
One possible solution would be to call Put Block List with empty or a single uncommitted block and then delete the blob. That...
Read more >
Azure Storage Blobs .Net SDK v12 upgrade guide and tips
In this post we will look specifically the Azure Blob SDK v12 ... and then highlight the changes in a few common scenarios...
Read more >
Understanding block blobs, append blobs, and page blobs
When a block blob upload is larger than the value in this property, storage clients break the file into blocks. You can set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found