-
Notifications
You must be signed in to change notification settings - Fork 5k
Using IMetaDataEmit::DeleteToken causes the runtime to hang #114306
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
Comments
Hi @urisimchoni! Unfortunately, I suspect delete operations on metadata aren't supported under the profiler (or at least they've probably never been tested). Traditionally all the profiler metadata support was in service of editing existing IL code or writing new IL code so that profilers could do instrumentation. For those tasks tokens sometimes became unreferenced but it wasn't necessary to delete them. I think your options would be:
Sorry I don't have any quick fix for you on this one. Let us know if you want to pursue one of those options or you have any other questions around this. |
What's the stacktrace of the hang? |
Is there a way to get symbol info for dotnet binaries without building? The windbg stack is not very helpful
vfagent_net is the place where DeleteToken() is being called. |
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-symbol |
This issue has been marked |
I have a .Net profiler (using the native profiler interface). I'm able to instrument code and and use IMetaDataEmit interface to create tokens (e.g. TypeRefs and MemberRefs). However when I try to use DeleteToken() to delete an assembly-scoped custom attribute the program hangs. I tried this from various callbacks (module load finished, assembly load finished, JITStarted) - all resulting the same.
I find the custom attribute token by enumerating custom attribute, close the enumerator, and then try the DeleteToken(), and the runtime hangs.
This happens in all runtime versions I've checked. Probably I'm doing something wrong here, but before providing a full reproducer I'd like to know whether there are known limitations to DeleteToken() or maybe there are better approaches to deleting custom attributes at runtime.
Thanks,
Uri.
The text was updated successfully, but these errors were encountered: