Skip to content

GCExtendedTests.GetTotalAllocatedBytes failed on Mono on Ubuntu in CI #2280

Closed
mono/mono
#20427

Description

@stephentoub

https://dev.azure.com/dnceng/public/_build/results?buildId=494262&view=ms.vss-test-web.build-test-results-tab&runId=15733104&resultId=166198&paneView=debug

    System.Tests.GCExtendedTests.GetTotalAllocatedBytes [FAIL]
      System.Exception : Expected more memory to be allocated. previous = 3806405736, precise = 3789497944, difference = 16907792
      Stack Trace:
           at System.Tests.GCExtendedTests.<GetTotalAllocatedBytes>g__CallGetTotalAllocatedBytesAndCheck|23_0(Int64 previous, Int64& differenceBetweenPreciseAndImprecise)
           at System.Tests.GCExtendedTests.<GetTotalAllocatedBytes>g__CallGetTotalAllocatedBytes|23_1(Int64 previous, <>c__DisplayClass23_0& )
           at System.Tests.GCExtendedTests.GetTotalAllocatedBytes()
           at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

cc: @akoeplinger

Activity

  1. added
    untriaged
    on Jan 28, 2020
  2. akoeplinger commented on Jan 28, 2020

    @akoeplinger
    Member

    @BrzVlad can you please take a look at whether this test makes sense on Mono's sgen?

    public static void GetTotalAllocatedBytes()

  3. BrzVlad commented on Jan 28, 2020

    @BrzVlad
    Member

    We added this API just recently. It's not clear why it fails this way, it should work. @naricc can you take a look ?

  4. naricc commented on Jan 28, 2020

    @naricc
    Contributor

    Yes, I am looking into it. First thought; is this just failing because mono and the dotnet-core runtime use diffirent object layouts and thus allocate different amounts of memory? The difference is like .4 %

  5. BrzVlad commented on Jan 28, 2020

    @BrzVlad
    Member

    This has nothing to do with coreclr. According to the failure, this counter is not monotonic on mono.

  6. naricc commented on Jan 28, 2020

    @naricc
    Contributor

    Ah, I see.... We only ever add to the counter, so maybe it is a synchronization error where two threads are clobbering the value. Except the test itself looks single threaded?

    Any way, looking into it.

  7. BrzVlad commented on Jan 28, 2020

    @BrzVlad
    Member

    Also the test expects the precise value to be lower than the imprecise value, for whatever reason. I'm not sure we guarantee this, or if we do, we do it by accident. Maybe also double check there if we can have same behavior.

  8. naricc commented on Jan 28, 2020

    @naricc
    Contributor

    So I am a bit confused due to the repo move and all; how do I actually run this test locally?

  9. akoeplinger commented on Jan 28, 2020

    @akoeplinger
    Member

    You can follow https://github.com/dotnet/runtime/blob/master/docs/workflow/testing/mono/testing.md and then run the tests in src/libraries/System.Runtime/tests

    Note that this is not a consistent failure but only happens occasionally.

  10. removed
    untriaged
    on Jan 29, 2020
  11. added this to the 5.0 milestone on Feb 25, 2020
  12. danmoseley commented on Feb 26, 2020

    @danmoseley
    Contributor

    Failed again in CI
    https://github.com/dotnet/runtime/pull/32288/checks?check_run_id=468133057

    { "HelixJobId": "a721cc95-8b86-4783-9b93-3331666ea4d1", "HelixWorkItemName": "System.Runtime.Tests" }
    
    
    Error message
    System.Exception : Expected more memory to be allocated. previous = 2928940008, precise = 2910475664, difference = 18464344
    
    
    Stack trace
       at System.Tests.GCExtendedTests.<GetTotalAllocatedBytes>g__CallGetTotalAllocatedBytesAndCheck|23_0(Int64 previous, Int64& differenceBetweenPreciseAndImprecise) in /_/src/libraries/System.Runtime/tests/System/GCTests.cs:line 875
       at System.Tests.GCExtendedTests.<GetTotalAllocatedBytes>g__CallGetTotalAllocatedBytes|23_1(Int64 previous, <>c__DisplayClass23_0& ) in /_/src/libraries/System.Runtime/tests/System/GCTests.cs:line 880
       at System.Tests.GCExtendedTests.GetTotalAllocatedBytes() in /_/src/libraries/System.Runtime/tests/System/GCTests.cs:line 891
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in /_/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs:line 339
    
  13. added
    blocking-clean-ci
    on Mar 1, 2020
  14. jkotas commented on Mar 1, 2020

    @jkotas
    Member

    Hit in #33028 on netcoreapp5.0-Linux-Debug-arm64-Mono_release. If you are not actively working on this, disable the test on Mono against this issue to keep the CI clean.

  15. naricc commented on Mar 2, 2020

    @naricc
    Contributor

    I will disable the test this afternoon, if I can't figure it out immediately.

  16. added
    disabled-test
    and removed
    blocking-clean-ci
    on Mar 6, 2020
  17. removed this from the 5.0 milestone on Jun 15, 2020
  18. added this to the 6.0.0 milestone on Jun 22, 2020
  19. naricc commented on Sep 24, 2020

    @naricc
    Contributor

    Resolve by this change: #42388

  20. ghost locked as resolved and limited conversation to collaborators on Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-GC-monodisabled-test

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions