Repository navigation
Access Violation Exception from UnpackToRgbPlanesAvx2Reduce #3247
Description
Prerequisites
- I have written a descriptive issue title
- I have verified that I am running the latest version of ImageSharp
- I have verified if the problem exist in both
DEBUGandRELEASEmode - I have searched open and closed issues to ensure it has not already been reported
ImageSharp version
3.1.12
Other ImageSharp packages and versions
SixLabors.ImageSharp.Web 3.1.4 (via Umbraco.Cms 13)
Environment (Operating system, version and so on)
Azure App Service (Windows), Umbraco 13
.NET Framework version
8
Description
Hi there,
We're hitting this on ImageSharp 3.1.12 in production (Umbraco 13, ImageSharp.Web, Azure App Service, .NET 8) — same UnpackToRgbPlanesAvx2Reduce frame, fatal process crash. The backport in #3106 is merged to release/3.1.x but there's no 3.1.13 on NuGet. Umbraco (all versions, incl. 18) pins ImageSharp to 3.1.x, so we can't move to 4.x. Any chance of a 3.1.13 release?
Occurs intermittently in production on image resize (cache miss only).
No deterministic local repro — crash is in the AVX2 path during JPEG encode.
`
This call stack caused the exception:
InlinedCallFrame
SixLabors.ImageSharp.SimdUtils+HwIntrinsics.UnpackToRgbPlanesAvx2Reduce
SixLabors.ImageSharp.PixelFormats.Rgb24+PixelOperations.UnpackIntoRgbPlanes
SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder.SpectralConverter1[[SixLabors.ImageSharp.PixelFormats.Rgb24 SixLabors.ImageSharp]].ConvertStride SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder.SpectralConverter1[[SixLabors.ImageSharp.PixelFormats.Rgb24 SixLabors.ImageSharp]].ConvertFull
SixLabors.ImageSharp.Formats.Jpeg.JpegEncoderCore.WriteHuffmanScans[[SixLabors.ImageSharp.PixelFormats.Rgb24 SixLabors.ImageSharp]]
SixLabors.ImageSharp.Formats.Jpeg.JpegEncoderCore.Encode[[SixLabors.ImageSharp.PixelFormats.Rgb24 SixLabors.ImageSharp]]
SixLabors.ImageSharp.Formats.Jpeg.JpegEncoder.Encode[[SixLabors.ImageSharp.PixelFormats.Rgb24 SixLabors.ImageSharp]]
SixLabors.ImageSharp.Formats.ImageEncoder.EncodeWithSeekableStream[[SixLabors.ImageSharp.PixelFormats.Rgb24 SixLabors.ImageSharp]]
SixLabors.ImageSharp.Formats.ImageEncoder.Encode[[SixLabors.ImageSharp.PixelFormats.Rgb24 SixLabors.ImageSharp]]
SixLabors.ImageSharp.Image+EncodeVisitor.Visit[[SixLabors.ImageSharp.PixelFormats.Rgb24 SixLabors.ImageSharp]]
SixLabors.ImageSharp.Image1[[SixLabors.ImageSharp.PixelFormats.Rgb24 SixLabors.ImageSharp]].Accept SixLabors.ImageSharp.Advanced.AdvancedImageExtensions.AcceptVisitor SixLabors.ImageSharp.Image.Save SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware+d__21.MoveNext System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Threading.Tasks.VoidTaskResult System.Private.CoreLib][SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware+d__21 [SixLabors.ImageSharp.Web](http://sixlabors.imagesharp.web/)]].ExecutionContextCallback System.Threading.ExecutionContext.RunInternal System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Threading.Tasks.VoidTaskResult System.Private.CoreLib][SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware+d__21 [SixLabors.ImageSharp.Web](http://sixlabors.imagesharp.web/)]].MoveNext System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Threading.Tasks.VoidTaskResult System.Private.CoreLib][SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware+d__21 [SixLabors.ImageSharp.Web](http://sixlabors.imagesharp.web/)]].MoveNext System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction System.Threading.Tasks.Task.RunContinuations System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.__Canon System.Private.CoreLib]].SetExistingTaskResult
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.__Canon System.Private.CoreLib]].SetResult SixLabors.ImageSharp.Web.FormattedImage+d__16.MoveNext System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Web.FormattedImage+d__16 [SixLabors.ImageSharp.Web](http://sixlabors.imagesharp.web/)]].ExecutionContextCallback System.Threading.ExecutionContext.RunInternal System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Web.FormattedImage+d__16 [SixLabors.ImageSharp.Web](http://sixlabors.imagesharp.web/)]].MoveNext System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Web.FormattedImage+d__16 [SixLabors.ImageSharp.Web](http://sixlabors.imagesharp.web/)]].MoveNext System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction System.Threading.Tasks.Task.RunContinuations System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.__Canon System.Private.CoreLib]].SetExistingTaskResult
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.__Canon System.Private.CoreLib]].SetResult SixLabors.ImageSharp.Image+d__881[[System.__Canon System.Private.CoreLib]].MoveNext
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Image+d__881[[System.__Canon System.Private.CoreLib]] SixLabors.ImageSharp]].ExecutionContextCallback System.Threading.ExecutionContext.RunInternal System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Image+d__881[[System.__Canon System.Private.CoreLib]] SixLabors.ImageSharp]].MoveNext
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Image+d__881[[System.__Canon System.Private.CoreLib]] SixLabors.ImageSharp]].MoveNext System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction System.Threading.Tasks.Task.RunContinuations System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.__Canon System.Private.CoreLib]].SetExistingTaskResult
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.__Canon System.Private.CoreLib]].SetResult SixLabors.ImageSharp.Formats.ImageDecoder+d__3.MoveNext System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Formats.ImageDecoder+d__3 SixLabors.ImageSharp]].ExecutionContextCallback System.Threading.ExecutionContext.RunInternal System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Formats.ImageDecoder+d__3 SixLabors.ImageSharp]].MoveNext System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Formats.ImageDecoder+d__3 SixLabors.ImageSharp]].MoveNext System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction System.Threading.Tasks.Task.RunContinuations System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.__Canon System.Private.CoreLib]].SetExistingTaskResult
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.__Canon System.Private.CoreLib]].SetResult SixLabors.ImageSharp.Formats.ImageDecoder+d__131[[System.__Canon System.Private.CoreLib]].MoveNext
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Formats.ImageDecoder+d__131[[System.__Canon System.Private.CoreLib]] SixLabors.ImageSharp]].ExecutionContextCallback System.Threading.ExecutionContext.RunInternal System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Formats.ImageDecoder+d__131[[System.__Canon System.Private.CoreLib]] SixLabors.ImageSharp]].MoveNext
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon System.Private.CoreLib][SixLabors.ImageSharp.Formats.ImageDecoder+d__131[[System.__Canon System.Private.CoreLib]] SixLabors.ImageSharp]].MoveNext System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction System.Threading.Tasks.Task.RunContinuations System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.Threading.Tasks.VoidTaskResult System.Private.CoreLib]].SetExistingTaskResult
System.IO.Stream+<g__Core
27_0>d.MoveNext
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Threading.Tasks.VoidTaskResult System.Private.CoreLib][System.IO.Stream+<g__Core
27_0>d System.Private.CoreLib]].ExecutionContextCallback
To learn more about this exception, use the Kudu console to view the log file in d:\home\logfiles\crashdumps, which contains up to 10 log files for your app if space is available.
We recommend that you fix your app code to prevent the System.ExecutionEngineException from occurring again. If you need more information to identify the cause of the crash, enable crash monitoring for your app.
Visit the Azure portal to get troubleshooting recommendations for your app.`
Steps to Reproduce
Images
No response
Activity