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

JVM crashed: failed: tlab stats == 0

    XMLWordPrintable

    Details

      Description

      When JVM 8 (fastdebug) is run using -XX:-TLABStats on the following loop:

          while (true) {
              int array[] = new int[100_000];
          }

      it eventually crashes with the following message:

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error ((...)/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp:105), pid=193644, tid=0x00007ff4cbbfb700
      # assert(_number_of_refills == 0 && _fast_refill_waste == 0 && _slow_refill_waste == 0 && _gc_waste == 0) failed: tlab stats == 0
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_291-b94) (build 1.8.0_291-fastdebug-b94)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.291-b94-fastdebug mixed mode linux-amd64 compressed oops)

      HOW TO REPRODUCE (JDK 8, fastdebug):

      javac Reduced.java && java -XX:-TLABStats Reduced

      (-Xcomp can be added to shorten the time to reach the assertion failure).

      ORIGINAL REPORT FROM WEBBUG GROUP:

      Reproduce:

      $ java -Xcomp -XX:+OptoNoExecute -XX:-TLABStats Test
      i20 i21 by2 = 1,-927686,20
      i22 f i23 = 370,1196208120,350
      i24 i25 i26 = 21613487,72,203
      l3 i27 b2 = 2,-191,1
      iArr1 = 9975526
      Test.instanceCount Test.sFld Test.dFld = 21613487,2118,4667161184810046880
      lFld Test.bArrFld Test.dArrFld = -1197240229894220855,13530,-4555221942775105605
      Test.sArrFld lArrFld = 215643,0
      vMeth1_check_sum: -7644958778175398504
      iMeth_check_sum: -5584467393330172220
      vMeth_check_sum: -4474561209299640794
      i20 i21 by2 = 1,-906090,20
      i22 f i23 = 370,1196208120,350
      i24 i25 i26 = 21613487,72,203
      l3 i27 b2 = 2,-191,1
      iArr1 = 9975526
      Test.instanceCount Test.sFld Test.dFld = 21613487,2118,4671665130835806928
      lFld Test.bArrFld Test.dArrFld = -1197240229899038451,13530,-4556971082522959255
      Test.sArrFld lArrFld = 215642,0
      vMeth1_check_sum: 3156826517358754608
      iMeth_check_sum: 7277809287049207176
      vMeth_check_sum: -8949122418599281588
      i20 i21 by2 = 1,-884494,20
      i22 f i23 = 370,1196208120,350
      i24 i25 i26 = 21613487,72,203
      l3 i27 b2 = 2,-191,1
      iArr1 = 9975526
      Test.instanceCount Test.sFld Test.dFld = 21613487,2118,4674633262474988240
      lFld Test.bArrFld Test.dArrFld = -1197240229903856047,13530,-4559800920177567184
      Test.sArrFld lArrFld = 215641,0
      vMeth1_check_sum: -4488132260816643896
      iMeth_check_sum: 1693341893719034956
      vMeth_check_sum: 5023060445810629234
      i20 i21 by2 = 1,-862898,20
      i22 f i23 = 370,1196208120,350
      i24 i25 i26 = 21613487,72,203
      l3 i27 b2 = 2,-191,1
      iArr1 = 9975526
      Test.instanceCount Test.sFld Test.dFld = 21613487,2118,4676168903662372200
      lFld Test.bArrFld Test.dArrFld = -1197240229908673643,13530,-4564451976820236545
      Test.sArrFld lArrFld = 215640,0
      vMeth1_check_sum: 6313653034717509216
      iMeth_check_sum: -3891125499611137264
      vMeth_check_sum: 548499236510988440
      # To suppress the following error report, specify this argument
      # after -XX: or in .hotspotrc: SuppressErrorAt=/threadLocalAllocBuffer.cpp:105
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/home/user/jdk_source/jdk8u/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp:105), pid=67317, tid=0x00007f6e7d1d1700
      # assert(_number_of_refills == 0 && _fast_refill_waste == 0 && _slow_refill_waste == 0 && _gc_waste == 0) failed: tlab stats == 0
      #
      # JRE version: OpenJDK Runtime Environment (8.0) (build 1.8.0-internal-fastdebug-jiahx_2022_03_11_16_03-b00)
      # Java VM: OpenJDK 64-Bit Server VM (25.71-b00-fastdebug compiled mode linux-amd64 compressed oops)
      # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # An error report file with more information is saved as:
      # /home/user/hs_err_pid67317.log
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      #
      Current thread is 140112522188544
      Dumping core ...


      ---------- BEGIN SOURCE ----------
      Download from:
      https://drive.google.com/file/d/1KQ0PlfRB_cFLHMbWEIYjEWWIR3dY7q-I/view?usp=sharing
      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

        1. hs_err_pid16924.log
          21 kB
        2. Reduced.java
          0.1 kB
        3. TestTLABStats.zip
          22 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: