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

Crash in nmethod::reloc_string_for

XMLWordPrintable

      Running test/jdk/com/sun/crypto/provider/Cipher/RSA/TestOAEPPadding.java with -XX:CompileCommand=print,java.math.BitSieve::bit crashes:

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007fddd64dc590, pid=436001, tid=436017
      #
      # JRE version: Java(TM) SE Runtime Environment (17.0) (build 17-internal+0-2020-10-05-1305423.tobias...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (17-internal+0-2020-10-05-1305423.tobias..., mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xba3590] nmethod::reloc_string_for(unsigned char*, unsigned char*)+0x240

      Current CompileTask:
      C2: 392 336 4 java.math.BitSieve::bit (7 bytes)

      Stack: [0x00007fdd96c36000,0x00007fdd96d37000], sp=0x00007fdd96d34b20, free space=1018k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xba3590] nmethod::reloc_string_for(unsigned char*, unsigned char*)+0x240
      V [libjvm.so+0xba3a2e] nmethod::has_code_comment(unsigned char*, unsigned char*)+0x10e
      V [libjvm.so+0x65ab4f] event_to_env(void*, char const*, void*)+0x26f

      Crash happens here:

      nmethod::reloc_string_for (this=this@entry=0x7fffe8b02c90, begin=begin@entry=0x7fffe8b02e20 "\351[\223", <incomplete sequence \370>,
          end=end@entry=0x7fffe8b02e24 <incomplete sequence \370>) at /oracle/jdk/open/src/hotspot/share/code/nmethod.cpp:3007
      3007 else obj->print_value_on(&st);
      (gdb) print obj
      $1 = (Metadata *) 0x800f854935b
      (gdb) print *obj
      Cannot access memory at address 0x800f854935b
      (gdb) list
      3002 stringStream st;
      3003 metadata_Relocation* r = iter.metadata_reloc();
      3004 Metadata* obj = r->metadata_value();
      3005 st.print("metadata(");
      3006 if (obj == NULL) st.print("NULL");
      3007 else obj->print_value_on(&st);
      3008 st.print(")");
      3009 return st.as_string();
      3010 }
      3011 case relocInfo::runtime_call_type:

            Unassigned Unassigned
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: