RFR: 8296469: Instrument VMError::report with reentrant iteration step for register and stack printing

Stefan Karlsson stefank at openjdk.org
Wed Nov 9 08:01:33 UTC 2022


On Wed, 9 Nov 2022 07:27:34 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> > It would be nice to know why register printing crashes, and if there is something we could do to make it more robust, like checking os::is_readable_pointer().
> 
> Personally I have only seen it inside gc code when working on generational ZGC and experimenting with some new features, especially when working on enhanced print_location printing where I break some invariants, (because we are already crashing) to sometimes print more detailed information based on potentially stale / racy data. I have only really seen it happen when I do something really stupid 😄
> 
> I know the this whole feature came up in discussions at the office where people expressed their annoyance at having register printing being interrupted half way through. So maybe someone else have a more concrete example of this occurring.

It's quite common to get broken oops in the registers when you crash in the GC. And when that happens the register printing code usually crash inside the oop/Klass printing code. We can probably try to figure out all places that can crash inside the printing code, but I think it will be significant undertaking, and probably significantly uglify the printing code.

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

PR: https://git.openjdk.org/jdk/pull/11017


More information about the hotspot-dev mailing list