Skip to content

Conversation

@janvorli
Copy link
Member

When the new stub heaps were implemented, the chunk size needed to be limited so that all precodes for a chunk fit into a single memory page. That was done in MethodDescChunk::CreateChunk. But it was discovered now that there is another place where it needs to be limited, the MethodTableBuilder::AllocAndInitMethodDescChunk. The JIT\opt\ObjectStackAllocation\ObjectStackAllocationTests started to fail in the outerloop due to too long chunk. The failure happens in crossgen2 as it is using a separate build of runtime in release and only that uncovers the problem. And only when DOTNET_TieredCompilation=0 and DOTNET_ProfApi_RejitOnAttach=0.

This change fixes the problem. With this change applied to the dotnet runtime version used by the crossgen2 and patching it in place in the .dotnet/shared/.... directory, the issue doesn't occur.

Close #81103

When the new stub heaps were implemented, the chunk size needed to be
limited so that all precodes for a chunk fit into a single memory page.
That was done in `MethodDescChunk::CreateChunk`. But it was discovered
now that there is another place where it needs to be limited, the
`MethodTableBuilder::AllocAndInitMethodDescChunk`. The
JIT\opt\ObjectStackAllocation\ObjectStackAllocationTests started to fail
in the outerloop due to too long chunk. The failure happens in crossgen2
as it is using a separate build of runtime in release and only that
uncovers the problem. And only when DOTNET_TieredCompilation=0 and
DOTNET_ProfApi_RejitOnAttach=0.

This change fixes the problem. With this change applied to the dotnet
runtime version used by the crossgen2 and patching it in place in the
.dotnet/shared/.... directory, the issue doesn't occur.

Close dotnet#81103
@janvorli janvorli added this to the 8.0.0 milestone Jan 25, 2023
@janvorli janvorli requested a review from jkotas January 25, 2023 22:36
@janvorli janvorli self-assigned this Jan 25, 2023
@janvorli
Copy link
Member Author

janvorli commented Feb 3, 2023

/backport to release/7.0

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2023

Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/4086957362

@ghost ghost locked as resolved and limited conversation to collaborators Mar 5, 2023
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.

Test failure JIT\\opt\\ObjectStackAllocation\\ObjectStackAllocationTests\\ObjectStackAllocationTests.cmd

2 participants