We see very long class unloading times with Generational ZGC in fastdebug builds. MacOS spindumps show that it is caused by Metaspace verification code.
I think the main problem is that many of the verification operations are performed at every operation (add, remove, split, merge) and the individual operation verifies much more than a constant number of chunks. This seems to give a quadratic complexity which blows up if you don't class unload often enough.
With Generational ZGC we can see instances of up to minutes long class unloading times. This seems to cause secondary problems because reference processing is blocked (runs around the same time as class unloading). When reference processing is blocked tests that create a lot of files can start to use up all file descriptors.
I think the main problem is that many of the verification operations are performed at every operation (add, remove, split, merge) and the individual operation verifies much more than a constant number of chunks. This seems to give a quadratic complexity which blows up if you don't class unload often enough.
With Generational ZGC we can see instances of up to minutes long class unloading times. This seems to cause secondary problems because reference processing is blocked (runs around the same time as class unloading). When reference processing is blocked tests that create a lot of files can start to use up all file descriptors.