-
Notifications
You must be signed in to change notification settings - Fork 323
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
Fix hangdump running into crashdump #4378
Fix hangdump running into crashdump #4378
Conversation
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.
Nitpick: I saw you fixed some messages to use procdump
instead of proc dump
. We are mixing procdump
and ProcDump
, could we use only one or the other (I would favoir latter).
I see quite some code added but no unit test code added. Would it make sense to have some more added? Thinking mainly about ProcDumpDumper.cs
and DetachFromTargetProcess
.
src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs
Outdated
Show resolved
Hide resolved
EqtTrace.Info($"ProcDumpDumper.OutputReceivedCallback: Output received from procdump process contains 'complete' dump is finished, you can cancel procdump if you need."); | ||
_isCrashDumpInProgress = false; | ||
// Do not reset _crashDumpDetected back to false here. Any detected crash dumping should keep it true, so we don't throw away the dump. | ||
_crashDumpTimestamps.Add(DateTime.Now); |
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.
Same 2 remarks (UtcNow
+ IClock
) here.
src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs
Show resolved
Hide resolved
src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs
Show resolved
Hide resolved
src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs
Show resolved
Hide resolved
src/Microsoft.TestPlatform.Extensions.BlameDataCollector/PublicAPI/PublicAPI.Shipped.txt
Outdated
Show resolved
Hide resolved
…Collector.cs Co-authored-by: Jakub Jareš <me@jakubjares.com>
Switching back to draft, I will roll back some of this, I can't reliably differentiate between creating a dump on crash and on exit, and it outputs crash dumps when there is no crash which is undesirable, and would make users wonder what crashed where. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Jakub Jareš <me@jakubjares.com> Co-authored-by: Amaury Levé <amaury.leve@gmail.com>
Co-authored-by: David Mueller IWS <david.iws.mueller@getinge.com> Co-authored-by: Jakub Jareš <me@jakubjares.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Amaury Levé <amaury.leve@gmail.com> Co-authored-by: Jakub Chocholowicz <jachocho@microsoft.com> Co-authored-by: Amaury Levé <amauryleve@microsoft.com> Co-authored-by: David Müller <muellerdavid4@gmail.com> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Alex Hsu <csigs@users.noreply.github.com> Co-authored-by: dotnet bot <dotnet-bot@dotnetfoundation.org> Co-authored-by: Nikola Milosavljevic <nikolam@microsoft.com> Co-authored-by: Larry Ewing <lewing@microsoft.com> Co-authored-by: Marco Rossignoli <marco.rossignoli@gmail.com> Co-authored-by: Matt Mitchell <mmitche@microsoft.com> Co-authored-by: Michael Simons <msimons@microsoft.com> Co-authored-by: Jakub Chocholowicz <59966772+jakubch1@users.noreply.github.com> Co-authored-by: Matt Thalman <mthalman@microsoft.com> Co-authored-by: fhnaseer <fhnaseer@live.com> Co-authored-by: Simon Cropp <simon.cropp@gmail.com> Co-authored-by: Codrin Poienaru <copoiena@microsoft.com> Fix Newtonsoft versions in testhost.deps.json (#4367) Fix structure of the eng/Localize folder (#4384) Fix build (#4399) Fix hangdump running into crashdump (#4378) Fix playground (#4420) Fix VSIX inserted into VS (#4443) Fix some nullability warnings in tests (#4452) fix: TestObject use ConcurrentDictionary instead of Dictionary (#4450) Fix version of CppUnitTestFramework dlls (#4457) Fix no-suitable provider found (#4475) Fix arm64 build (#4485) Fix version of Microsoft.VisualStudio.Interop.dll (#4496) Fix execution gets stucks on single netstandard source (#4497) Fix broken source build path (#4505) fixes (#4533)
* Replacing calls to BuildMultipleAssemblyPath when passing only one source in acceptance tests (#4358) * issue 3510 replacing calls to BuildMultipleAssemblyPath by GetASsetFullPath when passing only one source * Add quotes --------- Co-authored-by: David Mueller IWS <david.iws.mueller@getinge.com> Co-authored-by: Jakub Jareš <me@jakubjares.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230404.2 (#4363) Microsoft.Internal.CodeCoverage From Version 17.7.0-beta.23181.4 -> To Version 17.7.0-beta.23204.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Don't push logs from Publish, we have none. (#4364) * Don't push logs from Publish, we have none. * Fix publish warning * Name is string * underscores * New file * no s * Juno: check in to lego/hb_ad8466e4-8d65-4d1a-832b-2c88012fccb5_20230402091745387. (#4359) * [main] Fix Newtonsoft versions in testhost.deps.json (#4367) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230406.2 (#4377) Microsoft.Internal.CodeCoverage From Version 17.7.0-beta.23204.2 -> To Version 17.7.1-beta.23206.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Localized file check-in by OneLocBuild Task: Build definition ID 1222: Build ID 2154913 (#4373) * Remove irrelevant comment (#4375) * LEGO: Pull request from lego/hb_ad8466e4-8d65-4d1a-832b-2c88012fccb5_20230409095521500 to main (#4381) * LEGO: Pull request from lego/hb_ad8466e4-8d65-4d1a-832b-2c88012fccb5_20230408100207142 to main (#4380) * Remove root Localize folder (#4383) * Fix structure of the eng/Localize folder (#4384) * Localized file check-in by OneLocBuild Task: Build definition ID 1222: Build ID 2155140 (#4385) * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4386) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Exclude old branches from new pipeline trigger (#4388)Co-authored-by: Jakub Jareš <me@jakubjares.com> Co-authored-by: Jakub Jareš <me@jakubjares.com> * Update diagnostics dependency to pick up changes for source-build (#4390) * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4389) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Check for null Path (#4391) * Allows to produce RTM version (#4400) * Fix build (#4399) * Cleanup tests (#4406) * Remove explicit framework ref assembly ref (#4407) The SDK brings this implicitly when targeting a net4* TFM * Fix hangdump running into crashdump (#4378) Co-authored-by: Jakub Jareš <me@jakubjares.com> Co-authored-by: Amaury Levé <amaury.leve@gmail.com> * Add IsVisualStudioBuildPackage to vsix package (#4413) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230421.2 (#4415) Microsoft.Internal.CodeCoverage From Version 17.7.1-beta.23213.1 -> To Version 17.7.1-beta.23221.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * LEGO: Pull request from lego/hb_ad8466e4-8d65-4d1a-832b-2c88012fccb5_20230420091921308 to main (#4408) * Addressing System.Private.Uri source-build prebuilt in testhost (#4414) * [main] Update dependencies from dotnet/arcade (#4401) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * LEGO: Pull request from lego/hb_ad8466e4-8d65-4d1a-832b-2c88012fccb5_20230425091657319 to main (#4416) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230425.2 (#4417) Microsoft.Internal.CodeCoverage From Version 17.7.1-beta.23221.2 -> To Version 17.7.1-beta.23225.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Fix playground (#4420) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230425.3 (#4421) Microsoft.Internal.CodeCoverage From Version 17.7.1-beta.23225.2 -> To Version 17.7.1-beta.23225.3 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Remove IO from source build (#4426) Co-authored-by: Jakub Chocholowicz <jachocho@microsoft.com> * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4423) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Remove unused variable (#4425) * Remove Localize and eng/Localize folders (#4427) * [main] Update dependencies from dotnet/arcade (#4428) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Localized file check-in by OneLocBuild Task: Build definition ID 1222: Build ID 2171304 (#4429) * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4430) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update VSIX package ID (#4431) * Pass GenerateSbom option during CI build * Update Microsoft.CodeCoverage.IO version (#4433) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230503.1 Microsoft.Internal.CodeCoverage From Version 17.7.1-beta.23252.1 -> To Version 17.7.1-beta.23253.1 * updating cc version, --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Add restore script before build for sbom generation * Enable source-build pre-built detection (#4419) * Add missing RestoreInternal.cmd file * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230504.4 (#4436) Microsoft.Internal.CodeCoverage From Version 17.7.1-beta.23253.1 -> To Version 17.7.1-beta.23254.4 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Add slash at the end of packages path * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230505.6 (#4441) Microsoft.Internal.CodeCoverage From Version 17.7.1-beta.23254.4 -> To Version 17.7.1-beta.23255.6 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Deprecate serialization ctor for .NET8 onward (#4440) * Fix VSIX inserted into VS (#4443) * Enable ngen of testhost*.exe in VSIX (#4444) Co-authored-by: Jakub Jareš <me@jakubjares.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230510.3 (#4445) Microsoft.Internal.CodeCoverage From Version 17.7.1-beta.23255.6 -> To Version 17.7.1-beta.23260.3 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230511.2 (#4447) Microsoft.Internal.CodeCoverage From Version 17.7.1-beta.23260.3 -> To Version 17.7.1-beta.23261.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230512.3 (#4448) Microsoft.Internal.CodeCoverage From Version 17.7.1-beta.23261.2 -> To Version 17.7.1-beta.23262.3 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * [main] Update dependencies from dotnet/source-build-reference-packages (#4453) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Fix some nullability warnings in tests (#4452) * [main] Update dependencies from dotnet/arcade (#4442) * Bump FluentAssertions version (#4455) * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4451) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * [main] Update dependencies from dotnet/source-build-externals (#4454) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * fix: TestObject use ConcurrentDictionary instead of Dictionary (#4450) * Update releases.md (#4459) * Fix version of CppUnitTestFramework dlls (#4457) * Localized file check-in by OneLocBuild Task: Build definition ID 1222: Build ID 2181505 (#4460) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230516.2 (#4458) Microsoft.Internal.CodeCoverage From Version 17.7.1-beta.23265.3 -> To Version 17.7.1 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * [main] Update dependencies from dotnet/source-build-reference-packages (#4465) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4464) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Drop usage of Microsoft.Internal.TestPlatform.Remote (#4456) * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4466) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230519.1 (#4468) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23268.3 -> To Version 17.7.2-beta.23269.1 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4471) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * [main] Update dependencies from dotnet/source-build-reference-packages (#4472) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * [main] Update dependencies from dotnet/source-build-externals (#4473) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Fix no-suitable provider found (#4475) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230524.2 (#4478) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23272.2 -> To Version 17.7.2-beta.23274.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230524.7 (#4484) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23274.2 -> To Version 17.7.2-beta.23274.7 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Fix arm64 build (#4485) * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage + Update VS Externals (#4487) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230525.4 Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23274.7 -> To Version 17.7.2-beta.23275.4 * Upgrade VS externals --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Jakub Chocholowicz <jachocho@microsoft.com> * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4488) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Pass workloads to proxy managers (#4422) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230526.2 (#4489) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23276.1 -> To Version 17.7.2-beta.23276.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * [main] Update dependencies from dotnet/source-build-reference-packages (#4494) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Don't print socket transport error in console (#4493) * [main] Update dependencies from dotnet/source-build-externals (#4495) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Fix version of Microsoft.VisualStudio.Interop.dll (#4496) * Fix execution gets stucks on single netstandard source (#4497) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230530.1 (#4498) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23279.1 -> To Version 17.7.2-beta.23280.1 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update Microsoft.Extensions.DependencyModel (#4486) * [main] Update dependencies from dotnet/source-build-reference-packages (#4502) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update source-build prebuilt baseline (#4503) * Deprecate releases.md (#4504) * Fix broken source build path (#4505) * Update CODEOWNERS (#4506) * Remove source build CODEOWNER (#4507) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230531.2 (#4501) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23280.1 -> To Version 17.7.2-beta.23281.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230602.1 (#4508) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23301.3 -> To Version 17.7.2-beta.23302.1 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230605.1 (#4513) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23302.1 -> To Version 17.7.2-beta.23305.1 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * remove redundant [NotNull] (#4518) * use some NotNullWhen on TryGets (#4520) * [main] Update dependencies from dotnet/source-build-externals (#4515) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * directoryPath can be null (#4525) * [main] Update dependencies from dotnet/source-build-reference-packages (#4514) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Spelling (#4526) * remove some un-used members (#4521) * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4530) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * remove redundant GetTypeInfo (#4519) Co-authored-by: Amaury Levé <amauryleve@microsoft.com> * remove some redundant assignments (#4522) * Declare version.details.xml dependency for source-build (#4532) * join some declarations (#4529) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230607.1 (#4535) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23305.3 -> To Version 17.7.2-beta.23307.1 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Backport 17.6.2 fixes (#4533) Co-authored-by: Amaury Levé <amauryleve@microsoft.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230608.2 (#4537) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23307.1 -> To Version 17.7.2-beta.23308.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230608.3 (#4538) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23308.2 -> To Version 17.7.2-beta.23308.3 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230612.2 (#4539) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23308.3 -> To Version 17.7.2-beta.23312.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Added release notes for v17.7.0-preview.23280.1 (#4543) * Use SemVer1 (#4545) Co-authored-by: Amaury Levé <amaury.leve@gmail.com> * [main] Update dependencies from dotnet/source-build-reference-packages (#4541) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update releases.md (#4546) * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230612.4 (#4547) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23312.2 -> To Version 17.7.2-beta.23312.4 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230614.2 (#4548) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23312.4 -> To Version 17.7.2-beta.23314.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Onboarding to GitOps.ResourceManagement (#4551) Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> * Update dependencies from https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage build 20230615.3 (#4552) Microsoft.Internal.CodeCoverage From Version 17.7.2-beta.23314.2 -> To Version 17.7.3-beta.23315.3 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Disable pre-start of testhosts (#4554) (#4556) * [main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4557) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> --------- Co-authored-by: David Müller <muellerdavid4@gmail.com> Co-authored-by: David Mueller IWS <david.iws.mueller@getinge.com> Co-authored-by: Jakub Jareš <me@jakubjares.com> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Alex Hsu <csigs@users.noreply.github.com> Co-authored-by: dotnet bot <dotnet-bot@dotnetfoundation.org> Co-authored-by: Amaury Levé <amauryleve@microsoft.com> Co-authored-by: Nikola Milosavljevic <nikolam@microsoft.com> Co-authored-by: Larry Ewing <lewing@microsoft.com> Co-authored-by: Marco Rossignoli <marco.rossignoli@gmail.com> Co-authored-by: Matt Mitchell <mmitche@microsoft.com> Co-authored-by: Amaury Levé <amaury.leve@gmail.com> Co-authored-by: Michael Simons <msimons@microsoft.com> Co-authored-by: Jakub Chocholowicz <59966772+jakubch1@users.noreply.github.com> Co-authored-by: Jakub Chocholowicz <jachocho@microsoft.com> Co-authored-by: Matt Thalman <mthalman@microsoft.com> Co-authored-by: fhnaseer <fhnaseer@live.com> Co-authored-by: Simon Cropp <simon.cropp@gmail.com> Co-authored-by: Codrin Poienaru <copoiena@microsoft.com> Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
Description
This fixes issue that happens when both hang and crash dumps are enabled, which can be common in CI. The issue results in no crash or hang dump being created.
When process crashes and procdump starts crashdumping it takes it some time to write all the memory to disk. During that time it is possible that hangdump timer will reach the threshold and initiate hang dump. This will try to cancel procdump, and before this fix we simply sent Ctlr+C to procdump, and immediately went to kill it. Killing attached procdump almost always results in testhost (to which it is attached) crashing with it. This will kill testhost, and you will have no crashdump, nor hangdump.
To solve this, we look at the output that procdump streams to us and try to detect if it is currently dumping a process, and wait for that to finish. When it finishes dumping, or after a given timeout (90 seconds, or "VSTEST_CONNECTION_TIMEOUT"), we cancel and if needed kill procdump.
Then we progress to hang dumping the process. This is needed because procdump is configurable by environment variables, and it is possible to set dumpcount that is higher than 1, so it is totally possible to create 7 crashdumps, and continue running, and then reach a place where we hang.
Additionally we also write errors from procdump into log.
Testing this in automated tests is quite fragile, so I did not add any tests. But reproducing it locally is quite easy by making crash.dll allocate a bunch of memory (10GB roughly), which makes it write the dump for 10 seconds on my computer, and then fine tune the hang dump timeout to 5-20 seconds to the process has enough time to crash, but not finish crash dumping.
Modified this test to also create hang dumps after 10 seconds:
Allocate some random strings into an array to put stuff in memory:
Output in diag logs, where crashdump is orange and initiates the dump, and hangdump is red, and waits for it to finish:
I also tried it when the hangdump is too fast (e.g. 3s), and it simply collects just hangdump, or when it is too slow (e.g. 100s), and then it collects just crashdump.
Fix #4351