Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8352131 [REDO] C2: Print compilation bailouts with PrintCompilation compile command
  3. JDK-8352110

[BACKOUT] C2: Print compilation bailouts with PrintCompilation compile command

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P2 P2
    • 25
    • 25
    • hotspot
    • b15
    • x86_64, aarch64
    • linux

      Converted this to a backout to address all problems properly.

      ---------
      Original report:

      The make fails log snippet from gcc14 with enable asan:
      ==184198==ERROR: AddressSanitizer: heap-use-after-free on address 0x5130000e7691 at pc 0xffff77b089e8 bp 0xffff46eeae90 sp 0xffff46eeaea8
      READ of size 1 at 0x5130000e7691 thread T16 (C1 CompilerThre)
          #0 0xffff77b089e4 in CompileBroker::invoke_compiler_on_method(CompileTask*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:2377
          #1 0xffff77b09e48 in CompileBroker::compiler_thread_loop() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1975
          #2 0xffff78d2c9a4 in JavaThread::thread_main_inner() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaThread.cpp:776
          #3 0xffff78d49c28 in JavaThread::run() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaThread.cpp:761
          #4 0xffff7b532ed8 in Thread::call_run() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/thread.cpp:231
          #5 0xffff7a3f4b50 in thread_native_entry /tmp/tone/run/jtreg/jdk-repo/src/hotspot/os/linux/os_linux.cpp:877
          #6 0xffff8e3e0c24 in asan_thread_start ../../.././libsanitizer/asan/asan_interceptors.cpp:234
          #7 0xffff8da37f70 in start_thread (/lib64/libpthread.so.0+0x7f70) (BuildId: 0d3d7285cc0e5a0a08cdc7580b1719454ac2f2a8)
          #8 0xffff8daf8f98 in thread_start (/lib64/libc.so.6+0x28f98) (BuildId: aabb4443d2eba4b2527cdf66d7295d1d61db58b0)

      0x5130000e7691 is located 273 bytes inside of 378-byte region [0x5130000e7580,0x5130000e76fa)
      freed by thread T16 (C1 CompilerThre) here:
          #0 0xffff8e45632c in free ../../.././libsanitizer/asan/asan_malloc_linux.cpp:52
          #1 0xffff77b3fc18 in CHeapObjBase::operator delete(void*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.hpp:172
          #2 0xffff77b3fc18 in CHeapObj<(MemTag)7>::operator delete(void*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.hpp:217
          #3 0xffff77b3fc18 in DirectivesStack::release(DirectiveSet*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:745
          #4 0xffff77b05870 in CompileBroker::invoke_compiler_on_method(CompileTask*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:2343
          #5 0xffff77b09e48 in CompileBroker::compiler_thread_loop() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1975
          #6 0xffff78d2c9a4 in JavaThread::thread_main_inner() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaThread.cpp:776
          #7 0xffff78d49c28 in JavaThread::run() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaThread.cpp:761
          #8 0xffff7b532ed8 in Thread::call_run() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/thread.cpp:231
          #9 0xffff7a3f4b50 in thread_native_entry /tmp/tone/run/jtreg/jdk-repo/src/hotspot/os/linux/os_linux.cpp:877
          #10 0xffff8e3e0c24 in asan_thread_start ../../.././libsanitizer/asan/asan_interceptors.cpp:234
          #11 0xffff8daf8f98 in thread_start (/lib64/libc.so.6+0x28f98) (BuildId: aabb4443d2eba4b2527cdf66d7295d1d61db58b0)

      previously allocated by thread T1 here:
          #0 0xffff8e457448 in malloc ../../.././libsanitizer/asan/asan_malloc_linux.cpp:69
          #1 0xffff7a3c9540 in os::malloc(unsigned long, MemTag, NativeCallStack const&) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/os.cpp:657
          #2 0xffff76bda738 in AllocateHeap(unsigned long, MemTag, NativeCallStack const&, AllocFailStrategy::AllocFailEnum) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.cpp:41
          #3 0xffff76bda738 in AllocateHeap(unsigned long, MemTag, AllocFailStrategy::AllocFailEnum) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.cpp:51
          #4 0xffff77b3c5ac in CHeapObjBase::operator new(unsigned long, MemTag) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.hpp:127
          #5 0xffff77b3c5ac in CHeapObj<(MemTag)7>::operator new(unsigned long) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.hpp:181
          #6 0xffff77b3c5ac in DirectiveSet::clone(DirectiveSet const*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:616
          #7 0xffff77b4559c in DirectiveSetPtr::cloned() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:359
          #8 0xffff77b4559c in DirectiveSet::compilecommand_compatibility_init(methodHandle const&) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:431
          #9 0xffff77b499c8 in DirectiveSet::compilecommand_compatibility_init(methodHandle const&) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:385
          #10 0xffff77b499c8 in DirectivesStack::getMatchingDirective(methodHandle const&, AbstractCompiler*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:787
          #11 0xffff77b15cc0 in CompileTask::initialize(int, methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, bool) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileTask.cpp:123
          #12 0xffff77aff7fc in CompileBroker::create_compile_task(CompileQueue*, int, methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, bool) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1639
          #13 0xffff77aff7fc in CompileBroker::compile_method_base(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, bool, Thread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1326
          #14 0xffff77b02168 in CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, DirectiveSet*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1487
          #15 0xffff77b03cdc in CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1360
          #16 0xffff77a1e2e8 in CompilationPolicy::compile(methodHandle const&, int, CompLevel, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilationPolicy.cpp:815
          #17 0xffff77a21f20 in CompilationPolicy::method_invocation_event(methodHandle const&, methodHandle const&, CompLevel, nmethod*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilationPolicy.cpp:1151
          #18 0xffff77a2a66c in CompilationPolicy::event(methodHandle const&, methodHandle const&, int, int, CompLevel, nmethod*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilationPolicy.cpp:736
          #19 0xffff78c207f8 in InterpreterRuntime::frequency_counter_overflow_inner(JavaThread*, unsigned char*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/interpreter/interpreterRuntime.cpp:1074
          #20 0xffff78c21054 in InterpreterRuntime::frequency_counter_overflow(JavaThread*, unsigned char*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/interpreter/interpreterRuntime.cpp:1023

            chagedorn Christian Hagedorn
            syan Sendao Yan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: