Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8282555

Missing memory edge when spilling MoveF2I, MoveD2L etc

    XMLWordPrintable

Details

    • b22
    • Verified

    Backports

      Description

        Original Bug Name:
        "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

            Activity

              People

                epeter Emanuel Peter
                epeter Emanuel Peter
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: