Open
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
DEBUG
andRELEASE
mode - I have searched open and closed issues to ensure it has not already been reported
ImageSharp version
Other ImageSharp packages and versions
NA
Environment (Operating system, version and so on)
Ubuntu 2204 ARM64
.NET Framework version
.NET 6 & 7
Description
I think it's got something to do with memory pressure. The tests fail more often on .NET 7 but on random occasions on .NET 6 also.
[xUnit.net 00:00:11.02] AllocateMemoryGroup_Finalization_ReturnsToPool(length: 1200) [FAIL]
[xUnit.net 00:00:11.41] AllocateMemoryGroup_Finalization_ReturnsToPool(length: 600) [FAIL]
Failed AllocateMemoryGroup_Finalization_ReturnsToPool(length: 1200) [2 s]
Error Message:
Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Remote process failed with an unhandled exception.
Stack Trace:
Child exception:
Xunit.Sdk.EqualException: Assert.Equal() Failure
Expected: 42
Actual: [245](https://github.com/SixLabors/ImageSharp/actions/runs/4090560426/jobs/7054056163#step:15:246)
at SixLabors.ImageSharp.Tests.Memory.Allocators.UniformUnmanagedPoolMemoryAllocatorTests.AllocateGroupAndForget(UniformUnmanagedMemoryPoolMemoryAllocator allocator, Int32 length, Boolean check) in /home/runner/actions-runner/_work/ImageSharp/ImageSharp/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs:line 301
at SixLabors.ImageSharp.Tests.Memory.Allocators.UniformUnmanagedPoolMemoryAllocatorTests.<AllocateMemoryGroup_Finalization_ReturnsToPool>g__RunTest|12_0(String lengthStr) in /home/runner/actions-runner/_work/ImageSharp/ImageSharp/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs:line 285
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Child process:
SixLabors.ImageSharp.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13 SixLabors.ImageSharp.Tests.Memory.Allocators.UniformUnmanagedPoolMemoryAllocatorTests Void <AllocateMemoryGroup_Finalization_ReturnsToPool>g__RunTest|12_0(System.String)
Child arguments:
1200
Failed AllocateMemoryGroup_Finalization_ReturnsToPool(length: 600) [276 ms]
Error Message:
Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Remote process failed with an unhandled exception.
Stack Trace:
Child exception:
Xunit.Sdk.EqualException: Assert.Equal() Failure
Expected: 42
Actual: 188
at SixLabors.ImageSharp.Tests.Memory.Allocators.UniformUnmanagedPoolMemoryAllocatorTests.AllocateGroupAndForget(UniformUnmanagedMemoryPoolMemoryAllocator allocator, Int32 length, Boolean check) in /home/runner/actions-runner/_work/ImageSharp/ImageSharp/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs:line 301
at SixLabors.ImageSharp.Tests.Memory.Allocators.UniformUnmanagedPoolMemoryAllocatorTests.<AllocateMemoryGroup_Finalization_ReturnsToPool>g__RunTest|12_0(String lengthStr) in /home/runner/actions-runner/_work/ImageSharp/ImageSharp/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs:line 285
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Child process:
SixLabors.ImageSharp.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13 SixLabors.ImageSharp.Tests.Memory.Allocators.UniformUnmanagedPoolMemoryAllocatorTests Void <AllocateMemoryGroup_Finalization_ReturnsToPool>g__RunTest|12_0(System.String)
Child arguments:
600
[xUnit.net 00:00:11.99] AllocateSingleMemoryOwner_Finalization_ReturnsToPool(length: 600) [FAIL]
Failed AllocateSingleMemoryOwner_Finalization_ReturnsToPool(length: 600) [245 ms]
Error Message:
Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Remote process failed with an unhandled exception.
Stack Trace:
Child exception:
Xunit.Sdk.EqualException: Assert.Equal() Failure
Expected: 42
Actual: 182
at SixLabors.ImageSharp.Tests.Memory.Allocators.UniformUnmanagedPoolMemoryAllocatorTests.AllocateSingleAndForget(UniformUnmanagedMemoryPoolMemoryAllocator allocator, Int32 length, Boolean check) in /home/runner/actions-runner/_work/ImageSharp/ImageSharp/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs:line 365
at SixLabors.ImageSharp.Tests.Memory.Allocators.UniformUnmanagedPoolMemoryAllocatorTests.<AllocateSingleMemoryOwner_Finalization_ReturnsToPool>g__RunTest|14_0(String lengthStr) in /home/runner/actions-runner/_work/ImageSharp/ImageSharp/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs:line 347
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Child process:
SixLabors.ImageSharp.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13 SixLabors.ImageSharp.Tests.Memory.Allocators.UniformUnmanagedPoolMemoryAllocatorTests Void <AllocateSingleMemoryOwner_Finalization_ReturnsToPool>g__RunTest|14_0(System.String)
Child arguments:
600
This also affects.
AllocateSingleMemoryOwner_Finalization_ReturnsToPool
MultiplePoolInstances_TrimPeriodElapsed_AllAreTrimmed
.
Steps to Reproduce
Reproducible on CI runs added here. #2341
Images
No response