dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.42k stars 4.76k forks source link

[Tests] Add more logging for runtime test timeouts #109998

Open mdh1418 opened 2 days ago

mdh1418 commented 2 days ago

The runtime testing infrastructure collects dumps of the test process and all of its corerun child processes whenever the runtime test times out. https://github.com/dotnet/runtime/blob/e3b3aaaf21b88b7992cd8a42321e01cf1aa704a2/src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs#L795-L807

However, there have been instances where a runtime test times out due to waiting for a subprocess to finish, yet there are logs indicating that the subprocess has finished. See https://github.com/dotnet/runtime/issues/104670#issuecomment-2486232941. Its not clear whether 1) the subprocess is indeed hanging (yet no crashdump is collected) or 2) the subprocess completed yet failed to signal back to the parent process (no crashdump to collect).

This PR aims to clarify, if the Id of the subprocess that the main test process is waiting for is known, whether that Id is part of the list of active processes at timeout.

dotnet-policy-service[bot] commented 2 days ago

Tagging subscribers to this area: @hoyosjs See info in area-owners.md if you want to be subscribed.