1

I'm trying to run jcstress 0.5, but I'm getting an error:

Error: VM option 'StressLCM' is develop and is available only in debug version of VM.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Full log:

Probing what VM modes are available:
 (failures are non-fatal, but may miss some interesting cases)

----- [OK] [-Xint]
----- [OK] [-XX:TieredStopAtLevel=1]
----- [OK] []
----- [N/A] [-XX:+UnlockDiagnosticVMOptions, -XX:+StressLCM, -XX:+StressGCM]
Error: VM option 'StressLCM' is develop and is available only in debug version of VM.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


----- [OK] [-XX:-TieredCompilation]
----- [N/A] [-XX:-TieredCompilation, -XX:+UnlockDiagnosticVMOptions, -XX:+StressLCM, -XX:+StressGCM]
Error: VM option 'StressLCM' is develop and is available only in debug version of VM.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.



Initializing and probing the target VM: 
 (all failures are non-fatal, but may affect testing accuracy)

----- [OK] Unlocking diagnostic VM options
Burning up to figure out the exact CPU count....... done!

----- [OK] Trimming down the default VM heap size to 1/8-th of max RAM
----- [OK] Trimming down the number of compiler threads
----- [OK] Trimming down the number of parallel GC threads
----- [OK] Trimming down the number of concurrent GC threads
----- [OK] Trimming down the number of G1 concurrent refinement GC threads
----- [OK] Testing @Contended works on all results and infra objects
----- [OK] Unlocking Whitebox API for online de-optimization
----- [OK] Testing allocation profiling
----- [FAILED] Trying Thread.onSpinWait
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.Thread.onSpinWait()V
    at org.openjdk.jcstress.vm.ThreadSpinWaitTestMain.main(ThreadSpinWaitTestMain.java:30)


  Hardware threads in use/available: 8/8, no yielding.
  Test preset mode: "default"
  Writing the test results to "jcstress-results-2019-02-05-22-08-52.bin.gz"
  Parsing results to "results/"
  Running each test matching ".*" for 1 forks, 5 iterations, 1000 ms each
  Each JVM would execute at most 5 tests in the row.
  Solo stride size will be autobalanced within [10, 10000] elements, but taking no more than 100 Mb.

Exception in thread "main" java.lang.NullPointerException
    at java.io.Reader.<init>(Reader.java:78)
    at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
    at org.openjdk.jcstress.infra.runners.TestList.getTests(TestList.java:53)
    at org.openjdk.jcstress.infra.runners.TestList.tests(TestList.java:105)
    at org.openjdk.jcstress.JCStress.getTests(JCStress.java:139)
    at org.openjdk.jcstress.JCStress.run(JCStress.java:67)
    at org.openjdk.jcstress.Main.main(Main.java:60)

Command which I use to run tests:

java -cp jars/jcstress-core-0.5.jar:jars/jopt-simple-4.6.jar org.openjdk.jcstress.Main

2 Answers2

1

When you try the newest version like JDK 16/17, it should work fine.

pveentjer
  • 10,545
  • 3
  • 23
  • 40
0

You did not say which version of Java you used. But the same thing happens for me with a Windows JDK-8 build from Oracle. JDK-12 seems to be fine, though. Also, you could try one of these: https://builds.shipilev.net/.

Ralf H
  • 1,392
  • 1
  • 9
  • 17