dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.92k stars 4.64k forks source link

System.Tests.GCExtendedTests.GetAllocatedBytesForCurrentThread - Allocated too much #74388

Open danmoseley opened 2 years ago

danmoseley commented 2 years ago

Runfo in last 30 days as of 10/3

Original Report

❌ System.Tests.GCExtendedTests.GetAllocatedBytesForCurrentThread(size: 1000)

Allocated too much: start: 84649544 end: 84749920 size: 1000
Expected: True
Actual:   False
Stack Trace
   at System.Tests.GCExtendedTests.GetAllocatedBytesForCurrentThread(Int32 size) in /_/src/libraries/System.Runtime/tests/System/GCTests.cs:line 798
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs:line 64

Debian.10.Amd64.Open

Console log: 'System.Runtime.Tests' from job 8b265039-da4a-4577-9fe9-3ae7a32573d4 (ubuntu.1804.amd64.open.rt) using docker image mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-20220810215022-f344011 on a002IZM

https://dev.azure.com/dnceng/public/_build/results?buildId=1959322&view=ms.vss-test-web.build-test-results-tab&runId=50341050&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab&resultId=185272

dotnet-issue-labeler[bot] commented 2 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

ghost commented 2 years ago

Tagging subscribers to this area: @dotnet/gc See info in area-owners.md if you want to be subscribed.

Issue Details
❌ System.Tests.GCExtendedTests.GetAllocatedBytesForCurrentThread [[Console]](https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-74338-merge-8b265039da4a45779f/System.Runtime.Tests/1/console.5c513ad0.log?helixlogtype=result) [[Details]](https://dev.azure.com/dnceng//public/_build/results?buildId=1959322&view=ms.vss-test-web.build-test-results-tab&runId=50341050&resultId=185272&paneView=debug) [[Artifacts]](https://dev.azure.com/dnceng//public/_build/results?buildId=1959322&view=ms.vss-test-web.build-test-results-tab&runId=50341050&resultId=185272&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab) [[0.01% failure rate]](https://dev.azure.com/dnceng//public/_build/results?buildId=1959322&view=ms.vss-test- ❌ System.Tests.GCExtendedTests.GetAllocatedBytesForCurrentThread(size: 1000) ``` Allocated too much: start: 84649544 end: 84749920 size: 1000 Expected: True Actual: False Stack Trace at System.Tests.GCExtendedTests.GetAllocatedBytesForCurrentThread(Int32 size) in /_/src/libraries/System.Runtime/tests/System/GCTests.cs:line 798 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs:line 64 ``` Debian.10.Amd64.Open
Author: danmoseley
Assignees: -
Labels: `area-GC-coreclr`, `untriaged`
Milestone: -
mangod9 commented 2 years ago

this seems to be a new failure, would be good to determine if some recent change might have affected this.

danmoseley commented 2 years ago

There is some slop already in the text, so apparently it's not expected to be totally deterministic?

        Assert.True((end - start) < 5 * size, $"Allocated too much: start: {start} end: {end} size: {size}");

So it would allocate 1K, allow up to 5K but it was 10K

karelz commented 1 year ago

Happens on all platforms. Roughly 1x per week - see top post updated