Skip to content

Conversation

@cshung
Copy link
Contributor

@cshung cshung commented Sep 2, 2022

This PR fixes #74401 in the case that the virtual_commit for the mark array in init_table_for_region failed because of heap_hard_limit (or the implicit heap_hard_limit because we are running under a small container).

This does not fix the case where the commit for the mark array is failing because we are running out of physical memory, and there is no equivalent trick that we could use for that case.

@cshung cshung self-assigned this Sep 2, 2022
@ghost
Copy link

ghost commented Sep 2, 2022

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

Issue Details

This PR fixes #74401 in the case that the virtual_commit for the mark array in init_table_for_region failed because of heap_hard_limit (or the implicit heap_hard_limit because we are running under a small container).

This does not fix the case where the commit for the mark array is failing because we are running out of physical memory, and there is no equivalent trick that we could use for that case.

Author: cshung
Assignees: cshung
Labels:

area-GC-coreclr

Milestone: -

@cshung cshung force-pushed the public/restrict-region-commit branch 2 times, most recently from e4128fd to 0cc4bb1 Compare September 16, 2022 21:08
@cshung cshung force-pushed the public/restrict-region-commit branch from 0cc4bb1 to 80e1126 Compare September 21, 2022 23:02
@cshung cshung added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Sep 22, 2022
@cshung
Copy link
Contributor Author

cshung commented Sep 22, 2022

bool gc_heap::virtual_commit (void* address, size_t size, int bucket, int h_number, bool* hard_limit_exceeded_p)

describe the cases what does this mean


In reply to: 1255648685


Refers to: src/coreclr/gc/gc.cpp:6904 in 952fc5c. [](commit_id = 952fc5c, deletion_comment = False)

@cshung cshung force-pushed the public/restrict-region-commit branch from 80e1126 to 952fc5c Compare September 26, 2022 19:59
@cshung cshung changed the title Ensure regions never use more than 99% of the heap hard limit Ensure regions will always have enough memory for the bookkeeping Sep 26, 2022
@cshung cshung mentioned this pull request Sep 30, 2022
@cshung cshung closed this Oct 7, 2022
@cshung cshung deleted the public/restrict-region-commit branch October 7, 2022 00:51
@ghost ghost locked as resolved and limited conversation to collaborators Nov 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-GC-coreclr NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail to get_free_region in thread_final_regions due to low memory for mark array might lead to AV.

1 participant