Split Lock Warning with ZGC and -XX:-ClassUnloading on Linux x86_64, JDK 17.0.2

鲁建平 lujianping521 at gmail.com
Tue Sep 10 09:16:51 UTC 2024


HI ALL:

When running JDK 17.0.2 on a Linux x86_64 architecture with ZGC and the JVM
option -XX:-ClassUnloading, I encounter split lock warnings from the Linux
kernel. This issue appears consistently during garbage collection
operations.

Here is the specific warning message from the kernel:
    x86/split lock detection: #AC: ZWorker#0/2154775 took a split_lock trap
at address:     0x7f50c6e0433c

Upon investigating the assembly at this address, I identified the following
instruction:
   0x00007f50c6e0433c <+76>: lock cmpxchg %rcx,(%rbx)

This is part of the function:
    Dump of assembler code for function
_ZN15ZMarkOopClosure6do_oopEPP7oopDesc:
 0x00007f50c6e0433c <+76>: lock cmpxchg %rcx,(%rbx)

The split lock warning occurs during the execution of the ZWorker thread,
which is responsible for concurrent marking in ZGC. The warning seems to be
triggered specifically when class unloading is disabled with
-XX:-ClassUnloading.

Environment:
JDK Version: OpenJDK 17.0.2
GC: ZGC with -XX:-ClassUnloading
OS: Linux x86_64

 I would like to understand if this behavior is expected when class
unloading is disabled or if there are any recommended fixes or workarounds
for avoiding the split lock issue during concurrent garbage collection.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20240910/af970946/attachment.htm>


More information about the hotspot-gc-dev mailing list