JDK-8335983 : Various NullPointerExceptions with -XX:+StressUnstableIfTraps
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 24
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2024-07-09
  • Updated: 2024-09-13
  • Resolved: 2024-09-13
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 24
24Resolved
Related Reports
Duplicate :  
Relates :  
Description
Testing with -XX:+StressUnstableIfTraps (JDK-8335334) intermittently triggers various unexpected NullPointerExceptions.

With
- serviceability/sa/ClhsdbDumpheap.java
- serviceability/dcmd/gc/HeapDumpTest.java
- sun/tools/jmap/BasicJMapTest.java#Serial

Caused by: java.lang.NullPointerException: Cannot read field "value" because "this" is null
	at java.base/java.lang.String.charAt(String.java:1629)
	at jdk.test.lib.hprof.util.Misc.parseHex(Misc.java:61)
	at jdk.test.lib.hprof.model.Snapshot.findThing(Snapshot.java:376)
	at jdk.test.lib.hprof.model.Snapshot.findClass(Snapshot.java:381)
	at jdk.test.lib.hprof.parser.HprofReader.readInstance(HprofReader.java:767)
	at jdk.test.lib.hprof.parser.HprofReader.readHeapDump(HprofReader.java:518)
	at jdk.test.lib.hprof.parser.HprofReader.read(HprofReader.java:247)
	at jdk.test.lib.hprof.parser.Reader.getStack(Reader.java:165)
	at ClhsdbDumpheap.printStackTraces(ClhsdbDumpheap.java:55)

With
- compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java
- tools/javac/defaultMethods/static/hiding/InterfaceMethodHidingTest.java:

java.lang.NullPointerException: Cannot invoke "String.charAt(int)" because "this.input" is null
	at java.base/java.net.URI$Parser.at(URI.java:3010)
	at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3236)
	at java.base/java.net.URI$Parser.parse(URI.java:3196)
	at java.base/java.net.URI.<init>(URI.java:645)
	at java.base/java.net.URI.validSchemeAndPath(URI.java:896)
	at java.base/java.net.URI.<init>(URI.java:889)
	at java.base/java.net.URI$1.create(URI.java:3708)

With
- tools/javac/generics/inference/8176534/TestUncheckedCalls.java	

Caused by: java.lang.NullPointerException: Cannot invoke "String.substring(int, int)" because "this.input" is null
	at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3249)
	at java.base/java.net.URI$Parser.parse(URI.java:3196)
	at java.base/java.net.URI.<init>(URI.java:645)
	at java.base/java.net.URI.create(URI.java:930)
	at combo.ComboTask$ComboTemplateSource.<init>(ComboTask.java:391)
	at combo.ComboTask$ComboTemplateSource.<init>(ComboTask.java:387)
	at combo.ComboTask.withSourceFromTemplate(ComboTask.java:103)
	at TestUncheckedCalls.doWork(TestUncheckedCalls.java:240)
	at combo.ComboInstance.run(ComboInstance.java:52)
	at combo.ComboTestHelper.runCombo(ComboTestHelper.java:234)
Comments
Duplicate of JDK-8335977.
13-09-2024

ILW = Incorrect result when deopting from C2 compiled code, intermittent with stress option, no workaround but disable allocation removal or compilation of affected method = HLM = P3
09-07-2024