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

assert ((klass)->trace_id()) & ((JfrTraceIdEpoch::method_and_class_in_use_this_epoch_bits()))) != 0 in ObjectSampleCheckpoint::add_to_leakp_set

    XMLWordPrintable

Details

    • jfr
    • b29

    Backports

      Description

        I got this when running KitchensinkCDSSanity.java

        # assert((((((klass)->trace_id()) & ((JfrTraceIdEpoch::method_and_class_in_use_this_epoch_bits()))) != 0))) failed: invariant

        Current thread (0x00007f68f0041800): JavaThread "JFR Recorder Thread" daemon [_thread_in_vm, id=25126, stack(0x00007f68458cd000,0x00007f68459ce000)]

        Stack: [0x00007f68458cd000,0x00007f68459ce000], sp=0x00007f68459cc9c0, free space=1022k
        Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x120bb4c] ObjectSampleCheckpoint::add_to_leakp_set(InstanceKlass const*, unsigned long)+0x2fc
        V [libjvm.so+0x120bebe] ObjectSampleCheckpoint::write_stacktrace(JfrStackTrace const*, JfrCheckpointWriter&)+0xfe
        V [libjvm.so+0x120cb98] StackTraceBlobInstaller::install(ObjectSample*)+0x1e8
        V [libjvm.so+0x120d138] ObjectSampleCheckpoint::on_rotation(ObjectSampler const*, JfrStackTraceRepository&)+0x128
        V [libjvm.so+0xcaa9b4] JfrRecorderService::pre_safepoint_write()+0x114
        V [libjvm.so+0xcaaeb2] JfrRecorderService::write()+0xd2
        V [libjvm.so+0xcab1af] JfrRecorderService::finalize_current_chunk()+0x3f
        V [libjvm.so+0xcac411] JfrRecorderService::rotate(int)+0x121
        V [libjvm.so+0xcb18ca] recorderthread_entry(JavaThread*, Thread*)+0x15a
        V [libjvm.so+0x1520866] JavaThread::thread_main_inner()+0x226
        V [libjvm.so+0x15269d6] Thread::call_run()+0xf6
        V [libjvm.so+0x125026e] thread_native_entry(Thread*)+0x10e

        gdb shows:

        klass->trace_id() == 104727040
        JfrTraceIdEpoch::method_and_class_in_use_this_epoch_bits() == 5
        104727040 & 5 == 0

        Assertion is here:
        http://hg.openjdk.java.net/jdk/jdk/file/5ac19bd3a1e2/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp#l122

        120 inline void JfrTraceId::set_leakp(const Klass* klass, const Method* method) {
        121 assert(klass != NULL, "invariant");
        122 assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant");
        123 assert(method != NULL, "invariant");
        124 assert(klass == method->method_holder(), "invariant");
        125 if (METHOD_FLAG_NOT_USED_THIS_EPOCH(method)) {
        126 // the method is already logically tagged, just like the klass,


        Attachments

          Issue Links

            Activity

              People

                mgronlun Markus Grönlund
                iklam Ioi Lam
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: