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
Thu Jan 22 01:56:52 UTC 2026
On Wed, 21 Jan 2026 16:51:48 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> 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
>
> @hgqxjj Hmm I see. I'm not a fan of using `@requires vm.debug`, because it means that your test is not run in product, and sometimes bugs only show up in product.
>
> It's also not great that we have to run a whole JVM startup with `-Xcomp`, compiling EVERYTHING, and blocking for every compilation. We should only use `-Xcomp` in combination with a fairly restricted `compileonly`. Otherwise, we just waste a lot of compute resources.
>
> @iwanowww What is your opinion on this?
@eme64 Thanks for the feedback.
On @requires vm.debug: I’d like to keep it for this reproducer. ProfileTraps is the key knob here: the failure requires ProfileTraps=false (create_if_missing = ProfileTraps, so get_method_data(..., false) may return NULL). Since ProfileTraps is a develop_pd flag and not settable on product builds, this reproducer has to run on a non-product VM (i.e., a debug VM).
On -Xcomp: agreed. I’ll keep it but restrict it with -XX:CompileCommand=compileonly,... so we only compile the relevant method(s).
If that sounds reasonable, I’ll proceed with just the compileonly tightening.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29147#discussion_r2715016925
More information about the hotspot-compiler-dev
mailing list