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
8278330: dump stack trace if the jvmti test nsk/jvmti/GetThreadState/thrstat002 is failed with wrong thread state #6735
Conversation
…State/thrstat002 is failed with wrong thread state
|
Webrevs
|
|
||
cname = get_method_class_name(jvmti, jni, method); | ||
|
||
err = jvmti->GetMethodName(method, &mname, &msign, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to deallocate returned mname/msig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
err = jvmti->GetMethodDeclaringClass(method, &klass); | ||
check_jvmti_status(jni, err, "get_method_class_name: error in JVMTI GetMethodDeclaringClass"); | ||
|
||
err = jvmti->GetClassSignature(klass, &cname, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to deallocate returned strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
char* msign = NULL; | ||
jvmtiError err; | ||
|
||
cname = get_method_class_name(jvmti, jni, method); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to deallocate returned string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
@@ -48,6 +48,104 @@ static jint state[] = { | |||
JVMTI_THREAD_STATE_IN_OBJECT_WAIT | |||
}; | |||
|
|||
#define DBG 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that DBG really needs to be disabled, just print info anytime when test fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used these ifdef's to easily identify the debugging/utility fragments in a case we want to isolate it in test library. It does not harm anyway. Okay, I've decided to replace '#ifdef DBG'
with '#if 1'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@sspitsyn This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 57 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
/integrate |
Going to push as commit 3893f4f.
Your commit was automatically rebased without conflicts. |
This is a fix for sub-task of:
8271065: vmTestbase/nsk/jvmti/GetThreadState/thrstat002 still fails with "Wrong thread "thr1" (...) state after SuspendThread"
The vmTestbase/nsk/jvmti/GetThreadState/thrstat002 test is intermittently failing with the wrong thread state reported.
It is most likely because of the unexpected JFR (or NMT) activity.
In order to confirm this guess we need to dump the stack trace in a case of this failure.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6735/head:pull/6735
$ git checkout pull/6735
Update a local copy of the PR:
$ git checkout pull/6735
$ git pull https://git.openjdk.java.net/jdk pull/6735/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6735
View PR using the GUI difftool:
$ git pr show -t 6735
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6735.diff