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

Guanqiang Han ghan at openjdk.org
Wed Jan 21 13:55:52 UTC 2026


On Wed, 21 Jan 2026 09:11:54 GMT, Emanuel Peter <epeter 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 seven additional commits since the last revision:
>> 
>>  - revert
>>  - Merge remote-tracking branch 'upstream/master' into 8374807
>>  - narrow lock scope
>>  - Merge remote-tracking branch 'upstream/master' into 8374807
>>  - split long line
>>  - Merge remote-tracking branch 'upstream/master' into 8374807
>>  - fix 8374807
>
> test/hotspot/jtreg/compiler/uncommontrap/TestPrintDiagnosticsWithoutProfileTraps.java line 32:
> 
>> 30:  * @run main/othervm -XX:+TraceDeoptimization -XX:-ProfileTraps
>> 31:  *                   -XX:-TieredCompilation -Xcomp
>> 32:  *                   compiler.uncommontrap.TestPrintDiagnosticsWithoutProfileTraps
> 
> `TraceDeoptimization` is a diagnostic flag. This test will cause issues without `-XX:+UnlockDiagnosticVMOptions`, right? And `ProfileTraps` is debug. So won't this need `-XX:+IgnoreUnrecognizedVMOptions`?
> 
> @iwanowww Did you already run testing on this patch or should I run some?

Hi @eme64 , thanks for the comments.

I think we don’t need to add -XX:+UnlockDiagnosticVMOptions or -XX:+IgnoreUnrecognizedVMOptions here, because the test is guarded by @requires vm.debug. In debug builds, UnlockDiagnosticVMOptions is enabled by default (trueInDebug), so diagnostic flags like TraceDeoptimization are already unlocked, and ProfileTraps (a develop flag) is also available/recognized.

https://github.com/openjdk/jdk/blob/983ae96f60c935aa52f482d21ae6a0d947679541/src/hotspot/share/runtime/globals.hpp#L172-L173

https://github.com/openjdk/jdk/blob/983ae96f60c935aa52f482d21ae6a0d947679541/src/hotspot/share/runtime/globals.hpp#L1188-L1189

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

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


More information about the hotspot-compiler-dev mailing list