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

Per Liden pliden at openjdk.java.net
Wed Aug 4 09:47:28 UTC 2021


On Wed, 4 Aug 2021 09:37:03 GMT, Jie Fu <jiefu 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.
>
> src/hotspot/share/gc/z/zStat.cpp line 762:
> 
>> 760:     _verbose(verbose) {}
>> 761: 
>> 762: void ZStatCriticalPhase::register_start(const Ticks& start) const {
> 
> So this method is empty.
> Shall we just remove it?
> Thanks.

No, because it's pure virtual in the super class.

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

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



More information about the hotspot-gc-dev mailing list