RFR: 8345543: Test serviceability/jvmti/vthread/StopThreadTest/StopThreadTest.java failed: expected JVMTI_ERROR_OPAQUE_FRAME instead of: 0 [v6]
Serguei Spitsyn
sspitsyn at openjdk.org
Tue Jan 21 22:01:42 UTC 2025
On Tue, 21 Jan 2025 21:36:49 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review: new function notify_contended_enter must be private
>
> src/hotspot/share/runtime/objectMonitor.cpp line 510:
>
>> 508: freeze_result result;
>> 509:
>> 510: assert(current->current_pending_monitor() == nullptr, "invariant");
>
> Question on this pre-existent line. So if the callback from monitor_contended_enter calls Java code we might end up here again hitting this assert. In a product build it seems we would eventually hit SOE from recursive calls, I guess that’s the expected behavior?
Thanks. This is a right observation. Yes, it is the expected behavior. It is always dangerous to call Java code from event callbacks. The agent developers have to be careful in writing callbacks, especially because they can cause recursive calls.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23125#discussion_r1924414258
More information about the hotspot-runtime-dev
mailing list