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

Excessive allocations in ML-DSA sign

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • None
    • security-libs
    • None

      MLDSA sign dumps 3GB of memory every few seconds. To reproduce:

      ./build/linux-x86_64-server-fastdebug/images/jdk/bin/java -Xlog:gc -Xmx10g -Xms10g --add-opens=java.base/sun.security.provider=ALL-UNNAMED -XX:+UnlockDiagnosticVMOptions -XX:+UseDilithiumIntrinsics -jar ./build/linux-x86_64-server-fastdebug/images/test/micro/benchmarks.jar -f 0 -i 5 -wi 5 -r 1000000 -w 1 -palgorithm=ML-DSA-44 org.openjdk.bench.java.security.MLDSA.siggen

      # Warmup Iteration 5: 1581.634 us/op
      Iteration 1: [6.629s][info][gc] GC(3) Pause Young (Normal) (G1 Evacuation Pause) 2525M->5M(10240M) 154.762ms
      [10.094s][info][gc] GC(4) Pause Young (Normal) (G1 Evacuation Pause) 2709M->5M(10240M) 166.207ms
      [13.712s][info][gc] GC(5) Pause Young (Normal) (G1 Evacuation Pause) 2837M->5M(10240M) 173.072ms
      [17.365s][info][gc] GC(6) Pause Young (Normal) (G1 Evacuation Pause) 2869M->5M(10240M) 175.161ms
      [21.057s][info][gc] GC(7) Pause Young (Normal) (G1 Evacuation Pause) 2901M->5M(10240M) 176.854ms
      [24.792s][info][gc] GC(8) Pause Young (Normal) (G1 Evacuation Pause) 2941M->5M(10240M) 181.309ms
      [28.560s][info][gc] GC(9) Pause Young (Normal) (G1 Evacuation Pause) 2965M->5M(10240M) 180.226ms
      [32.397s][info][gc] GC(10) Pause Young (Normal) (G1 Evacuation Pause) 3013M->5M(10240M) 183.379ms
      [36.272s][info][gc] GC(11) Pause Young (Normal) (G1 Evacuation Pause) 3045M->5M(10240M) 184.879ms
      [40.184s][info][gc] GC(12) Pause Young (Normal) (G1 Evacuation Pause) 3077M->5M(10240M) 189.501ms

      PS: I had some attempts to try and locate the culprits but no such luck. https://github.com/openjdk/jdk/pull/25048

            frakoczi Ferenc Rakoczi
            vpaprotski Volodymyr Paprotski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: