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

VMError::print_native_stack needs to be more robust

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • 22
    • 22
    • hotspot

      When used in a detailed logging environment for classloading, the following crash was observed:

      https://github.com/openjdk/jdk/pull/14553

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/Users/dnsimon/dev/jdk-jdk/open/src/hotspot/share/code/codeCache.inline.hpp:49), pid=46945, tid=24579
      # assert(cb != nullptr) failed: must be

      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.dylib+0x138828c] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x4bc (codeCache.inline.hpp:49)
      V [libjvm.dylib+0x1388c28] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, char*)+0x40
      V [libjvm.dylib+0x6a9dd8] report_vm_error(char const*, int, char const*, char const*, ...)+0x6c
      V [libjvm.dylib+0x3832f0] frame::frame(long*, long*, long*, unsigned char*)+0xfc
      V [libjvm.dylib+0x11610c4] frame::sender_raw(RegisterMap*) const+0x1bc
      V [libjvm.dylib+0x1382954] next_frame(frame, Thread*)+0x214
      V [libjvm.dylib+0x1382660] VMError::print_native_stack(outputStream*, frame, Thread*, bool, int, char*, int)+0x1dc
      V [libjvm.dylib+0x9b6f14] InstanceKlass::print_class_load_cause_logging() const+0x220
      V [libjvm.dylib+0x9b6664] InstanceKlass::print_class_load_logging(ClassLoaderData*, ModuleEntry const*, ClassFileStream const*) const+0x6c
      V [libjvm.dylib+0x596204] ClassFileParser::fill_instance_klass(InstanceKlass*, bool, ClassInstanceInfo const&, JavaThread*)+0x1a98
      V [libjvm.dylib+0x594408] ClassFileParser::create_instance_klass(bool, ClassInstanceInfo const&, JavaThread*)+0x88
      V [libjvm.dylib+0xd9ffa0] KlassFactory::create_from_stream(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const&, JavaThread*)+0x1f4
      V [libjvm.dylib+0x5a6038] ClassLoader::load_class(Symbol*, bool, JavaThread*)+0x3f4
      V [libjvm.dylib+0x1269d28] SystemDictionary::load_instance_class_impl(Symbol*, Handle, JavaThread*)+0x838
      V [libjvm.dylib+0x1267260] SystemDictionary::load_instance_class(Symbol*, Handle, JavaThread*)+0x28
      V [libjvm.dylib+0x126639c] SystemDictionary::resolve_instance_class_or_null(Symbol*, Handle, Handle, JavaThread*)+0xb34
      V [libjvm.dylib+0x1266dd8] SystemDictionary::resolve_super_or_fail(Symbol*, Symbol*, Handle, Handle, bool, JavaThread*)+0x5fc
      V [libjvm.dylib+0x583514] ClassFileParser::parse_interfaces(ClassFileStream const*, int, ConstantPool*, bool*, JavaThread*)+0x740
      V [libjvm.dylib+0x5975a4] ClassFileParser::parse_stream(ClassFileStream const*, JavaThread*)+0xae4
      V [libjvm.dylib+0x596980] ClassFileParser::ClassFileParser(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const*, ClassFileParser::Publicity, JavaThread*)+0x260
      V [libjvm.dylib+0xd9ff6c] KlassFactory::create_from_stream(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const&, JavaThread*)+0x1c0
      V [libjvm.dylib+0x5a6038] ClassLoader::load_class(Symbol*, bool, JavaThread*)+0x3f4
      V [libjvm.dylib+0x1269d28] SystemDictionary::load_instance_class_impl(Symbol*, Handle, JavaThread*)+0x838
      V [libjvm.dylib+0x1267260] SystemDictionary::load_instance_class(Symbol*, Handle, JavaThread*)+0x28
      V [libjvm.dylib+0x126639c] SystemDictionary::resolve_instance_class_or_null(Symbol*, Handle, Handle, JavaThread*)+0xb34
      V [libjvm.dylib+0x1176624] SignatureStream::as_klass(Handle, Handle, SignatureStream::FailureMode, JavaThread*)+0x60
      V [libjvm.dylib+0xf607c0] Method::load_signature_classes(methodHandle const&, JavaThread*)+0x190
      V [libjvm.dylib+0x61e7fc] CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, DirectiveSet*, JavaThread*)+0x55c
      V [libjvm.dylib+0x61e278] CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, JavaThread*)+0xe0
      V [libjvm.dylib+0x5f9b1c] CompilationPolicy::event(methodHandle const&, methodHandle const&, int, int, CompLevel, CompiledMethod*, JavaThread*)+0x418
      V [libjvm.dylib+0x49567c] Runtime1::counter_overflow(JavaThread*, int, Method*)+0x4a8
      v ~RuntimeStub::counter_overflow Runtime1 stub 0x00000001141cf97c

            dholmes David Holmes
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: