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

GetThreadStateMountedTest fails transiently on libgraal

XMLWordPrintable

      The serviceability/jvmti/vthread/GetThreadStateMountedTest/GetThreadStateMountedTest.java test fails when run with libgraal and the -Xcomp flag. It expects compilation to complete faster than a debug build of libgraal can achieve.

      The wait time in the test's native code should be increased when -Xcomp is enabled. For example, the following patch allows the test to pass:

      diff --git a/test/hotspot/jtreg/serviceability/jvmti/vthread/GetThreadStateMountedTest/libGetThreadStateMountedTest.cpp b/test/hotspot/jtreg/serviceability/jvmti/vthread/GetThreadStateMountedTest/libGetThreadStateMountedTest.cpp
      index 4de5ebe1e89..77fdda77cf3 100644
      --- a/test/hotspot/jtreg/serviceability/jvmti/vthread/GetThreadStateMountedTest/libGetThreadStateMountedTest.cpp
      +++ b/test/hotspot/jtreg/serviceability/jvmti/vthread/GetThreadStateMountedTest/libGetThreadStateMountedTest.cpp
      @@ -55,7 +55,7 @@ Java_GetThreadStateMountedTest_trySuspendInWaitingState(JNIEnv* jni, jclass claz
         const int max_retries = 10;
         for (int i = 0; i < max_retries; i++) {
           // wait a bit
      - sleep_ms(100);
      + sleep_ms(1000);
       
           // suspend the thread
           LOG("suspend vthread (%d)\n", i);

            never Tom Rodriguez
            dnsimon Douglas Simon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: