RFR: 8355354: C2 crashed: assert(_callee == nullptr || _callee == m) failed: repeated inline attempt with different callee [v3]

Damon Fenacci dfenacci at openjdk.org
Mon Sep 1 07:17:43 UTC 2025


On Fri, 29 Aug 2025 16:50:26 GMT, Damon Fenacci <dfenacci at openjdk.org> wrote:

>> I second that. And it aligns with our effort to make CI queries report stable results.  
>> 
>> (FTR here's what I proposed to Damon privately: "Another alternative is to cache and reuse cg->callee_method() when it becomes non-null. And turn repeated CHA requests (Compile::optimize_inlining) into verification logic.")
>
>> I'm wondering if there might be other reasons that the callee might change, like JVMTI class redefinition
> 
> I guess there could be. For JVMTI we could possibly check for `Method::is_old` or `Method::is_obsolete`? But still, it might not be the only reason...
> 
>> so the easiest fix for class redefinition and CHA would be to ignore the new callee and keep the old one here.
> 
> I'm tempted by setting the callee if it is null and just removing the original assert but @iwanowww suggested moving the assert to the `Ideal` function. I've just pushed a change that should be doing that.

> so the easiest fix for class redefinition and CHA would be to ignore the new callee and keep the old one here.

> Another alternative is to cache and reuse cg->callee_method() when it becomes non-null.

Actually, I changed my mind after looking at Vladimir's advice: this alternative (ignoring the new callee if it is already set) is cleaner and simpler. Thanks @iwanowww and @dean-long for the suggestion.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26441#discussion_r2313085032


More information about the hotspot-compiler-dev mailing list