RFR: 8352414: JFR: JavaMonitorDeflateEvent crashes when deflated monitor object is dead [v2]

Aleksey Shipilev shade at openjdk.org
Fri Mar 21 12:46:07 UTC 2025


On Fri, 21 Mar 2025 12:05:46 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> I looked at it before doing the patch, and I don't think the event-specific fields are default-initialized. In fact, if you skip these, JFR code would assert:
>> 
>> 
>> # A fatal error has been detected by the Java Runtime Environment:
>> #
>> #  Internal Error (/home/shade/trunks/jdk/build/linux-x86_64-server-fastdebug/hotspot/variant-server/gensrc/jfrfiles/jfrEventClasses.hpp:1181), pid=279828, tid=279849
>> #  assert(verify_field_bit(0)) failed: Attempting to write an uninitialized event field: _monitorClass
>
> That seems like a bug in the event constructor to me.

Well, the asserts make it look this is not accidental: do the writes once with the actual values, maybe?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24121#discussion_r2007503794


More information about the hotspot-dev mailing list