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

java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations"

    XMLWordPrintable

Details

    • b03
    • generic
    • Verified

    Backports

      Description

        This test case (jdk/incubator/concurrent/ScopedValue/StressStackOverflow.java) fails with "-XX:-VMContinuations", but passes with "-XX:+VMContinuations".

        In my local test, it fails on Linux platforms with both aarch64 and x86_64.

        Here shows the error log:

        ```
         STDERR:
         WARNING: Using incubator modules: jdk.incubator.concurrent
         java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.NoSuchElementException
          at StressStackOverflow.lambda$run$1(StressStackOverflow.java:196)
          at java.base/jdk.internal.vm.ScopedValueContainer.runWithoutScope(ScopedValueContainer.java:114)
          at java.base/jdk.internal.vm.ScopedValueContainer.run(ScopedValueContainer.java:100)
          at jdk.incubator.concurrent/jdk.incubator.concurrent.ScopedValue$Carrier.run(ScopedValue.java:417)
          at StressStackOverflow.run(StressStackOverflow.java:158)
          at StressStackOverflow.main(StressStackOverflow.java:209)
          at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
          at java.base/java.lang.reflect.Method.invoke(Method.java:578)
          at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
          at java.base/java.lang.Thread.run(Thread.java:1583)
         Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.NoSuchElementException
          at StressStackOverflow.runInNewThread(StressStackOverflow.java:152)
          at StressStackOverflow.lambda$run$1(StressStackOverflow.java:189)
          ... 9 more
         Caused by: java.util.concurrent.ExecutionException: java.util.NoSuchElementException
          at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
          at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
          at jdk.incubator.concurrent/jdk.incubator.concurrent.StructuredTaskScope$FutureImpl.get(StructuredTaskScope.java:779)
          at StressStackOverflow.runInNewThread(StressStackOverflow.java:149)
          ... 10 more
          Suppressed: java.lang.IllegalStateException: Owner did not invoke join or joinUntil after fork
            at jdk.incubator.concurrent/jdk.incubator.concurrent.StructuredTaskScope.close(StructuredTaskScope.java:704)
            at StressStackOverflow.runInNewThread(StressStackOverflow.java:144)
            ... 10 more
         Caused by: java.util.NoSuchElementException
          at jdk.incubator.concurrent/jdk.incubator.concurrent.ScopedValue.slowGet(ScopedValue.java:570)
          at jdk.incubator.concurrent/jdk.incubator.concurrent.ScopedValue.get(ScopedValue.java:563)
          at StressStackOverflow$2.run(StressStackOverflow.java:183)
          at StressStackOverflow.lambda$runInNewThread$0(StressStackOverflow.java:146)
          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
          at java.base/java.lang.ThreadBuilders$BoundVirtualThread.run(ThreadBuilders.java:436)
         
         JavaTest Message: Test threw exception: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.NoSuchElementException
         JavaTest Message: shutting down test
         
         STATUS:Failed.`main' threw exception: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.NoSuchElementException
        ```

        Attachments

          Issue Links

            Activity

              People

                aph Andrew Haley
                haosun Hao Sun (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: