Skip to content

Investigate ways to make GC stress compatible with WaitForPendingFinalizers #101150

@VSadov

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions