Details
-
Bug
-
Resolution: Fixed
-
P2
-
11, 17, 18, 19
-
b22
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8286878 | 17.0.5-oracle | Tobias Hartmann | P2 | Closed | Fixed | b01 |
JDK-8288958 | 17.0.5 | Goetz Lindenmaier | P2 | Resolved | Fixed | b01 |
JDK-8286881 | 11.0.17-oracle | Tobias Hartmann | P2 | Closed | Fixed | b01 |
JDK-8289467 | 11.0.17 | Goetz Lindenmaier | P2 | Resolved | Fixed | b01 |
Description
"java.lang.RuntimeException in HeapByteBufferTest.java with -XX:+OptoScheduling"
These flags lead to intermittent unexpected behavior:
-XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -XX:+OptoScheduling
On this test:
test/hotspot/jtreg/compiler/intrinsics/unsafe/HeapByteBufferTest.java
I was able to reproduce stably it with the help of -XX:+StressGCM.
With -XX:AbortVMOnException=java.lang.RuntimeException I can let the java exception crash the VM, and I can go find the StressSeed value.
The hit rate is maybe around 10-20%.
The runtime exception happens in this function:
void ck(double x, double y)
Occasionally, the test runs into an endless recursion/stack-overflow in:
void ck(double x, double y)
-> not sure why this test was implemented this way, but it essentially seems to lead to a stack-overflow if the value is not identical/expected.
Note, that the values are only half off. I have found these cases:
java.lang.RuntimeException: x = 39cb23bc2be7f15d, y = 2be7f15d
java.lang.RuntimeException: x = ae05b6495318f496, y = ae45b6495318f496
java.lang.RuntimeException: x = 1e96db4e3fda1b95, y = 4c71f0d03fda1b95
java.lang.RuntimeException: x = 8854ecf2c6878eb1, y = e1c006e6c6878eb1
java.lang.RuntimeException: x = 21a12358cfa01320, y = 32418ea0cfa01320
It is evident that the lower 4 byte of the long is identical, and the upper 4 bytes are diverging.
I have found these seeds / java stack traces:
-XX:StressSeed=123
java.lang.RuntimeException: x = 39cb23bc2be7f15d, y = 2be7f15d
at MyByteBuffer.ck(ByteBufferTest.java:214)
at MyByteBuffer.getLong(ByteBufferTest.java:256)
at ByteBufferTest.stepUsingViews(ByteBufferTest.java:406)
at ByteBufferTest.step(ByteBufferTest.java:315)
at ByteBufferTest.run(ByteBufferTest.java:743)
at HeapByteBufferTest.main(HeapByteBufferTest.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:828)
-XX:StressSeed=289413885
java.lang.RuntimeException: x = ae05b6495318f496, y = ae45b6495318f496
at MyByteBuffer.ck(ByteBufferTest.java:214)
at MyByteBuffer.getLong(ByteBufferTest.java:256)
at ByteBufferTest.stepUsingViews(ByteBufferTest.java:406)
at ByteBufferTest.step(ByteBufferTest.java:315)
at ByteBufferTest.run(ByteBufferTest.java:743)
at HeapByteBufferTest.main(HeapByteBufferTest.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:828)
-XX:StressSeed=284669752
java.lang.RuntimeException: x = 21a12358cfa01320, y = 32418ea0cfa01320
at MyByteBuffer.ck(ByteBufferTest.java:214)
at MyByteBuffer.getLong(ByteBufferTest.java:256)
at ByteBufferTest.stepUsingViews(ByteBufferTest.java:406)
at ByteBufferTest.step(ByteBufferTest.java:315)
at ByteBufferTest.run(ByteBufferTest.java:743)
at HeapByteBufferTest.main(HeapByteBufferTest.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:828)
Attachments
Issue Links
- backported by
-
JDK-8288958 Missing memory edge when spilling MoveF2I, MoveD2L etc
- Resolved
-
JDK-8289467 Missing memory edge when spilling MoveF2I, MoveD2L etc
- Resolved
-
JDK-8286878 Missing memory edge when spilling MoveF2I, MoveD2L etc
- Closed
-
JDK-8286881 Missing memory edge when spilling MoveF2I, MoveD2L etc
- Closed
- relates to
-
JDK-8282661 [BACKOUT] ByteBufferTest.java: replace endless recursion with RuntimeException in void ck(double x, double y)
- Resolved
-
JDK-8282665 [REDO] ByteBufferTest.java: replace endless recursion with RuntimeException in void ck(double x, double y)
- Resolved
-
JDK-8282573 ByteBufferTest.java: replace endless recursion with RuntimeException in void ck(double x, double y)
- Closed
-
JDK-8288467 remove memory_operand assert for spilled instructions
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/c6e2a5b6
-
Commit openjdk/jdk17u-dev/b91c4922
-
Commit openjdk/jdk/4a5e7a1a
-
Review openjdk/jdk11u-dev/1185
-
Review openjdk/jdk17u-dev/485
-
Review openjdk/jdk18u/158
-
Review openjdk/jdk/7889