Skip to content

Investigate ways to make GC stress compatible with WaitForPendingFinalizers #101150

Closed

Description

@VSadov

See a comment in #97334 (comment)
and discussion in: #100576

Currently it is way too easy to write a pattern that uses self-rearming finalizable object that would turn into never ending finalization queue under GC stress. Some such cases may be present in the runtime/libraries already.

As a result it is easy for a test that calls WaitForPendingFinalizers to hang under GC stress.
This applies not only to tests and GC test legs, but also to 3-rd party use of GC stress to validate their apps.

It would be nice to make GC stress tolerant to such scenarios. One proposed way is to disable GC stress for the duration of WaitForPendingFinalizers calls. (perhaps with a counter, for concurrent cases)

Activity

  1. added
    untriaged
    on Apr 17, 2024
  2. dotnet-policy-service commented on Apr 17, 2024

    @dotnet-policy-service
    Contributor

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

  3. dotnet-policy-service commented on Apr 17, 2024

    @dotnet-policy-service
    Contributor

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

  4. removed
    untriaged
    on May 2, 2024
  5. added this to the Future milestone on May 2, 2024
  6. locked and limited conversation to collaborators on Aug 2, 2024
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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions