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

Delete applications/scimark/Scimark.java test

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • 25
    • hotspot
    • None
    • In Review

      Scimark times out.

      Here's are snippets from the log file:

      #section:driver
      ----------messages:(10/296)----------
      command: driver Scimark
      reason: User specified action: run driver Scimark
      started: Wed Sep 06 04:49:53 GMT 2023
      Mode: agentvm
      Agent id: 2
      Timeout signalled after 120 seconds
      Timeout information:
      --- Timeout information end.
      finished: Wed Sep 06 04:54:02 GMT 2023
      elapsed time (seconds): 249.457
      ----------configuration:(14/2060)----------

      <snip>

      ----------System.out:(8/1314)----------
      Command line: [/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-22+14-1018/macosx-aarch64-debug.jdk/jdk-22/fastdebug/bin/java -XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/20/36/bundles/macos-aarch64/jdk-20_macos-aarch64_bin.tar.gz/jdk-20.jdk/Contents/Home -Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S106464/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/33ba4cc1-3d58-4487-974b-277b782488dd/runs/d55d3c34-c8a5-46ce-8b45-6febcf309d7b/testoutput/test-support/jtreg_open_test_hotspot_jtreg_applications_scimark_Scimark_java/tmp -cp /System/Volumes/Data/mesos/work_dir/jib-master/install/gov/nist/math/scimark/2.0/scimark-2.0.zip jnt.scimark2.commandline -large ]
      [2023-09-06T04:49:55.994734Z] Gathering output for process 77403
      [2023-09-06T04:49:56.007997Z] Waiting for completion for process 77403
      [2023-09-06T04:52:56.180065Z] Waiting for completion finished for process 77403
      [2023-09-06T04:52:56.181954Z] Waiting for completion for process 77403
      [2023-09-06T04:52:56.182042Z] Waiting for completion finished for process 77403
      [2023-09-06T04:52:56.200556Z] Waiting for completion for process 77403
      [2023-09-06T04:52:56.200623Z] Waiting for completion finished for process 77403
      ----------System.err:(15/673)----------
       stdout: [];
       stderr: []
       exitValue = 134

      java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [134]
      at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:490)
      at Scimark.main(Scimark.java:55)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.base/java.lang.Thread.run(Thread.java:1570)

      JavaTest Message: Test threw exception: java.lang.RuntimeException
      JavaTest Message: shutting down test

      result: Error. Agent error: java.lang.Exception: Agent 2 timed out with a timeout of 120 seconds; check console log for any additional details

      The test timed out and also exited with "exitValue = 134".
      I suspect that the "exitValue = 134" is from JTREG aborting
      the test after the timeout.

      Based on other Scimark.java failures in the bug database,
      I'm wondering if this timeout is due to a timeout in getting
      something the test needs from artifactory.



      The problem is in Scimark. It runs some testing and exits when it takes more than 2 seconds. It doubles the number of iterations for each attempt. However, MacOSX Aarch64 is so fast that it hits 'int' limit and is set to 0 causing an infinite loop.

      The fix would be something like:
      20:39@lmesnik-mac:~/ws/3rd/scimark$
      ~>git d
      diff --git a/src/main/java/jnt/scimark2/Kernel.java b/src/main/java/jnt/scimark2/Kernel.java
      index 2d61b59..042c8c3 100644
      --- a/src/main/java/jnt/scimark2/Kernel.java
      +++ b/src/main/java/jnt/scimark2/Kernel.java
      @@ -54,7 +54,7 @@ public class Kernel {
           public static double measureMonteCarlo(double min_time, Random R) {
               Stopwatch Q = new Stopwatch();

      - int cycles = 1;
      + long cycles = 1;
               while (true) {
                   Q.start();
                   MonteCarlo.integrate(cycles);
      diff --git a/src/main/java/jnt/scimark2/MonteCarlo.java b/src/main/java/jnt/scimark2/MonteCarlo.java
      index 3308006..b1a27d3 100644
      --- a/src/main/java/jnt/scimark2/MonteCarlo.java
      +++ b/src/main/java/jnt/scimark2/MonteCarlo.java
      @@ -31,7 +31,7 @@ package jnt.scimark2;
       public class MonteCarlo {
           final static int SEED = 113;

      - public static final double num_flops(int Num_samples) {
      + public static final double num_flops(long Num_samples) {
               // 3 flops in x^2+y^2 and 1 flop in random routine

               return ((double) Num_samples) * 4.0;
      @@ -39,13 +39,13 @@ public class MonteCarlo {
           }


      - public static final double integrate(int Num_samples) {
      + public static final double integrate(long Num_samples) {

               Random R = new Random(SEED);


               int under_curve = 0;
      - for (int count = 0; count < Num_samples; count++) {
      + for (long count = 0; count < Num_samples; count++) {
                   double x = R.nextDouble();
                   double y = R.nextDouble();

      The main problem is that Scimark is not maintained and it is unclear where to fix it. Might be the best would be to remove it.

            lmesnik Leonid Mesnik
            lmesnik Leonid Mesnik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: