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

Native disassembler implementation may be not thread-safe

XMLWordPrintable

    • b105

        I was following the instructions from
         https://wikis.oracle.com/display/HotSpotInternals/PrintAssembly

        On recent jdk9-dev forest, with libhsdis-amd64.so from either Kenai, or self-built, running any application with
        -XX:+PrintAssembly -XX:+PrintSignatureHandlers (both seem to be required) crashes the VM. Seems to
        always happen in C1 compiler thread:

        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/home/shade/trunks/jdk9-dev/hotspot/src/share/vm/code/relocInfo.cpp:151), pid=2445, tid=140111280850688
        # assert(limit == __null || limit <= nm->code_end()) failed: in bounds

        hs_err_* stacktrace:

        Current thread (0x00007fb70c16a000): JavaThread "C1 CompilerThread3" daemon [_thread_in_vm, id=1112, stack(0x00007fb6c59dd000,0x00007fb6c5ade000)]

        Stack: [0x00007fb6c59dd000,0x00007fb6c5ade000], sp=0x00007fb6c5adb060, free space=1016k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x103360d] VMError::report_and_die()+0x15d
        V [libjvm.so+0x735d4b] report_vm_error(char const*, int, char const*, char const*)+0x7b
        V [libjvm.so+0xe81858] RelocIterator::initialize(nmethod*, unsigned char*, unsigned char*)+0x168
        V [libjvm.so+0xd3b619] nmethod::reloc_string_for(unsigned char*, unsigned char*)+0x59
        V [libjvm.so+0xd3bfe9] nmethod::print_code_comment_on(outputStream*, int, unsigned char*, unsigned char*)+0x449
        V [libjvm.so+0x7c949c] decode_env::handle_event(char const*, unsigned char*)+0x13c
        C [libhsdis-amd64.so+0x58779] decode_instructions+0x74c
        J 12 C1 java.lang.String.indexOf(II)I (70 bytes) @ 0x00007fb6fcb1d610 [0x00007fb6fcb1d7e0+0xfffffe30]

        [error occurred during error reporting (printing native stack), id 0xe0000000]


        Current CompileTask:
        C1: 609 12 3 java.lang.String::indexOf (70 bytes)


        Happens very frequently in fastdebug. No crashes in release, but that might be just because we stripped the sanity checks there.

              vlivanov Vladimir Ivanov
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: