RFR: 8322962: Upcall stub might go undetected when freezing frames

Patricio Chilano Mateo pchilanomate at openjdk.org
Thu Feb 22 14:44:13 UTC 2024


Please review this simple fix. There is a missing push_cont_fastpath()/pop_cont_fastpath() around the call to Java in the upcall stub. Because of this, if from that upcall a virtual thread tries to yield, and all the other methods in the stack are compiled, we will incorrectly take the freeze fast path and freeze everything in the stack including the native frames. By forcing the slow path instead we will identify the upcall stub and pin the vthread.

The issue can be easily reproduced by running the modified version of test GetStackTraceALotWhenPinned.java included in this patch. I also tested the fix by running tiers1-3 in mach5. 

Thanks,
Patricio

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

Commit messages:
 - v1

Changes: https://git.openjdk.org/jdk/pull/17964/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17964&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8322962
  Stats: 21 lines in 5 files changed: 18 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/17964.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17964/head:pull/17964

PR: https://git.openjdk.org/jdk/pull/17964


More information about the hotspot-dev mailing list