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

[JVMCI] crash accessing nmethod::jvmci_name in CodeCache::aggregate

XMLWordPrintable

      Single crash seen:

      C [libc.so.6+0x15cae0] __strlen_avx2+0xc0
      V [libjvm.so+0xacd22b] CodeCache::aggregate(outputStream*, unsigned long)+0x5b (codeCache.cpp:1878)
      V [libjvm.so+0xb29a8a] CompileBroker::print_heapinfo(outputStream*, char const*, unsigned long)+0x8ea (compileBroker.cpp:2867)

      The only use of strlen in this path is this JVMCI specific code https://github.com/openjdk/jdk/blob/master/src/hotspot/share/code/codeHeapState.cpp#L740

      A bunch of nmethods are being flushed according to the log, which calls CodeBlob::purge which does this:

        if (_mutable_data != blob_end()) {
          os::free(_mutable_data);
          _mutable_data = blob_end(); // Valid not null address
        }

      Since the JVMCI name is in the mutable section this breaks jvmci_name(), resulting in a crash. I'm not sure whether this is a problem with flushing itself or the safety of CodeHeapState::get_cbType not handling methods which are being flushed.

            bulasevich Boris Ulasevich
            never Tom Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: