JDK-8283249 : CompressedClassPointers.java fails on ppc with 'Narrow klass shift: 0' missing
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17,19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: ppc
  • Submitted: 2022-03-16
  • Updated: 2024-07-09
  • Resolved: 2022-03-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 19
17.0.4Fixed 19 b15Fixed
Related Reports
Relates :  
Relates :  
Description
These tests are highly vulnerable against ASLR. On PPCLE, we apparently don't manage to map the heap into the lower 4G region, therefore CCS does not live there either.

The test requires for "-UseCompressedOops -Xshare:off" and a heap size of 128m and a ccs size of 1G ccs to live in the lower 4G. That is an optimistic assumption.

The VM attaches instead CCS to 0x100000000 (4GB) and calculates Narrow Base/Shift as 0/3, which is totally correct.

As a stop-gap measure, the test should be less strict for PPC. 

A future solution would be to revise this test.
Comments
Hi Thomas, from July - September 2023 I saw only errors in runtime/CompressedOops/CompressedClassPointers.java in jdk17, not head. Those errors occurred on aarch64 (mostly) and some on Linux ppc64le as well.
05-10-2023

Hi Matthias, Goetz! where does it still fail, in head or in 17? The coding has been revamped in head completely with https://bugs.openjdk.org/browse/JDK-8312018 . I'd be very interested to know if it still fails in head.
04-10-2023

JDK-8241825 introduced the failing subtest in jdk15.
26-09-2023

The test still fails sometimes on Linux ppc64le : java.lang.RuntimeException: 'Narrow klass shift: 0' missing from stdout/stderr at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:221) at CompressedClassPointers.largeHeapAbove32GTest(CompressedClassPointers.java:130) Looks like largeHeapAbove32GTest() should be adjusted too for ppc64le in the same way 8283249 adjusted two other checks. https://bugs.openjdk.org/browse/JDK-8299387 opened.
28-12-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/330 Date: 2022-04-01 05:50:38 +0000
01-04-2022

Fix Request 17u: Work around for sporadic errors on ppc. Low risk, applies cleanly.
01-04-2022

Changeset: 58487ddc Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2022-03-23 06:46:55 +0000 URL: https://git.openjdk.java.net/jdk/commit/58487ddc170f73123668f29c99097b16ba84aa9b
23-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7837 Date: 2022-03-16 09:43:16 +0000
17-03-2022