RFR: 2410: Introduce process killing finally block in GitCommits

Erik Joelsson erikj at openjdk.org
Tue Nov 19 23:41:17 UTC 2024


On Tue, 19 Nov 2024 22:39:42 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> Recently, I found that for pr-external container, in GitCommits, the exit of the git process could time out and then the process will be stuck in sleeping state and eat memory. With Pavel's suggestion, I think we should introduce the process killing finally block.
>
> vcs/src/main/java/org/openjdk/skara/vcs/git/GitCommits.java line 170:
> 
>> 168:             throw new IOException("'" + String.join(" ", command) + "' was interrupted", e);
>> 169:         } finally {
>> 170:             if (p.isAlive()) {
> 
> For the record, this might be insufficient because `GitCommits` might have created multiple processes and this destroys only one of them.
> 
> In general, Skara needs better tools to deal with processes.

Oh, you are right. I didn't look at the whole class.

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

PR Review Comment: https://git.openjdk.org/skara/pull/1697#discussion_r1849303669


More information about the skara-dev mailing list