-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix VS4Mac crash report and core dump generation perf problems #60319
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
Conversation
This is a VS4Mac show stopper. The performance (4 min or so) of taking a core dump when VS4Mac crashes or hangs is unacceptable. Backport of dotnet#60205 Refactor the DAC enumerate memory region phase out of gather crash info This is so the crash report json is written and available before the core dump which for VS4Mac currently takes 4 minutes. Since on both Linux and MacOS all the RW regions have been already added by createdump itself for heap dumps, then the sometimes slow (4 minutes for VS4Mac) heap enum memory region is changed to the faster normal one. It adds necessary DAC globals, etc. without the costly assembly, module, class, type runtime data structure enumeration. This fast heap dumps is opt'ed in with COMPlus_DbgEnableFastHeapDumps=1 env var to mitigate the risk of something missing from these dumps. Tested creating a crash report/core dump against VS4Mac process. Ran all the SOS tests on MacOS and Linux against this change. Low since there is an opt-in env var that enables the most risk part.
|
Tagging subscribers to this area: @tommcdon Issue DetailsCustomer ImpactThis is a VS4Mac show stopper. The performance (4 min or so) of taking a core dump when VS4Mac crashes or hangs is unacceptable. DetailsBackport of #60205 Refactor the DAC enumerate memory region phase out of gather crash info This is so the crash report json is written and available before the core dump which for VS4Mac currently takes 4 minutes. Since on both Linux and MacOS all the RW regions have been already added by createdump itself for heap dumps, then the sometimes slow (4 minutes for VS4Mac) heap enum memory region is changed to the faster normal one. It adds necessary DAC globals, etc. without the costly assembly, module, class, type runtime data structure enumeration. This fast heap dumps is opt'ed in with COMPlus_DbgEnableFastHeapDumps=1 env var to mitigate the risk of something missing from these dumps. TestingTested creating a crash report/core dump against VS4Mac process. Ran all the SOS tests on MacOS and Linux against this change. RiskLow since there is an opt-in env var that enables the most risk part.
|
jeffschwMSFT
left a comment
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.
Approved. Please get a few code reviews and then we can take for consideration in .NET 6. Given we are really close to GA, please get a few more code reviewers.
|
I was able to test this with vsmac by, in addition to signing, disabling SIP debug restrictions. The dump was created within, maybe, 10seconds and our crash reporter found the files and processed them. @kdubau and I quickly looked at the dumps and they appear to be what we expect. We believe we can sign off on this for vsmac. |
Customer Impact
This is a VS4Mac show stopper. The performance (4 min or so) of taking a core dump when VS4Mac crashes or hangs is unacceptable.
Details
Backport of #60205
Move createdump's DAC enumerate memory region phase after the crash report json file generation is finished. This is so the crash report json is written and available before the core dump which VS4Mac has requested.
Since on both Linux and MacOS all the RW regions have been already added by createdump itself for heap dumps, then the sometimes slow (4 minutes for VS4Mac) heap enum memory region is changed to the faster normal one. It adds necessary DAC globals, etc. without the costly assembly, module, class, type runtime data structure enumeration.
This fast heap dumps is opt'ed in with COMPlus_DbgEnableFastHeapDumps=1 env var to mitigate the risk of something missing from these dumps. With this flag, dump generation is in the seconds now. VS4Mac will set this env var.
Testing
Tested creating a crash report/core dump against VS4Mac process manually. Ran all the SOS tests on MacOS and Linux against this change. The VS4Mac team has signed off on this change.
Risk
Low since there is an opt-in env var that enables the most risk part.