[BUG] SDKv12 crashes during GetBlockList for blobs with large blocks
See original GitHub issueDescribe 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
- Create a blob with any block size > Int32.MaxValue.
- 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:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Azure.Storage.Blobs v12.0.0-beta.2 shipped on March 9th, and contains the bugfix for this issue.
This fix will ship with the next release, currently scheduled to be
12.9.0-beta.2
.