RFR: 8271121: ZGC: stack overflow (segv) when -Xlog:gc+start=debug

Erik Österlund eosterlund at openjdk.java.net
Wed Aug 4 10:02:28 UTC 2021


On Wed, 4 Aug 2021 09:22:54 GMT, Per Liden <pliden at openjdk.org> wrote:

> When an allocation stall happens we're trying to access oops (the thread and thread name) while logging. We shouldn't do that since it can lead to a recursive allocation stall situation, which eventually will cause a stack overflow. I suggest we simply don't log anything in ZStatCriticalPhase::register_start(). The useful part of the logging happens in ZStatCriticalPhase::register_end() anyway, where it's safe to access oops.

Looks good.

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

Marked as reviewed by eosterlund (Reviewer).

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



More information about the hotspot-gc-dev mailing list