Hi Arvind,
I've reported two issues.
I filed another one (jhsdb jstack cannot work with normal mode) to JBS as
JDK-8163185.
Thanks,
Yasumasa
On 2016/08/04 22:57, Arvind Aprameya wrote:
Hi Yasumasa,
We already have a bug filed for this one JDK-8163143 .
regards,
Arvind
-----Original Message-----
From: Yasumasa Suenaga [mailto:yasue...@gmail.com]
Sent: Thursday, August 04, 2016 6:56 PM
To: serviceability-dev@openjdk.java.net
Subject: Re: jhsdb jstack cannot work correctly
Hi all,
2. Normal mode cannot work
"jhsdb jstack" should work as normal mode without being added --mixed
option.
However, this command always works as mixed mode.
Does someone work for this issue?
If not, I will file it to JBS.
Thanks,
Yasumasa
On 2016/08/03 21:20, Yasumasa Suenaga wrote:
Hi all,
I use "jhsdb jstack" command in JDK 9 EA b129.
But it does not seem to work fine.
I encountered two problems:
1. AssertionFailure: illegal bci
2. Normal mode cannot work
1. AssertionFailure: illegal bci
I saw error stack as below with JDK 9 EA b129 Linux x64:
-------------------
0x00007fe06bd270c2 * java.lang.Object.wait(long) bci:-520544688
(Interpreted frame)
0x00007fe06bd1a443 sun.jvm.hotspot.utilities.AssertionFailure: illegal bci
at
sun.jvm.hotspot.utilities.Assert.that(jdk.hotspot.agent@9-ea/Assert.java:32)
at
sun.jvm.hotspot.oops.ConstMethod.getLineNumberFromBCI(jdk.hotspot.agent@9-ea/ConstMethod.java:297)
at
sun.jvm.hotspot.oops.Method.getLineNumberFromBCI(jdk.hotspot.agent@9-ea/Method.java:282)
at
sun.jvm.hotspot.tools.PStack.getJavaNames(jdk.hotspot.agent@9-ea/PStack.java:239)
at
sun.jvm.hotspot.tools.PStack.run(jdk.hotspot.agent@9-ea/PStack.java:112)
-------------------
jhsdb can parse compiled frame correctly. It seems to be a problem for
interpreter frame only.
What is the cause of this problem?
interpretedVFrame in HotSpot has changed the location to store BCP?
2. Normal mode cannot work
"jhsdb jstack" should work as normal mode without being added --mixed
option.
However, this command always works as mixed mode.
I think we can fix as below:
-------------------
diff -r 5acd2b561936
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/JStack.java
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/JStack.java
Tue Aug 02 20:55:27 2016 -0700
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/JStack.java
Wed Aug 03 21:18:57 2016 +0900
@@ -68,6 +68,10 @@
}
public void runWithArgs(String... args) {
+ // We should recover these mode to default value.
+ mixedMode = false;
+ concurrentLocks = false;
+
int used = 0;
for (int i = 0; i < args.length; i++) {
if (args[i].equals("-m")) {
-------------------
Has someone worked for them?
If not so, and patch of 2. is correct, I file it to JBS and upload webrev.
Thanks,
Yasumasa