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

Per Liden pliden at openjdk.java.net
Thu Aug 5 12:44:32 UTC 2021


On Wed, 4 Aug 2021 09:56:01 GMT, Albert Mingkun Yang <ayang 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.
>
> Marked as reviewed by ayang (Committer).

Thanks @albertnetymk and @fisk for reviewing.

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

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



More information about the hotspot-gc-dev mailing list