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

Adapt test/jdk/com/sun/jdi/ThreadMemoryLeakTest.java to Generational ZGC

XMLWordPrintable

      The test is very finicky with the heap size. Consider adapting it so that it also works with Generational ZGC.

      make test TEST=com/sun/jdi/ThreadMemoryLeakTest.java TEST_VM_OPTS="-XX:+UseZGC -XX:+ZGenerational"

      Progress: 54000
      Progress: 55000
      Progress: 56000
      Progress: 57000
      Progress: 58000
      Timeout signalled after 480 seconds
      STDERR:
      [2ms] run argError: Some tests failed or other problems occurred.
      s: [ThreadMemoryLeakTarg]
      [5824ms] Got ThreadStartEvent #1000 threads:157
      Exception in thread "JDI Target VM Interface" java.lang.OutOfMemoryError: Java heap space
      at java.base/java.net.Socket$SocketInputStream.read(Socket.java:1092)
      at jdk.jdi/com.sun.tools.jdi.SocketConnection.readPacket(SocketConnection.java:83)
      at jdk.jdi/com.sun.tools.jdi.TargetVM.run(TargetVM.java:123)
      at java.base/java.lang.Thread.runWith(Thread.java:1583)
      at java.base/java.lang.Thread.run(Thread.java:1570)

      The heap is restricted to 7m so if there is a leak it can be quickly detected. However in this case it has run very few iterations, and then times out because "JDI Target VM Interface" got an OOME, preventing the test from making further progress. I tried 8m and that had the exact same result, so there is probably already rounding being done up to 8m. I then tried 9m and it passed.

            Unassigned Unassigned
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: