RFR: 8340012: [C2] assert(KlassEncodingMetaspaceMax > pd) failed: change encoding max if new encoding after 8338526

Martin Doerr mdoerr at openjdk.org
Fri Sep 13 17:09:07 UTC 2024


On Fri, 13 Sep 2024 16:21:21 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>>> Which CPUs are affected? Only PPC64?
>> 
>> The C2 transformation is used on aarch64, ppc64, riscv, s390. The issue has been observed on AIX only so far. It may be possible to trigger it on other platforms by extra flags.
>> 
>>> use CompressedClassSpaceBaseAddress to enforce a low base address, e.g. 1GB.
>> 
>> Thanks for the hints! We need `CompressedKlassPointers::base() == nullptr` to trigger the problem. Otherwise, C2 will not use the transformation.
>
>> > Which CPUs are affected? Only PPC64?
>> 
>> The C2 transformation is used on aarch64, ppc64, riscv, s390. The issue has been observed on AIX only so far. It may be possible to trigger it on other platforms by extra flags.
>> 
>> > use CompressedClassSpaceBaseAddress to enforce a low base address, e.g. 1GB.
>> 
>> Thanks for the hints! We need `CompressedKlassPointers::base() == nullptr` to trigger the problem. Otherwise, C2 will not use the transformation.
> 
> the described process should then work for ppc64, risc and s390 at least.
> 
> Update: ah, I realize the misunderstanding. 
> 
> `CompressedClassSpaceBaseAddress` is badly named. It should be named `CompressedClassSpaceStartAddress` .  It places the class space at that address, and then encoding scheme will be decided from that. With a low-placed and small class space you will get base=zero on most platforms.

I was able to reproduce the issue on linux ppc64le by `make run-test TEST="applications/ctw/modules/java_xml.java" JTREG="VM_OPTIONS=-Xshare:off"`. Unfortunately, I have no reproducer / regression test for any Oracle-supported platform. x86 is not affected and I couldn't get the metaspace configured as needed to trigger the error on aarch64 (as explained by @tstuefe).

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

PR Comment: https://git.openjdk.org/jdk/pull/20971#issuecomment-2349470004


More information about the hotspot-dev mailing list