-
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
Test run hangs #10394
Comments
Hello, You can add <RunSettings>
<RunConfiguration>
<!-- ... -->
</RunConfiguration>
<LoggerRunSettings>
<Loggers>
<Logger friendlyName="blame" enabled="True" />
</Loggers>
</LoggerRunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="blame" enabled="True">
<Configuration>
<CollectDumpOnTestSessionHang TestTimeout="5min" HangDumpType="Full" />
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings> |
@nohwnd thank you. It was not obvious to me that the testhost was waiting for We used to have blame enabled but I found it was only capturing dumps for the main |
Blame should not capture dumps of vstest.console. vstest.console will start datacollector and testhost, and datacollector will observe testhost. If you are seeing crash dumps from vstest.console then you are either using a dumper that is not ours. Or some other solution, e.g. local dumps + custom data collector to attach them to test run. The test I've figured out by looking at the log and checking how many started and stopped tests there are and then doing some light parsing. cat Downloads\vstest.diag\vstest.diag.host.24-10-18_19-55-21_22032_15.log |
% { $s = @{ start = @() ; end = @() } } { if ($_ -like "*RecordStart*") { $s.start += ($_ -split "RecordStart: starting test: ")[1] } ; if ($_ -like "*RecordEnd*") { $s.end += (($_ -split "RecordEnd: test: ")[1] -replace " execution completed", "") }} { $s }
$r.start | where { $_ -notin $s.end } |
Okay that's very helpful, thanks @nohwnd! I'm working on enabling the blame hang dump collector at NuGet/NuGet.Client#6115 and its already reported on a hanging test. Last question: The blame collector attaches the memory dumps to the test run and I can download them. Is the only way to get symbols via uploading the built artifacts on the CI machine? I tried building the same sources locally but VS would not load the symbols. |
There is checkbox in VS Debugging options that says "require symbols to exactly match the source", I normally uncheck this. I don't know how you can improve your chances of seeing the whole stack. E.g. by enabling embedded portable symbols or something like that. Googling says that you can call |
Okay thanks for the pointers! |
The NuGet.Client repo has a CI that occasionally experiences a test hang. I've gotten diagnostic logs and am not sure how to proceed.
The main test host log shows this for 12 minutes:
And one of the hosts shows this for 7minutes:
All of the other hosts show them gracefully exiting:
Eventually Azure DevOps times out the test run after 15 total minutes.
Logs: vstest.diag.zip
Failed build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=847668&view=logs&s=feb4a670-8d1a-579f-6453-0b5a06576f62
Any advice on how to investigate this further would be greatly appreciated.
Here is our RunSettings: https://github.com/NuGet/NuGet.Client/blob/dev/build/xunit.runsettings
We're currently using .NET SDK 8.0.3xx, maybe I should try 8.0.4xx?
The text was updated successfully, but these errors were encountered: