Skip to content
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

Windows x86 CoreCLR assert failure: ExecutionManager::IsManagedCode(GetControlPC(pCF->GetRegisterSet())) #60648

Closed
jkoritzinsky opened this issue Oct 19, 2021 · 4 comments
Labels
arch-x86 area-ExceptionHandling-coreclr os-windows untriaged New issue has not been triaged by the area owner

Comments

@jkoritzinsky
Copy link
Member

When running the DllImportGenerator.Tests test suite against CoreCLR x86 Checked builds, sometimes we get an assert failure when calling GC.Collect in an UnmanagedCallersOnly method that was called from managed code with some native code in between.

See https://dev.azure.com/dnceng/public/_build/results?buildId=1429326&view=ms.vss-test-web.build-test-results-tab&runId=41318808&resultId=188820&paneView=debug for a repro in a rolling build.

This took about 40-50 runs locally to reproduce, so it's a rare occurrence.

After some basic investigation, it looks like the CrawlFrame instance has a null ControlPC, so something is not being constructed/discovered correctly with it.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Oct 19, 2021
@jkoritzinsky
Copy link
Member Author

@janvorli
Copy link
Member

I am looking into it.

@janvorli
Copy link
Member

It looks like yet another place that needs to be touched to support stack walking when calling managed method marked as native callable only from another managed function without intermediate native frames. Similar to what I've fixed in #58796 some time ago.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Nov 1, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 17, 2022
@jkotas
Copy link
Member

jkotas commented Jan 17, 2022

Fixed by #63826

@jkotas jkotas closed this as completed Jan 17, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Feb 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x86 area-ExceptionHandling-coreclr os-windows untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants