RFR: 8337317: serviceability/jvmti tests failed with FATAL ERROR in native method: Failed during the GetClassSignature call [v3]

Leonid Mesnik lmesnik at openjdk.org
Tue Aug 27 19:47:06 UTC 2024


On Tue, 27 Aug 2024 01:18:46 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> The fix adds guards against JVMTI_ERROR_WRONG_PHASE error in event handlers
>> 
>> Testing: hotspot/jtreg/serviceability/jvmti on all platforms
>
> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   removed unneeded include

test/hotspot/jtreg/serviceability/jvmti/HiddenClass/libHiddenClassSigTest.cpp line 333:

> 331:   }
> 332: 
> 333:   err = jvmti->CreateRawMonitor("Event Monitor", &event_mon);

Sorry, forgot to mention.
There is a function ' create_raw_monitor(jvmti, name)" in jvmti commo that saves a few more lines:
use
event_mon =  create_raw_monitor(jvmti, "Event Montori");

test/hotspot/jtreg/serviceability/jvmti/VMObjectAlloc/libVMObjectAlloc.cpp line 66:

> 64:   RawMonitorLocker locker(jvmti, jni, event_mon);
> 65: 
> 66:   printf("VMDeath\n");

We shouldn't use printf in tests. It doesn't flush stdout and output might be missed. So it is always unclear if we had vmdeath or not. Please use LOG always.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20699#discussion_r1733423097
PR Review Comment: https://git.openjdk.org/jdk/pull/20699#discussion_r1733426692


More information about the serviceability-dev mailing list