Skip to content

Fix ETW Profiler Attach Issue UUM-112001 #2180

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

Merged
merged 1 commit into from
Aug 5, 2025

Conversation

kkukshtel-unity
Copy link
Collaborator

@kkukshtel-unity kkukshtel-unity commented Aug 4, 2025

Backport of #2178

This code fixes the issue where an ETW profiler attach attempt had the ability to crash Unity due to an issue with accessing a domain from mono that was in the process of being unloaded.

The fix here is to add in a lock around domain enumeration to ensure that the domain is properly locked before taking action on it from the profiler's perspective.

https://jira.unity3d.com/browse/UUM-112001

  • Should this pull request have release notes?
    • Yes
    • No
  • Do these changes need to be back ported?
    • Yes
    • No
  • Do these changes need to be upstreamed to mono/mono or dotnet/runtime repositories?
    • Yes
    • No

Reviewers: please consider these questions as well! ❤️

Release notes

Fixed UUM-112001@kkukshtel-unity:
Mono: Fix bug where attaching a profiler could cause Unity to crash to desktop.

* add in locked version of mono_domain_foreach
* add in unity prefix to new mutex and commented intended use case
* name update
@kkukshtel-unity kkukshtel-unity merged commit 05e5263 into unity-6000.0-mbe Aug 5, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants