RFR: 7903217: jtreg could try killing descendants of stuck test, before timing out the test [v4]

Thomas Stuefe stuefe at openjdk.org
Thu Nov 17 19:09:42 UTC 2022


On Mon, 22 Aug 2022 20:54:36 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> This is an enhancement that aims to improve the robustness of the testing by attempting to quit any child processes (that are possibly stuck and are blocking the parent process from terminating) before timing out the target parent process.
>> 
>> Aborting a process will flush its stdout/stderr streams, which will hopefully get captured in the test's log and provide additional clues as to why a test was timing out.
>> 
>> This enhancement was locally tested with a handcrafted test that itself launched a child process that would get stuck on purpose and worked as intended.
>> 
>> Hopefully, this will help debug issues such as [JDK-8286345](https://bugs.openjdk.org/browse/JDK-8286345)
>
> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
> 
>   return exit code if we had to cancel any child processes

Also, note that killing whole process trees in a quasi random order exposes you to the risk of zombification if you happen to kill branch processes before leafs. On a well-setup box usually no problem, since whoever adopts (pid 1, systemd, ...) periodically reaps. But it can be a problem in some container environments that don't set up a reaper (looking at you, Jenkins).

That is another reason to make this an optional feature.

-------------

PR: https://git.openjdk.org/jtreg/pull/97


More information about the jtreg-dev mailing list