-
Notifications
You must be signed in to change notification settings - Fork 326
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
CollectDumpOnTestSessionHang doesn't save dump file to TestResults directory when Azure DevOps pipeline job was canceled due to the timeout #2608
Comments
I am unable to reproduce it locally on Windows. Here are the steps I followed.
I am not sure why the dump was not saved to the |
The The folder specified in ResultsDirectory had to exist, but always ended up empty. With the new changes in Blame, the normal %TEMP% is used instead. If you are interesting in saving the dumps into a specific location and not uploading them as attachments of the run then you can set VSTEST_DUMP_PATH to a directory that will be used to store the dump files. I also might be misreading your issue, is it happening only in some cases, when you cancel the build? There should be a lot of info in the diagnostic logs, https://github.com/microsoft/vstest-docs/blob/master/docs/diagnose.md could you provide them if the stuff above does not solve your issue? |
I found If
We want these dump files in the
Yes, that is correct. |
I thought that is done automatically, by setting the TEMP for the agent, at least it seemed to work that way when I tried it, but now I don't see it happen.
Yeah that slipped during review.
You can do that using the variable mentioned above.
I thought it handles cancelling correctly. But might re-visit it and fix it. If it does not happen it would be a bug. |
I even tried to mimic job timeout cancellation by manually cancelling the CI build while tests were running and after the dump was collected when a test timed out. I didn't see dump file published to
If |
A work-around for this issue to increase the CI job timeout so that that |
#2641 Added the fix to pickup the agent temp folder here. This fix will get also into 16.9 |
Thanks for the update. Looking at the PR, I think
Is there any update on the issue discussed above to ensure that collected dump will always be moved from |
@nohwnd What's the status of this issue? Is there anything else to do on our side? |
I've setup two dlls both waiting for significant time, and setup hang dump. Then I tried cancelling the execution request after the first dll was dumped, and also killing the process tree after the first dll was dumped. In both cases I've got the resulting dump in the test results folder. So to me this looks like it is working. |
Description
We NuGet.Client team are working on running tests in blame mode to collect dumps when tests hang on the CI pipeline.
Linux tests job on the CI pipeline is configured to timeout after
45 mins
. We publish build artifacts such asdump
,sequence.xml
andtest results.xml
fromTestResultsDirectory
for trouble shooting purposes only if job status is eitherfailed
orcanceled
for troubleshooting.Tests are executed in parallel. one of the PR builds yesterday, blame detector identified a hang, collected the dump, and test framework started executing other test assemblies. In the mean-time Azure DevOps pipeline cancelled this job due to
45 min
timeout. Unfortunately, onlysequence.xml
was uploaded to build artifacts but notdump
file. As per below logdump
of the hang was collected but not sure why the dump was not saved toTestResultsDirectory
. Hence it was not published to the artifacts (see image below).Here is the
.runsettings
file set to15 mins
test timeout to collect hang dump.Expected behavior
Dump that was collected due to test hang saved to the
TestResults
Directory so that next steps in the pipeline could have published it to artifacts for troubleshooting.Actual behavior
CollectDumpOnTestSessionHang
doesn't save dump file to TestResults directory when Azure DevOps pipeline job was canceled due to the timeoutEnvironment
.NET 5 Preview 7 SDK
DataCollector > CollectDumpOnTestSessionHang
in.runsettings
file.I appreciate any work around or additional guidance on this issue. Thanks.
The text was updated successfully, but these errors were encountered: