JDK-8225186 : gc/g1/humongousObjects/TestHumongousClassLoader.java timed out
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 13,18,26
  • Priority: P2
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2019-06-03
  • Updated: 2025-10-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26Unresolved
Related Reports
Relates :  
Description
Loading class HumongousClassLoader
[2019-06-03T10:36:55.726467Z] Gathering output for process 21426
[2019-06-03T10:36:56.641312Z] Waiting for completion for process 21426
[2019-06-03T10:37:41.406604Z] Waiting for completion finished for process 21426
[2019-06-03T10:37:41.492604Z] Gathering output for process 21817
[2019-06-03T10:37:41.525059Z] Waiting for completion for process 21817
[2019-06-03T10:38:08.928703Z] Waiting for completion finished for process 21817
Loading class LargestNonHumongousClass
[2019-06-03T10:38:09.726428Z] Gathering output for process 22010
[2019-06-03T10:38:09.732610Z] Waiting for completion for process 22010
[2019-06-03T10:38:49.926177Z] Waiting for completion finished for process 22010
[2019-06-03T10:38:49.970013Z] Gathering output for process 22173
[2019-06-03T10:38:49.982667Z] Waiting for completion for process 22173
[2019-06-03T10:39:16.103569Z] Waiting for completion finished for process 22173
Loading class SmallestHumongousClass
[2019-06-03T10:39:17.823677Z] Gathering output for process 22808
[2019-06-03T10:39:17.853217Z] Waiting for completion for process 22808
[2019-06-03T10:39:58.776077Z] Waiting for completion finished for process 22808
[2019-06-03T10:39:59.389712Z] Gathering output for process 23415
[2019-06-03T10:39:59.414777Z] Waiting for completion for process 23415
[2019-06-03T10:40:44.853371Z] Waiting for completion finished for process 23415
[2019-06-03T10:40:44.899760Z] Gathering output for process 23999
[2019-06-03T10:40:44.939926Z] Waiting for completion for process 23999
[2019-06-03T10:41:21.240659Z] Waiting for completion finished for process 23999
Loading class OneRegionHumongousClass
[2019-06-03T10:41:24.814534Z] Gathering output for process 24240
[2019-06-03T10:41:24.834228Z] Waiting for completion for process 24240
[2019-06-03T10:42:35.032240Z] Waiting for completion finished for process 24240
[2019-06-03T10:42:39.981380Z] Gathering output for process 24544
[2019-06-03T10:42:39.991806Z] Waiting for completion for process 24544
[2019-06-03T10:44:07.372384Z] Waiting for completion finished for process 24544
[2019-06-03T10:44:07.456386Z] Gathering output for process 24889
[2019-06-03T10:44:07.466738Z] Waiting for completion for process 24889
Timeout refired 480 times
[2019-06-03T10:44:59.192371Z] Waiting for completion finished for process 24889
Loading class TwoRegionHumongousClass
Comments
Note the Xcomp deadlock only applies to the recent tier7 sightings
20-10-2025

The recent failures are the result of a deadlock in Xcomp mode, because of the WhiteBox function g1RunConcurrentGC. We can see the following attempt to compile the WB method: "MainThread" #26 prio=5 tid=0x00007fee34264280 nid=1789528 waiting on condition [0x00007fee181fb000] java.lang.Thread.State: RUNNABLE JavaThread state: _thread_blocked 0x00007fee3d5b43d1 __pthread_cond_wait + 0x161 0x00007fee3c84667c PlatformMonitor::wait(unsigned long) + 0x1ac 0x00007fee3c782f0a Monitor::wait(unsigned long) + 0xca 0x00007fee3bbf7e6a CompileBroker::wait_for_completion(CompileTask*) + 0xfa 0x00007fee3bbfbfa4 CompileBroker::compile_method(methodHandle const&, int, int, int, CompileTask::CompileReason, DirectiveSet*, JavaThread*) + 0x5a4 0x00007fee3bbfc488 CompileBroker::compile_method(methodHandle const&, int, int, int, CompileTask::CompileReason, JavaThread*) + 0x98 0x00007fee3c5767ab CallInfo::set_virtual(Klass*, methodHandle const&, methodHandle const&, int, JavaThread*) + 0x4b 0x00007fee3c5803fd LinkResolver::runtime_resolve_virtual_method(CallInfo&, methodHandle const&, Klass*, Handle, Klass*, bool, bool, JavaThread*) + 0x9d 0x00007fee3c580928 LinkResolver::resolve_virtual_call(CallInfo&, Handle, Klass*, LinkInfo const&, bool, JavaThread*) + 0xa8 0x00007fee3c580d17 LinkResolver::resolve_invokevirtual(CallInfo&, Handle, constantPoolHandle const&, int, JavaThread*) + 0x157 0x00007fee3c58288e LinkResolver::resolve_invoke(CallInfo&, Handle, constantPoolHandle const&, int, Bytecodes::Code, JavaThread*) + 0x12e 0x00007fee3c9e1cbe SharedRuntime::find_callee_info_helper(vframeStream&, Bytecodes::Code&, CallInfo&, JavaThread*) + 0x66e 0x00007fee3c9e813d SharedRuntime::resolve_helper(bool, bool, JavaThread*) + 0x24d 0x00007fee3c9e8f84 SharedRuntime::resolve_opt_virtual_call_C(JavaThread*) + 0x84 0x00007fee2863ee5b <Shared Runtime resolve_opt_virtual_call_blob> 0x00007fee28c551b0 * jdk.test.whitebox.WhiteBox.g1RunConcurrentGC(boolean) bci:13 line:231 (Compiled frame) which is waiting for the CompileBroker to complete. But then we have: "C2 CompilerThread0" #20 daemon prio=9 tid=0x00007fee3415e590 nid=1789367 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE JavaThread state: _thread_blocked 0x00007fee3d5b43d1 __pthread_cond_wait + 0x161 0x00007fee3c84667c PlatformMonitor::wait(unsigned long) + 0x1ac 0x00007fee3c782f0a Monitor::wait(unsigned long) + 0xca 0x00007fee3be9ffe4 should_retry_vm_op(GCCause::Cause, VM_G1TryInitiateConcMark*) [clone .isra.0] + 0x3b4 0x00007fee3bea4366 G1CollectedHeap::try_collect_concurrently(GCCause::Cause, unsigned int, unsigned int) + 0x3b6 0x00007fee3ba9830e ciEnv::register_method(ciMethod*, int, CodeOffsets*, int, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, bool, bool, bool, bool, int) + 0x11e 0x00007fee3c85714d PhaseOutput::install_code(ciMethod*, int, AbstractCompiler*, bool, bool) + 0x16d 0x00007fee3bbe87df Compile::Code_Gen() + 0xabf 0x00007fee3bbedce3 Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*) + 0x2123 0x00007fee3ba07533 C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*) + 0x4a3 0x00007fee3bbfd0f0 CompileBroker::invoke_compiler_on_method(CompileTask*) + 0x780 0x00007fee3bbfe950 CompileBroker::compiler_thread_loop() + 0x530 0x00007fee3c15677b JavaThread::thread_main_inner() + 0x13b 0x00007fee3cbc7146 Thread::call_run() + 0xb6 0x00007fee3c834508 thread_native_entry(Thread*) + 0x128 which is waitng in should_retry_vm_op, which does the following: } else if (op->whitebox_attached()) { // If WhiteBox wants control, wait for notification of a state // change in the controller, then try again. Don't wait for // release of control, since collections may complete while in // control. Note: This won't recognize a STW full collection // while waiting; we can't wait on multiple monitors. LOG_COLLECT_CONCURRENTLY(cause, "whitebox control stall"); MonitorLocker ml(ConcurrentGCBreakpoints::monitor()); if (ConcurrentGCBreakpoints::is_controlled()) { ml.wait(); } return true; So the C2 thread is waiting for the WhiteBox method to complete execution, but the WhiteBox method is stuck waiting to be compiled.
20-10-2025

Stack dump shows compiler thread waiting for GC: Thread 24 (Thread 0x7fefe361a640 (LWP 2430765)): #0 0x00007ff0161e123a in __futex_abstimed_wait_common () from /lib64/libc.so.6 #1 0x00007ff0161e3792 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6 #2 0x00007ff0153d55fc in PlatformMonitor::wait(unsigned long) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #3 0x00007ff0153122ea in Monitor::wait(unsigned long) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #4 0x00007ff014a2e164 in should_retry_vm_op(GCCause::Cause, VM_G1TryInitiateConcMark*) [clone .isra.0] () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #5 0x00007ff014a32446 in G1CollectedHeap::try_collect_concurrently(GCCause::Cause, unsigned int, unsigned int) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #6 0x00007ff0146270ce in ciEnv::register_method(ciMethod*, int, CodeOffsets*, int, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, bool, bool, bool, bool, int) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #7 0x00007ff0153e60cd in PhaseOutput::install_code(ciMethod*, int, AbstractCompiler*, bool, bool) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #8 0x00007ff01477729f in Compile::Code_Gen() () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #9 0x00007ff01477c7a3 in Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #10 0x00007ff0145962f3 in C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #11 0x00007ff01478bbb0 in CompileBroker::invoke_compiler_on_method(CompileTask*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #12 0x00007ff01478d410 in CompileBroker::compiler_thread_loop() () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #13 0x00007ff014ce44bb in JavaThread::thread_main_inner() () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #14 0x00007ff015755a66 in Thread::call_run() () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #15 0x00007ff0153c3488 in thread_native_entry(Thread*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #16 0x00007ff0161e41aa in start_thread () from /lib64/libc.so.6 #17 0x00007ff0162692c0 in clone3 () from /lib64/libc.so.6 Some other threads are then blocked on compilation e.g. Thread 20 (Thread 0x7fefe391d640 (LWP 2430762)): #0 0x00007ff0161e123a in __futex_abstimed_wait_common () from /lib64/libc.so.6 #1 0x00007ff0161e3792 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6 #2 0x00007ff0153d55fc in PlatformMonitor::wait(unsigned long) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #3 0x00007ff0153122ea in Monitor::wait(unsigned long) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #4 0x00007ff01478692a in CompileBroker::wait_for_completion(CompileTask*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #5 0x00007ff01478aa64 in CompileBroker::compile_method(methodHandle const&, int, int, int, CompileTask::CompileReason, DirectiveSet*, JavaThread*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #6 0x00007ff01478af48 in CompileBroker::compile_method(methodHandle const&, int, int, int, CompileTask::CompileReason, JavaThread*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #7 0x00007ff01510c77d in LinkResolver::runtime_resolve_special_method(CallInfo&, LinkInfo const&, methodHandle const&, Handle, JavaThread*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #8 0x00007ff01510d0d6 in LinkResolver::resolve_special_call(CallInfo&, Handle, LinkInfo const&, JavaThread*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #9 0x00007ff014ca6afc in JavaCalls::call_special(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #10 0x00007ff014ca7b52 in JavaCalls::construct_new_instance(InstanceKlass*, Symbol*, Handle, Handle, JavaThread*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #11 0x00007ff014ce6875 in JavaThread::create_system_thread_object(char const*, JavaThread*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #12 0x00007ff0143de84c in AttachListener::init() () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #13 0x00007ff0143e30f3 in AttachListener::is_init_trigger() () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #14 0x00007ff0153aed3d in signal_thread_entry(JavaThread*, JavaThread*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #15 0x00007ff014ce44bb in JavaThread::thread_main_inner() () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #16 0x00007ff015755a66 in Thread::call_run() () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #17 0x00007ff0153c3488 in thread_native_entry(Thread*) () from /opt/mach5/mesos/work_dir/jib-master/install/jdk-26+19-1953/linux-x64-debug.jdk/jdk-26/fastdebug/lib/server/libjvm.so #18 0x00007ff0161e41aa in start_thread () from /lib64/libc.so.6 #19 0x00007ff0162692c0 in clone3 () from /lib64/libc.so.6
12-10-2025

Closing as CNR as the last occurrence has been in July 2021 and has not reproduced since.
20-07-2022

Here's log file snippets for the jdk-18+4-124-tier1 sighting: #section:main ----------messages:(7/821)---------- command: main -Xms256M -Xmx256M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -Xlog:class+load,class+unload=debug:file=TestHumongousClassLoader_Full_GC.log -XX:G1HeapRegionSize=1M gc.g1.humongousObjects.TestHumongousClassLoader FULL_GC reason: User specified action: run main/othervm -Xms256M -Xmx256M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -Xlog:class+load,class+unload=debug:file=TestHumongousClassLoader_Full_GC.log -XX:G1HeapRegionSize=1M gc.g1.humongousObjects.TestHumongousClassLoader FULL_GC Mode: othervm [/othervm specified] Additional options from @modules: --add-modules java.base,java.management --add-exports java.base/jdk.internal.misc=ALL-UNNAMED Timeout information: --- Timeout information end. elapsed time (seconds): 840.75 ----------configuration:(4/111)---------- Boot Layer add modules: java.base java.management add exports: java.base/jdk.internal.misc ALL-UNNAMED ----------System.out:(36/2523)---------- Loading class HumongousClassLoader [2021-06-30T22:55:46.326141996Z] Gathering output for process 4146135 [2021-06-30T22:55:47.971064969Z] Waiting for completion for process 4146135 [2021-06-30T22:56:28.752298533Z] Waiting for completion finished for process 4146135 [2021-06-30T22:56:28.964457950Z] Gathering output for process 4146246 [2021-06-30T22:56:28.988024245Z] Waiting for completion for process 4146246 [2021-06-30T22:57:09.483688181Z] Waiting for completion finished for process 4146246 Loading class LargestNonHumongousClass [2021-06-30T22:57:09.832383877Z] Gathering output for process 4146328 [2021-06-30T22:57:09.840477816Z] Waiting for completion for process 4146328 [2021-06-30T22:58:02.072994803Z] Waiting for completion finished for process 4146328 [2021-06-30T22:58:02.181141337Z] Gathering output for process 4146481 [2021-06-30T22:58:02.181677418Z] Waiting for completion for process 4146481 [2021-06-30T22:58:30.752439701Z] Waiting for completion finished for process 4146481 Loading class SmallestHumongousClass [2021-06-30T22:58:31.247695501Z] Gathering output for process 4146620 [2021-06-30T22:58:31.260107890Z] Waiting for completion for process 4146620 [2021-06-30T22:59:15.263232761Z] Waiting for completion finished for process 4146620 [2021-06-30T22:59:15.329296635Z] Gathering output for process 4146833 [2021-06-30T22:59:15.330152957Z] Waiting for completion for process 4146833 [2021-06-30T23:00:10.895038990Z] Waiting for completion finished for process 4146833 [2021-06-30T23:00:10.971932930Z] Gathering output for process 4147045 [2021-06-30T23:00:10.972558011Z] Waiting for completion for process 4147045 [2021-06-30T23:01:28.703658178Z] Waiting for completion finished for process 4147045 Loading class OneRegionHumongousClass [2021-06-30T23:01:28.836094168Z] Gathering output for process 4147244 [2021-06-30T23:01:28.856399656Z] Waiting for completion for process 4147244 [2021-06-30T23:02:21.661904911Z] Waiting for completion finished for process 4147244 [2021-06-30T23:02:21.745039905Z] Gathering output for process 4147413 [2021-06-30T23:02:21.777829102Z] Waiting for completion for process 4147413 [2021-06-30T23:03:09.315948298Z] Waiting for completion finished for process 4147413 [2021-06-30T23:03:09.392615518Z] Gathering output for process 4147712 [2021-06-30T23:03:09.445533522Z] Waiting for completion for process 4147712 Timeout refired 480 times [2021-06-30T23:03:51.511662380Z] Waiting for completion finished for process 4147712 Loading class TwoRegionHumongousClass ----------System.err:(1/15)---------- STATUS:Passed. ----------rerun:(43/8298)*---------- <snip> result: Error. Program `/opt/mach5/mesos/work_dir/jib-master/install/jdk-18+4-124/linux-aarch64-debug.jdk/jdk-18/fastdebug/bin/java' timed out (timeout set to 480000ms, elapsed time including timeout handling was 840704ms). Please note that the test passed while the timeout handler was running. Here's top output captured by the timeout handler: top - 23:09:36 up 6 days, 18:19, 0 users, load average: 1.32, 4.45, 5.37 Tasks: 236 total, 1 running, 235 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.6 us, 2.3 sy, 0.0 ni, 97.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 47613.1 total, 7756.7 free, 3802.8 used, 36053.6 buff/cache MiB Swap: 4095.9 total, 3992.7 free, 103.2 used. 36336.5 avail Mem This test machine doesn't appear to be overloaded to me...
30-06-2021

Has not reproduced for a long time. Reopen if it reoccurs.
16-07-2020

This looks similar to JDK-8217170, with surprisingly high "waiting for completion" times for the subprocesses. But this failure was on Linux, where JDK-8217170 has appeared to be Windows-specific.
07-06-2019

The test should probably split up into multiple tests (it has multiple @run clauses); also in that test, GC do not take long at all, but doing the class loading (seemingly 90% of time, e.g. 36s out of 40s when run locally).
06-06-2019