Reliability: Linux-HelloWorldMVC crash in few minutes of test run
| HelloWorldMVC App | ||
|---|---|---|
| Azure A2 VM | 80% CPU Usage | 300 concurrent connections |
4 hours of into the reliability test run The app crashes.
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Microsoft.AspNetCore.Server.Kestrel.Http.SocketOutput.ProducingStart()
at Microsoft.AspNetCore.Server.Kestrel.Http.Frame.CreateResponseHeader(Byte[] statusBytes, Boolean appCompleted)
at Microsoft.AspNetCore.Server.Kestrel.Http.Frame.ProduceStartAndFireOnStarting()
at Microsoft.AspNetCore.Server.Kestrel.Http.Frame.1 data, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Http.Frame.WriteAsync(ArraySegment1 data, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Http.FrameResponseStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at Microsoft.AspNetCore.WebUtilities.HttpResponseStreamWriter.1 statusCode) at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewResult viewResult) at Microsoft.AspNetCore.Mvc.ViewResult.<ExecuteResultAsync>d__26.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context) at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.<InvokeResultAsync>d__45.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.InvokeResultAsync(IActionResult result) at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.<InvokeResultFilterAsync>d__44.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.InvokeResultFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.1.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.InvokeResultFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.<InvokeAllResultFiltersAsync>d__43.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.InvokeAllResultFiltersAsync(IActionResult result) at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.<InvokeResourceFilterAsync>d__38.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.InvokeResourceFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.1.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.InvokeResourceFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.<InvokeAsync>d__33.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.InvokeAsync() at Microsoft.AspNetCore.Mvc.Internal.MvcRouteHandler.<InvokeActionAsync>d__8.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.AspNetCore.Mvc.Internal.MvcRouteHandler.InvokeActionAsync(HttpContext httpContext, ActionDescriptor actionDescriptor) at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Hosting.Internal.HostingApplication.ProcessRequestAsync(Context context) at Microsoft.AspNetCore.Server.Kestrel.Http.Frame1.
Is it 4 hours or a few minutes?
it used to crash after 4 hours, but now with workstation GC it crashed within few mins
@cesarbs let's investigate. We may need to move to 1.0.0, but it would be good to have a look at it now.
@sivagms Do you get the same crash with workstation GC and server GC (but with one happening much quicker?)
I didn't see the crash with Server GC
OK, cool. I was under the impression that it crashed also on Server GC but it took a longer time.
Punting further investigation to 1.0.0.
@sivagms How long did you run with the server GC?
24 hours and no crash.
This seems to be the root cause of the issue: https://github.com/dotnet/coreclr/issues/4115
https://github.com/dotnet/coreclr/issues/4115 has been fixed. @sivagms can you verify that the crash is not taking place anymore?
did we take this build with the fix yet. I think korebuild still uses older build 002279 which doesn't have the fix
Ah yes, gotta wait for a new build.
@sivagms Have you verified this against the latest CoreCLR builds we took?
yes and this crash doesn't show up. @cesarbs
Ok. I'll close the bug then.