RFR: 8335334: Stress mode to randomly execute unstable if traps [v2]

Tobias Hartmann thartmann at openjdk.org
Wed Sep 18 10:58:06 UTC 2024


On Wed, 18 Sep 2024 10:43:29 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Unstable if traps are supposed to be taken rarely. This patch introduces a `StressUnstableIfTraps` flag that forces unstable if traps to be taken randomly and thus potentially triggering intermittent bugs such as incorrect debug information. It works by adding another if before the unstable if that checks a "random" condition at runtime (a simple shared counter) and then either takes the trap or executes the original, unstable if.
>> 
>> This stress option also has the nice side effect of triggering re-compilation of methods that would otherwise not be re-compiled (see [JDK-8335843](https://bugs.openjdk.org/browse/JDK-8335843)).
>> 
>> I had to adjust a few tests that rely on methods being compiled / deoptimized because with the stress option enabled, deoptimization might unexpectedly (not) happen.
>> 
>> It reliably triggers [JDK-8335977](https://bugs.openjdk.org/browse/JDK-8335977), [JDK-8320308](https://bugs.openjdk.org/browse/JDK-8320308) and [JDK-8335843](https://bugs.openjdk.org/browse/JDK-8335843) in our testing.
>> 
>> Tested with multiple runs up to tier6. I'll integrate it into our (Oracle internal) testing and CTW [(JDK-8340302)](https://bugs.openjdk.org/browse/JDK-8340302) once all the bugs that it currently triggers are fixed.
>> 
>> Thanks,
>> Tobias
>
> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review comments

Thanks for your review, Vladimir! I uploaded a new version and addressed your comments.

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

PR Review: https://git.openjdk.org/jdk/pull/21037#pullrequestreview-2312305701


More information about the hotspot-dev mailing list