-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Hi,
I'm currently investigating a case where the heap dump was not written by the jvmkill agent. The problem is that the dumpHeap() method fails and I get an error of the form:
HeapDump action failed: JNI call failed: call to method_id 0x0... on object 0x0... with variable arguments "<path>", 1 failed
First I though that this would be caused by an exception during the call to dumpHeap(), but then there should be the exception message included too. But as I inspected the code more closely, I found that the void method dumpHeap() is called via CallObjectMethodA, which is reserved for method which return objects:
jni_env.call_object_method_with_cstring_jboolean(hotspot_diagnostic_mxbean, dump_heap_method_id, resolved_heap_dump_path_cstring.clone(), ::jvmti::JNI_TRUE as u8)?;
And since you check if the 'result' of the CallObjectMethodA call is null (and treat that as an error), the error may be just caused by the random value in the register used to return values?
Best regards,
Ralf