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

StackOverflow exception from Microsoft.WindowsAzure.Storage.Blob.BlobWriteStream.WriteBlobAsync #920

Closed
HengzheLi opened this issue Aug 7, 2019 · 7 comments

Comments

@HengzheLi
Copy link

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the SDK was used?

9.4.0

Which platform are you using? (ex: .NET Core 2.1)

.NET Framework 4.6.2

What problem was encountered?

IIS encounter a StackOverflowException from the code then IIS crashed

How can we reproduce the problem in the simplest way?

Can't reproduce for now. But got a dump file and have the call stack:
image
And below is the related screenshot from Paralled Stacks from dump file:
image

Have you found a mitigation/solution?

No.

The issue may be not related to the blob's sdk code. But as the CallStack seems that it indicates the exception from BlobWriteStream.WriteBlobAsync and you are so familiar with the SDK. Could you give me some advices?

@relf218
Copy link

relf218 commented Aug 26, 2019

I have a similar issue when uploading data of larger than 6GB.
I am using 11.0.0, my .net framework 4.7.1 project is doing nothing but uploading data using UploadFromStreamAsync, and it will crash toward the end of the upload with a Stackoverflow exception.

@HengzheLi
Copy link
Author

@relf218 I think maybe we need to vote this issue to involve the team for investigation

@KeyMetricSoft
Copy link

KeyMetricSoft commented Sep 12, 2019

I'm running into this as well. Uploading a 6.3GB always results in a stack overflow near the end. Very easy to reproduce when using UploadFromStreamAsync with a FileStream. Using 11.0.0 of the client library with .NET Framework 4.6.2.

Additional configuration details: we're using ParallelOperationThreadCount of 1 and have StoreBlobContentMD5 and UseTransactionalMD5 set to false, and DisableContentMD5Validation set to true.

> mscorlib.dll!Microsoft.Win32.UnsafeNativeMethods.ManifestEtw.EventWriteTransferWrapper(long registrationHandle, ref System.Diagnostics.Tracing.EventDescriptor eventDescriptor, System.Guid* activityId, System.Guid* relatedActivityId, int userDataCount, System.Diagnostics.Tracing.EventProvider.EventData* userData) Line 185 C# mscorlib.dll!System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(int eventId, System.Guid* relatedActivityId, int eventDataCount, System.Diagnostics.Tracing.EventSource.EventData* data) Line 1234 C# mscorlib.dll!System.Diagnostics.Tracing.EventSource.WriteEvent(int eventId, int arg1, int arg2, int arg3) Line 816 C# mscorlib.dll!System.Threading.Tasks.TplEtwProvider.TaskWaitEnd(int OriginatingTaskSchedulerID, int OriginatingTaskID, int TaskID) Line 566 C# mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0() Line 282 C# mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining, ref System.Threading.Tasks.Task currentTask) Line 810 C# mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations() Line 3617 C# mscorlib.dll!System.Threading.Tasks.Task<System.Threading.Tasks.VoidTaskResult>.TrySetResult(System.Threading.Tasks.VoidTaskResult result) Line 490 C# mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.SetResult(System.Threading.Tasks.VoidTaskResult result) Line 603 C# mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.SetResult(System.Threading.Tasks.Task<System.Threading.Tasks.VoidTaskResult> completedTask) Line 638 C# Microsoft.Azure.Storage.Blob.dll!Microsoft.Azure.Storage.Blob.BlobWriteStream.WriteBlockAsync.AnonymousMethod__0(bool runningInline, System.Threading.CancellationToken internalToken) Unknown mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980 C# mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928 C# mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() Line 1070 C# mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents.AnonymousMethod__0() Line 977 C# mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0() Line 288 C# mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining, ref System.Threading.Tasks.Task currentTask) Line 810 C# mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations() Line 3617 C# mscorlib.dll!System.Threading.Tasks.Task<System.Threading.Tasks.VoidTaskResult>.TrySetResult(System.Threading.Tasks.VoidTaskResult result) Line 490 C# mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.SetResult(System.Threading.Tasks.VoidTaskResult result) Line 603 C# mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.SetResult(System.Threading.Tasks.Task<System.Threading.Tasks.VoidTaskResult> completedTask) Line 638 C# Microsoft.Azure.Storage.Blob.dll!Microsoft.Azure.Storage.Blob.BlobWriteStream.WriteBlockAsync.AnonymousMethod__0(bool runningInline, System.Threading.CancellationToken internalToken) Unknown

2019-09-12_19-07-54

@botinko
Copy link

botinko commented Feb 13, 2020

We have the same error!
We use Version 9.4.2.0 and Net framework 4.6.1

@austvik
Copy link

austvik commented Mar 5, 2020

We have the same error.
Framework 4.6.1

@botinko
Copy link

botinko commented Mar 6, 2020

This bug is fixed in #894

@CooperRon
Copy link

I am still getting the StackOverflow exception when trying to upload large blobs (i.e. more than 2GB) with ParallelOperationThreadCount=1. When using ParallelOperationThreadCount > 1 the operation is successful.

I am using Microsoft.Azure.Storage.Blob nuget version 11.0.0 but it also happens with the latest version (11.2.2).
Running with .NET framework 4.7.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants