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

Crash with fatal error: DEBUG MESSAGE: Fast Unlock lock on stack

XMLWordPrintable

    • 23
    • b19
    • x86_64
    • linux_ubuntu

      ADDITIONAL SYSTEM INFORMATION :
      # JRE version: OpenJDK Runtime Environment (23.0) (fastdebug build 23-internal-adhoc.user.jdk23u)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 23-internal-adhoc.user.jdk23u, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)

      The jdk used is compiled from source code downloaded from GitHub jdk repo.

      A DESCRIPTION OF THE PROBLEM :
      I ran a testcase on jdk23u-fastdebug and the process crashed with fatal error.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      java Test

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      running without error
      ACTUAL -
      crash with fatal error

      ---------- BEGIN SOURCE ----------
      class Test {

        int a = 400;

        void q() {
          int e;
          synchronized (new Double(1.1f)) {
            int[] f = new int[a];
            synchronized (Test.class) {
              for (int d = 4; d < 127; d++) {
                e = 13;
                do switch (d * 5) {
                  case 0:
                  case 42:
                  case 29:
                    e = d;
                  default:
                    f[1] = e;
                } while (--e > 0);
              }
            }
          }
        }

        void n() {
          for (int j = 6; j < 274; ++j) q();
        }

        public static void main(String[] p) {
          Test r = new Test();
          for (int i = 0; i < 10; i++) r.n();
        }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      remove the first synchronized lock in the testcase

      FREQUENCY : always


      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/data/user/jdk23u/src/hotspot/cpu/x86/macroAssembler_x86.cpp:832), pid=919609, tid=919610
      # fatal error: DEBUG MESSAGE: Fast Unlock lock on stack
      #
      # JRE version: OpenJDK Runtime Environment (23.0) (fastdebug build 23-internal-adhoc.user.jdk23u)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 23-internal-adhoc.user.jdk23u, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x1343df9] MacroAssembler::debug64(char*, long, long*)+0x49

      Stack: [0x0000758da8900000,0x0000758da8a00000], sp=0x0000758da89fe770, free space=1017k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1343df9] MacroAssembler::debug64(char*, long, long*)+0x49 (macroAssembler_x86.cpp:832)
      Registers:
      RAX=0x0000758dab0ec000, RBX=0x0000758daa63179f, RCX=0x0000758daa7363d7, RDX=0x0000000000000340
      RSP=0x0000758da89fe770, RBP=0x0000758da89fe7a0, RSI=0x0000758daa736a48, RDI=0x00000000e0000000
      R8 =0x0000758daa63179f, R9 =0x0000000000000276, R10=0x00000060addb5400, R11=0x000000011e16fad0
      R12=0x0000000000000000, R13=0x000000000000000b, R14=0x000000000000007f, R15=0x0000758da4028850
      RIP=0x0000758da9d43df9, EFLAGS=0x0000000000010246, CSGSFS=0x002b000000000033, ERR=0x0000000000000006
        TRAPNO=0x000000000000000e

            aboldtch Axel Boldt-Christmas
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: