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

Alex Menkov amenkov at openjdk.org
Tue Aug 27 23:12:46 UTC 2024


On Tue, 27 Aug 2024 19:38:53 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> 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");

I saw the function, but don't see much sense in it.
On error it just return null (so need to check result anyway) and it's not possible to get jvmti error

> 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.

Fixed (also replaced pre-existing printf with LOG in the test)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20699#discussion_r1733613573
PR Review Comment: https://git.openjdk.org/jdk/pull/20699#discussion_r1733626523


More information about the serviceability-dev mailing list