RFR: 8253877: gc/g1/TestGCLogMessages.java fails - missing "Evacuation failure" message

Stefan Johansson sjohanss at openjdk.java.net
Tue Oct 13 12:47:09 UTC 2020


On Tue, 13 Oct 2020 07:59:23 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   can I have reviews for this change to gc/g1/TestGCLogMessages to hopefully make it more reliable?
> 
> One subtest tries to force evacuation failure, but apparently this does not always succeed. Particularly with upcoming
> young gen sizing changes, there seems to be a larger than before chance that the current mechanism does not work.
> This mechanism assumes that before that test the young gen has been sized that much that the allocation of a half-heap
> humongous object causes an evacuation failure next time - of course that's a somewhat dodgy assumption that apparently
> recently started failing more.  The change employs the G1 internal evacuation failure debugging mechanism to force this
> kind of situation. The advantage is that this is guaranteed to work, the disadvantage is that it relies on that
> feature.  Additionally I did some slight renaming to the helper that used the term "ToSpaceExhaustion" instead of
> "EvacuationFailure" which is the name of the message that is actually checked for.
> Testing: 2k+ tests of previous version without reproduction (meaning that at least for me without context of other
> tests, the issue has not been reproducable, at least not with the mentioned 1% failure rate), 3k tests with new version
> without reproduction  Thanks,
>   Thomas

I think it is good to make use of the debug feature to ensure stable testing and I'm approving this change.

I guess an approach if we don't want to use it is to just have an allocation loop that keeps everything live, it should
trigger evacuation failures before throwing OOME.

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

Marked as reviewed by sjohanss (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/624



More information about the hotspot-gc-dev mailing list