Skip to content

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Nov 11, 2024

When marking cards for a non-array object or a an element vt in an object, it is enough to mark a card for any address within that object/vt because they are always fully scanned. Cardtable consistency checks are not accounting for this detail and it is difficult to have it implemented. Instead, when having such debug flags enabled, we use an explicit approach where every single card is being marked.

Copy link
Contributor

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

@srxqds
Copy link
Contributor

srxqds commented Nov 11, 2024

thank you for your great work.

can it merge to release/9.0 ?

}
}

// Marks more cards so that it works with remset consistency debug checks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so is this only enabled in debug builds ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort of, only if certain debug flags are passed at runtime via env vars this is used to mark cards when copying objects. It is a conservative approach. It might be useful to backport since there are active crashes there that are not actionable and this PR should at least fix the use of some GC debugging features that might help investigate.

When marking cards for a non-array object or a an element vt in an object, it is enough to mark a card for any address within that object/vt because they are always fully scanned. Cardtable consistency checks are not accounting for this detail and it is difficult to have it implemented. Instead, when having such debug flags enabled, we use an explicit approach where every single card is being marked.
@BrzVlad BrzVlad force-pushed the fix-sgen-remset-consistency branch from 3ac732f to f4d607f Compare November 27, 2024 18:52
@BrzVlad BrzVlad merged commit 3dd006a into dotnet:main Nov 28, 2024
68 of 70 checks passed
@BrzVlad
Copy link
Member Author

BrzVlad commented Nov 29, 2024

/backport to release/9.0

Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/12081645709

@BrzVlad
Copy link
Member Author

BrzVlad commented Nov 29, 2024

/backport to release/8.0

Copy link
Contributor

Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/12081650337

@srxqds
Copy link
Contributor

srxqds commented Nov 29, 2024

Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/12081645709

thank you @BrzVlad

@BrzVlad
Copy link
Member Author

BrzVlad commented Nov 29, 2024

/backport to release/9.0-staging

Copy link
Contributor

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/12084256458

@BrzVlad
Copy link
Member Author

BrzVlad commented Nov 29, 2024

/backport to release/8.0-staging

Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/12084270546

mikelle-rogers pushed a commit to mikelle-rogers/runtime that referenced this pull request Dec 10, 2024
…otnet#109698)

When marking cards for a non-array object or a an element vt in an object, it is enough to mark a card for any address within that object/vt because they are always fully scanned. Cardtable consistency checks are not accounting for this detail and it is difficult to have it implemented. Instead, when having such debug flags enabled, we use an explicit approach where every single card is being marked.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants