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

[LOOM] Some nsk/monitoring tests fail due to using unsupported functionality

XMLWordPrintable

      Some nsk/monitoring tests are failing when run with the vthread wrapper due to using functionality that is not supported with vthreads.

      vmTestbase/nsk/monitoring/ThreadMXBean/GetThreadAllocatedBytes/baseBehaviorTest_server_default/TestDescription.java
      vmTestbase/nsk/monitoring/ThreadMXBean/GetThreadAllocatedBytes/baseBehaviorTest_server_custom/TestDescription.java
      vmTestbase/nsk/monitoring/ThreadMXBean/GetThreadAllocatedBytes/baseBehaviorTest_directly/TestDescription.java
      vmTestbase/nsk/monitoring/ThreadMXBean/GetThreadAllocatedBytes/baseBehaviorTest_proxy_custom/TestDescription.java
      vmTestbase/nsk/monitoring/ThreadMXBean/GetThreadAllocatedBytes/baseBehaviorTest_proxy_default/TestDescription.java

      nsk.share.TestFailure: Failure! getCurrentThreadAllocatedBytes() should return >= 0 value for current thread. Received : -1
      at nsk.monitoring.ThreadMXBean.GetThreadAllocatedBytes.BaseBehaviorTest.run(BaseBehaviorTest.java:65)
      at nsk.share.test.Tests$TestRunner.execute(Tests.java:82)
      at nsk.share.test.Tests$TestRunner.run(Tests.java:96)
      at nsk.monitoring.share.Monitoring.runTest(Monitoring.java:112)
      at nsk.monitoring.ThreadMXBean.GetThreadAllocatedBytes.BaseBehaviorTest.main(BaseBehaviorTest.java:138)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:142)
      at java.base/java.lang.VirtualThread.run(VirtualThread.java:287)
      at java.base/java.lang.VirtualThread$VThreadContinuation.lambda$new$0(VirtualThread.java:174)
      at java.base/jdk.internal.vm.Continuation.enter0(Continuation.java:327)
      at java.base/jdk.internal.vm.Continuation.enter(Continuation.java:320)

      getCurrentThreadAllocatedBytes() is not supported for virtual threads. The tests will need to be modified to expect -1 in this case.

            Unassigned Unassigned
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: