Skip to content

Make special_sweep_p a per heap member #74625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

cshung
Copy link
Contributor

@cshung cshung commented Aug 26, 2022

In process_last_np_surv_region, we set the special_sweep_p flag when we don't have a region after next_region = heap_segment_next (alloc_region) is null together with some other conditions that is irrelevant here.

Later, in process_remaining_regions, we assert that heap_segment_next_rw (current_region) == 0. I assume that it is checking the same thing, which is okay.

But special_sweep_p is a PER_HEAP_ISOLATED member, which means if one heap has that condition, it will set the flag for other heaps. On the other heaps, it is possible that the corresponding next_region is not null, thus triggering the assert.

Changing the flag from PER_HEAP_ISOLATED to a PER_HEAP member solved the issue.

@cshung cshung self-assigned this Aug 26, 2022
@ghost
Copy link

ghost commented Aug 26, 2022

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

Issue Details

In process_last_np_surv_region, we set the special_sweep_p flag when we don't have a region after next_region = heap_segment_next (alloc_region) is null together with some other conditions that is irrelevant here.

Later, in process_remaining_regions, we assert that heap_segment_next_rw (current_region) == 0. I assume that it is checking the same thing, which is okay.

But special_sweep_p is a PER_HEAP_ISOLATED member, which means if one heap has that condition, it will set the flag for other heaps. On the other heaps, it is possible that the corresponding next_region is not null, thus triggering the assert.

Changing the flag from PER_HEAP_ISOLATED to a PER_HEAP member solved the issue.

Author: cshung
Assignees: cshung
Labels:

area-GC-coreclr

Milestone: -

@cshung cshung merged commit 8d03644 into dotnet:main Sep 7, 2022
@cshung cshung deleted the public/special-sweep-per-heap branch September 7, 2022 20:40
@cshung cshung mentioned this pull request Sep 30, 2022
cshung added a commit to cshung/runtime that referenced this pull request Oct 5, 2022
carlossanlop pushed a commit that referenced this pull request Oct 7, 2022
* Make special_sweep_p a per heap member (#74625)

* Low memory fixes

* Make sure the initial mark list size is capped (#76083)
@ghost ghost locked as resolved and limited conversation to collaborators Oct 8, 2022
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.

2 participants