You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen this pop up a few times intermittently during testing. I'm more than a little concerned that this means our AsyncKeyLock does not do what it should which is to prevent cache reads while writing.
I'm gonna need help here investigating. Tests explicitly use a single instance of the server and cache and it always works on my machine.
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:11.2043310] CanProcessAndResolveImage(url: "http://localhost/azure/SubFolder/imagesharp-logo.p"...) [FAIL]
X CanProcessAndResolveImage(url: "http://localhost/azure/SubFolder/imagesharp-logo.p"...) [577ms]
Error Message:
System.IO.IOException : The process cannot access the file 'D:\a\ImageSharp.Web\ImageSharp.Web\artifacts\bin\tests\ImageSharp.Web.Tests\Release\netcoreapp3.1\is-cache\b\2\d\5\5\2\9\b\f\e\c\d\b2d5529bfecd.png' because it is being used by another process.
Stack Trace:
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.IO.File.Create(String path)
at SixLabors.ImageSharp.Web.Caching.PhysicalFileSystemCache.SetAsync(String key, Stream stream, ImageCacheMetadata metadata) in /_/src/ImageSharp.Web/Caching/PhysicalFileSystemCache.cs:line 128
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.ProcessRequestAsync(HttpContext context, IImageResolver sourceImageResolver, ImageContext imageContext, IDictionary`2 commands) in /_/src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs:line 306
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.ProcessRequestAsync(HttpContext context, IImageResolver sourceImageResolver, ImageContext imageContext, IDictionary`2 commands) in /_/src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs:line 318
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context) in /_/src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs:line 215
at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
at SixLabors.ImageSharp.Web.Tests.Processing.PhysicalFileSystemCacheServerTests.CanProcessAndResolveImage(String url) in D:\a\ImageSharp.Web\ImageSharp.Web\tests\ImageSharp.Web.Tests\Processing\PhysicalFileSystemCacheServerTests.cs:line 70
--- End of stack trace from previous location where exception was thrown ---
The text was updated successfully, but these errors were encountered:
I've seen this pop up a few times intermittently during testing. I'm more than a little concerned that this means our
AsyncKeyLock
does not do what it should which is to prevent cache reads while writing.I'm gonna need help here investigating. Tests explicitly use a single instance of the server and cache and it always works on my machine.
cc/ @kroymann @sebastienros
The text was updated successfully, but these errors were encountered: