-
Bug
-
Resolution: Fixed
-
P3
-
14, 15
-
b20
Concurrent class unloading and heap iteration can run concurrently, they both can iterate nmethods.
Current implementation only allow one iterator, but there is no reason for not allowing multiple iterators.
I am surprised that we have yet seen test failures. But after I twisted concurrent weak root processing a bit, I saw the failure.
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/zgu/ws/jdk/src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp:471), pid=1970, tid=1977
# assert(!iteration_in_progress()) failed: Already in progress
#
# JRE version: OpenJDK Runtime Environment (15.0) (fastdebug build 15-internal+0-adhoc.zgu.jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 15-internal+0-adhoc.zgu.jdk, mixed mode, tiered, shenandoah gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1642304] ShenandoahNMethodTable::snapshot_for_iteration()+0xb4
#
Current implementation only allow one iterator, but there is no reason for not allowing multiple iterators.
I am surprised that we have yet seen test failures. But after I twisted concurrent weak root processing a bit, I saw the failure.
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/zgu/ws/jdk/src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp:471), pid=1970, tid=1977
# assert(!iteration_in_progress()) failed: Already in progress
#
# JRE version: OpenJDK Runtime Environment (15.0) (fastdebug build 15-internal+0-adhoc.zgu.jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 15-internal+0-adhoc.zgu.jdk, mixed mode, tiered, shenandoah gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1642304] ShenandoahNMethodTable::snapshot_for_iteration()+0xb4
#