RFR: 8353596: GenShen: Test TestClone.java#generational-no-coops intermittent timed out

Y. Srinivas Ramakrishna ysr at openjdk.org
Wed Apr 23 22:50:55 UTC 2025


On Wed, 23 Apr 2025 20:17:45 GMT, William Kemper <wkemper at openjdk.org> wrote:

> We've identified another scenario that could result in intermittent timeout failures in jtreg tests. If the cause of the gc cycle is `GCCause::_codecache_GC_threshold`, the thread requesting the GC will not be notified.

This is a safe change. Did you check if there were any other spots that might have this issue? In particular, I see `ShenandoahControlThread::run_service()` which notifies whenever a GC has been requested (which is, I assume, morally equivalent to what's being done here), except we do this whenever we don't cancel the GC -- it could be unnecessary in some cases, I guess, which the original code for Shenandoah was trying to avoid. Not a big deal, but to the extent we can keep the logic similar in both (or shared as much as possible), the fewer such divergence in behavior between the two for the common cases.

It would be good to document more completely this method of `ShenandoahGenerationalControlThread` in terms of who it must notify and when.


  // Executes one GC cycle
  void run_gc_cycle(const ShenandoahGCRequest& request);

(For example, an equally valid change may have been to change the condition for the cause tested at line 277 to include the code cache induced gc cause.)

Change looks good and safe modulo those more general comments. No changes are needed in this PR, but something for us to keep in mind to make this code more robust and maintainable.

-------------

Marked as reviewed by ysr (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24834#pullrequestreview-2788826245


More information about the hotspot-gc-dev mailing list