RFR: 8374807: Crash in MethodData::extra_data_lock()+0x0 when running -XX:+TraceDeoptimization -XX:-ProfileTraps -XX:-TieredCompilation -Xcomp -version [v2]

Vladimir Ivanov vlivanov at openjdk.org
Fri Jan 16 20:36:18 UTC 2026


On Thu, 15 Jan 2026 18:33:29 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Guanqiang Han has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>> 
>>  - split long line
>>  - Merge remote-tracking branch 'upstream/master' into 8374807
>>  - fix 8374807
>
> src/hotspot/share/runtime/deoptimization.cpp line 2161:
> 
>> 2159:                                 Mutex::_no_safepoint_check_flag);
>> 2160: 
>> 2161:       ttyLocker ttyl;
> 
> Does the code still need `ttyLocker`? 
> 
> There's only one usage of `tty` and it prints all accumulated info all at once. `xtty` already annotates output with thread info. So, I'd assume that moving `trap_mdo->extra_data_lock()` locker to  `trap_mdo` accesses  should solve the problem as well. 
> 
> (I'm not sure whether a `ttyLocker` is needed or not to avoid interleaving during `tty->print_raw(st.freeze());`, but `ttyLocker` can be placed right before it.)

I take my suggestion back. Sorry for the confusion.

The code in question populates complex XML structure, so locking is needed to ensure the resulting XML is well-formed. 

Your previous version looks fine to me.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29147#discussion_r2699884865


More information about the hotspot-compiler-dev mailing list