-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
void dumpHeap(String, boolean) is called via CallObjectMethodA and not CallVoidMethodA #18
Comments
@schmelter-sap Do you have more context you can share here? A couple of questions come to mind...
I hear what you're saying here...
and here
It seems plausible. If I can get the info above, I'll try to dig in a little more & reproduce. If I can't reproduce, perhaps we could look at adding a bit more logging to capture more details about what is happening during the failure. |
Hi, as can be seen in
The problem itself I've only seen once, so it would be hard to reproduce it. The version was jvmkill-1.16.0.RELEASE-trusty. Best regards, |
We can certainly fix that call so it's following the spec. Hopefully, that will prevent the issue from occurring again. Not being able to reproduce it, we can't really guarantee anything beyond making the code follow the spec more closely. Thanks for the follow-up and additional details. |
Hi @dmikusa-pivotal, as we see this more often in CF@SAP, is there a date when this will be fixed? Kind regards, |
We don't have this scheduled at the moment. The code changes are small but CI for this project is not functional, so testing and cutting a release will likely require a lot of effort. The JVM kill agent isn't really necessary anymore either. The JVM has flags for most of its functionality, like terminating on OOME and writing heap dumps. I'd be curious to get your thoughts on deprecating JVM kill agent eventually removing it from the buildpack. The cloud-native Java buildpacks stopped using jvmkill agent a while ago and it has been a smooth transition. Roughly speaking a plan like:
|
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
The text was updated successfully, but these errors were encountered: