-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Decommit memory before returning to the region_allocator #80640
Conversation
Tagging subscribers to this area: @dotnet/gc Issue DetailsThis reverts commit 6da8e2a.
|
6aa1271
to
7ecdb3a
Compare
Is there any way to add tests for this? So that we don't regress in this area again. It took a bit of time just to diagnose this issue in ASP.NET's CI. |
Looks like this was a "revert PR" that was later changed to a fix. I would have preferred the previous PR to be merged as-is to unblock the aspnet CI and the benchmarks while the fix is being worked on. |
@cshung or @jkotas can you merge this pr to unblock dotnet/aspnetcore#46055. aspnetcore is blocking sdk and installer |
I won't merge this without a sign-off from @Maoni0 or somebody else from the GC team. I can merge revert of the PR that introduced the break. I agree with @sebastienros that it should have been the first course of action: #80723 |
Done. |
I was waiting on Andrew to address the incorrect comment. I see that @jkotas already reverted the PR. thanks Jan. |
132dd70
to
d4de5a4
Compare
d4de5a4
to
3a1f409
Compare
3a1f409
to
9f50acf
Compare
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/4027922454 |
@cshung backporting to release/7.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Decommit memory as needed (#79912)
Using index info to reconstruct a base tree...
M src/coreclr/gc/gc.cpp
M src/coreclr/gc/gcpriv.h
Falling back to patching base and 3-way merge...
Auto-merging src/coreclr/gc/gcpriv.h
Auto-merging src/coreclr/gc/gc.cpp
CONFLICT (content): Merge conflict in src/coreclr/gc/gc.cpp
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Decommit memory as needed (#79912)
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@cshung an error occurred while backporting to release/7.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
Was there no way to write tests for the regression? |
There is no easy way to accomplish that regression testing within the runtime CI, but we have established new processes to make sure GC PRs are validated against the ASP.NET Benchmarks for functional and perf validation. @mrsharm is building automation around that, and this PR is tested using it. |
When we
decommit_region
, we wanted to also de-commit the associated mark array. The methoddecommit_mark_array_by_seg
requires agc_heap
instance, so I just used the one stored on the region.For regions that were returned to the free list earlier, their heaps were reset to
null
, so we will be usingnull
to de-commit the mark array, and that will fail.Instead of figuring out what heap it was. It is easier to recognize that in the case of
USE_REGIONS
, themark_array
is always the same across all heaps, and the partially committed mark array case just won't happen withUSE_REGIONS
. Therefore, we can simply pick an arbitrary heap and use it to de-commit the mark array.