-
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
Add env var to control createdump on MacOS #39982
Conversation
Tagging subscribers to this area: @tommcdon |
This “ELF coredumps on MacOS” feature is meant to be internal. I’m torn about adding how to enable it in the error message. Of course this is all open source so it not like we are hiding how to enable it.
|
Can someone approve of this PR? I think have addressed all the code review feedback. |
The COMPlus_DbgEnableElfDumpOnMacOS needs to be set to 1 along with all the other standard createdump env vars for dumps to be enabled on MacOS. This is because ELF coredumps are generated on MacOS and we want customers to be very explicit and aware of what the are getting. Change test harness to use the new env var
Aside @mikem8361 -- couple questions (not blocking this PR of course) In the vstest scenario, I assume vstest triggers dotnet dump collect? I'm a little unclear how that works given the process crashed - does it stay in a lingering state such that vstest can grab the dump? Assuming so, how will native dump collection will work in test runs on macOS? You mentioned that this dump is only useful for analyzing managed failures using dotnet dump and SOS. Should dotnet dump trigger both kinds of dump - or will the OS collect a native dump? cc @nohwnd |
For crash/unhandled exception triggered dump generation, vstest just sets the configuration environment variables before running the test (including this new one for MacOS) and the runtime exec's createdump to generate the coredump. The runtime waits until createdump is finished and then terminates like it would if the env vars weren't set. For this scenario, For hang/timeout triggered dump generation, vstest is more explicit and uses the Microsoft.Diagnostics.NETCore.Client write dump API (the same one that Yes, MacOS dumps generated by either of the above can only be analyzed by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mikem8361 thank you that is valuable clarification. |
Just checking my assumption -- with this PR also such dumps are now enabled for this mechanism as well (ie for hangs on macOS not just crashes)? It's just the triggering mechanism that's different, this scenario is now complete, is that right? |
vstest will have to set this env var before launching any tests for createdump to work on MacOS regardless of how it is triggered. FYI, @nohwnd |
Add env var to control createdump on MacOS The COMPlus_DbgEnableElfDumpOnMacOS needs to be set to 1 along with all the other standard createdump env vars for dumps to be enabled on MacOS. This is because ELF coredumps are generated on MacOS and we want customers to be very explicit and aware of what the are getting. Change test harness to use the new env var Createdump documentation update
@nohwnd I guess you're unblocked to add the env var now? I saw microsoft/vstest#2495 but it doesn't set it there. |
Add env var to control createdump on MacOS The COMPlus_DbgEnableElfDumpOnMacOS needs to be set to 1 along with all the other standard createdump env vars for dumps to be enabled on MacOS. This is because ELF coredumps are generated on MacOS and we want customers to be very explicit and aware of what the are getting. Change test harness to use the new env var Createdump documentation update
Add env var to control createdump on MacOS The COMPlus_DbgEnableElfDumpOnMacOS needs to be set to 1 along with all the other standard createdump env vars for dumps to be enabled on MacOS. This is because ELF coredumps are generated on MacOS and we want customers to be very explicit and aware of what the are getting. Change test harness to use the new env var Createdump documentation update
Missed these notifications, the env var is set correctly in vstest, and what Mike described above is how it is actually done. |
The COMPlus_DbgEnableElfDumpOnMacOS needs to be set to 1 along with all the other standard createdump env vars for dumps to be enabled on MacOS.
This is because ELF coredumps are generated on MacOS and we want customers to be very explicit and aware of what the are getting.
Change test harness to use the new env var