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

java/lang/instrument/NativeMethodPrefixAgent.java hit "fatal error: Illegal class file encountered."

XMLWordPrintable

      Test java/lang/instrument/NativeMethodPrefixAgent.java when executing with virtual threads factory might fails with

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/System/Volumes/Data/mesos/work_dir/slaves/741e9afd-8c02-45c3-b2e2-9db1450d0832-S64589/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/7490497e-4932-44ca-90ed-5a5abd3b262a/runs/bd940936-9663-4aeb-aa5b-23a1fdff8525/workspace/open/src/hotspot/share/oops/generateOopMap.cpp:2165), pid=64966, tid=30979
      # fatal error: Illegal class file encountered. Try running with -Xverify:all in method wrapped_tr1_wrapped_tr2_poll
      #
      # JRE version: Java(TM) SE Runtime Environment (21.0) (fastdebug build 21-internal-LTS-2023-04-28-2221559.leonid.mesnik.jdk-ttf-build)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 21-internal-LTS-2023-04-28-2221559.leonid.mesnik.jdk-ttf-build, mixed mode, sharing, tiered, compressed class ptrs, z gc, bsd-amd64)
      # Core dump will be written. Default location: core.64966
      #

      Stack: [0x000070000df22000,0x000070000e022000], sp=0x000070000e01f090, free space=1012k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.dylib+0x13ff6c9] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x739 (generateOopMap.cpp:2165)
      V [libjvm.dylib+0x7a75c2] report_fatal(VMErrorType, char const*, int, char const*, ...)+0x182
      V [libjvm.dylib+0x9f71ca] GenerateOopMap::error_work(char const*, __va_list_tag*)+0x14a
      V [libjvm.dylib+0x9f0799] GenerateOopMap::report_error(char const*, ...)+0x89
      V [libjvm.dylib+0x9f4e21] GenerateOopMap::ppload(CellTypeState*, int)+0x41
      V [libjvm.dylib+0x9f2666] GenerateOopMap::interp_bb(BasicBlock*)+0x146
      V [libjvm.dylib+0x9f1879] GenerateOopMap::do_interpretation()+0xc9
      V [libjvm.dylib+0x9f6ed1] GenerateOopMap::compute_map(Thread*)+0x3b1
      V [libjvm.dylib+0x106a07e] OopMapForCacheEntry::compute_map(Thread*)+0x6e
      V [libjvm.dylib+0x106b383] OopMapCacheEntry::fill(methodHandle const&, int)+0xe3
      V [libjvm.dylib+0x106ca52] OopMapCache::compute_one_oop_map(methodHandle const&, int, InterpreterOopMap*)+0x72
      V [libjvm.dylib+0xfbfe12] Method::mask_for(int, InterpreterOopMap*)+0xa2
      V [libjvm.dylib+0x8c3b6a] frame::oops_interpreted_do(OopClosure*, RegisterMap const*, bool) const+0xa0a
      V [libjvm.dylib+0xaff6f3] JavaThread::oops_do_frames(OopClosure*, CodeBlobClosure*)+0x163
      V [libjvm.dylib+0x1339a07] Thread::oops_do(OopClosure*, CodeBlobClosure*)+0xc7
      V [libjvm.dylib+0x14c3253] ZJavaThreadsIterator::apply(ThreadClosure*)+0x183
      V [libjvm.dylib+0x14c374d] ZRootsIterator::apply(OopClosure*, CLDClosure*, ThreadClosure*, NMethodClosure*)+0xbd
      V [libjvm.dylib+0x148b8ff] ZHeapIterator::object_iterate(ObjectClosure*, unsigned int)+0x14f
      V [libjvm.dylib+0x1489800] ZHeap::object_iterate(ObjectClosure*, bool)+0x80
      V [libjvm.dylib+0xa33d70] HeapInspection::find_instances_at_safepoint(Klass*, GrowableArray<oop>*)+0xc0
      V [libjvm.dylib+0x13491b0] ConcurrentLocksDump::dump_at_safepoint()+0x290
      V [libjvm.dylib+0x134fd37] Threads::print_on(outputStream*, bool, bool, bool, bool)+0xf7
      V [libjvm.dylib+0x1406462] VM_PrintThreads::doit()+0x22
      V [libjvm.dylib+0x1405cea] VM_Operation::evaluate()+0x1ba
      V [libjvm.dylib+0x1430b1f] VMThread::evaluate_operation(VM_Operation*)+0x19f
      V [libjvm.dylib+0x14316a3] VMThread::inner_execute(VM_Operation*)+0x303
      V [libjvm.dylib+0x1430785] VMThread::loop()+0xa5
      V [libjvm.dylib+0x143056e] VMThread::run()+0xae
      V [libjvm.dylib+0x133900f] Thread::call_run()+0x17f
      V [libjvm.dylib+0x107c50f] thread_native_entry(Thread*)+0x14f
      C [libsystem_pthread.dylib+0x6259] _pthread_start+0x7d
      C [libsystem_pthread.dylib+0x1c7b] thread_start+0xf
      JavaThread 0x00007fcad60fa610 (nid = 33559) was being processed
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j sun.nio.ch.KQueue.wrapped_tr0_wrapped_tr1_wrapped_tr2_poll(IJIJ)I+0 java.base@21-internal
      j sun.nio.ch.KQueue.wrapped_tr1_wrapped_tr2_poll(IJIJ)I+14 java.base@21-internal
      j sun.nio.ch.KQueue.wrapped_tr2_poll(IJIJ)I+11 java.base@21-internal
      j sun.nio.ch.KQueue.poll(IJIJ)I+11 java.base@21-internal
      j sun.nio.ch.KQueuePoller.poll(I)I+13 java.base@21-internal
      j sun.nio.ch.Poller.poll()I+2 java.base@21-internal
      j sun.nio.ch.Poller.pollLoop()V+1 java.base@21-internal
      j sun.nio.ch.Poller$$Lambda+0x0000000801073978.run()V+4 java.base@21-internal
      j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@21-internal
      j java.lang.Thread.run()V+19 java.base@21-internal
      j jdk.internal.misc.InnocuousThread.run()V+20 java.base@21-internal
      v ~StubRoutines::call_stub 0x0000000120705d1a
      VM_Operation (0x000070000ebc5dd8): PrintThreads, mode: safepoint, requested by thread 0x00007fcab600ce10

      To reproduce run:

        make -- run-test JTREG_VERBOSE=all JTREG_RETAIN=all JTREG_TEST_THREAD_FACTORY=Virtual TEST=java/lang/instrument/NativeMethodPrefixAgent.java

            sspitsyn Serguei Spitsyn
            lmesnik Leonid Mesnik
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: