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

[8u] Buffer overflow in g1GCPhaseTimes.cpp::LineBuffer::_buffer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 8
    • hotspot
    • gc
    • 8
    • generic
    • generic

      Test hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java will trigger jvm crash on huge core number machine, or you can change the test to replay the bug:

      diff --git a/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java b/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java
      index e653554c94e..f27e70dae7c 100644
      --- a/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java
      +++ b/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java
      @@ -51,6 +51,7 @@ public class TestG1TraceEagerReclaimHumongousObjects {
                                                      "-XX:+UnlockExperimentalVMOptions",
                                                      "-XX:G1LogLevel=finest",
                                                      "-XX:+G1TraceEagerReclaimHumongousObjects",
      + "-XX:ActiveProcessorCount=500",
                                                      GCTest.class.getName());
       
           OutputAnalyzer output = new OutputAnalyzer(pb.start());
      @@ -75,6 +76,7 @@ public class TestG1TraceEagerReclaimHumongousObjects {
                                                      "-XX:+UnlockExperimentalVMOptions",
                                                      "-XX:G1LogLevel=finest",
                                                      "-XX:+G1TraceEagerReclaimHumongousObjects",
      + "-XX:ActiveProcessorCount=500",
                                                      GCWithHumongousObjectTest.class.getName());
       
           OutputAnalyzer output = new OutputAnalyzer(pb.start());

      Below is the test log snippet:

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007f4370c5d481, pid=1413462, tid=0x00007f3e22aa2640
      #
      # JRE version: OpenJDK Runtime Environment (8.0_412) (build 1.8.0_412-internal-_2025_07_10_16_25-b00)
      # Java VM: OpenJDK 64-Bit Server VM (25.412-b00 mixed mode linux-amd64 compressed oops)
      # Problematic frame:
      # C [libc.so.6+0x88481]
      #
      # Core dump written. Default location: /home/yansendao/gerrit/hygon-jdk-8/tmp/scratch/core or core.1413462
      #
      # An error report file with more information is saved as:
      # /home/yansendao/gerrit/hygon-jdk-8/tmp/scratch/hs_err_pid1413462.log
      #
      # If you would like to submit a bug report, please visit:
      # mailto:yansendao@hygon.cn
      #
      ];
       stderr: []
       exitValue = 134

      java.lang.RuntimeException: Expected to get exit value of [0]

              at com.oracle.java.testlibrary.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:377)
              at TestG1TraceEagerReclaimHumongousObjects.testHumongousObjectGCLogs(TestG1TraceEagerReclaimHumongousObjects.java:92)
              at TestG1TraceEagerReclaimHumongousObjects.main(TestG1TraceEagerReclaimHumongousObjects.java:40)

            syan Sendao Yan
            syan Sendao Yan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: