RFR: 8308094: Add a compilation timeout flag to catch long running compilations [v5]

Manuel Hässig mhaessig at openjdk.org
Thu Aug 14 14:02:04 UTC 2025


On Wed, 13 Aug 2025 08:40:25 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Manuel Hässig has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
>> 
>>  - Merge branch 'master' into JDK-8308094-timeout
>>  - Rename _timer
>>  - remove _timeout_armed
>>  - ASSERT
>>  - Merge branch 'master' into JDK-8308094-timeout
>>  - No acquire release semantics
>>  - Factor Linux specific timeout functionality out of share/
>>  - Move timeout disarm above if
>>  - Merge branch 'master' into JDK-8308094-timeout
>>  - Fix SIGALRM test
>>  - ... and 1 more: https://git.openjdk.org/jdk/compare/b93dcf2a...8bb5eb7a
>
> Nice improvement! I left some small comments in the code but otherwise the change looks reasonable!
> 
> Can we also add some tests for the new `CompileTaskTimeout` flag? Maybe we can add a positive test and negative test:
> - Positive test: Could just be a hello world test with a reasonably large non-zero value for `CompileTaskTimeout`.
> - Negative test: Maybe we can just set `CompileTaskTimeout=1` which will probably crash immediately for a hello world program. That could be run in a separate VM and then we can check the output. If we are able to also dump the compile task/method that is timing out, we might even be able to match on that when run with `CompileOnly` for a single method. But not sure if the latter is possible.
> 
> What do you think?

Thank you for looking at this, @chhagedorn. I added a simple test and addressed the rest of your comments.

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

PR Comment: https://git.openjdk.org/jdk/pull/26023#issuecomment-3188563311


More information about the hotspot-dev mailing list