Skip to content
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

执行sh show-busy-java-threads.sh -F报错 #65

Closed
shenwenxin opened this issue Mar 23, 2018 · 3 comments
Closed

执行sh show-busy-java-threads.sh -F报错 #65

shenwenxin opened this issue Mar 23, 2018 · 3 comments
Assignees
Labels

Comments

@shenwenxin
Copy link

shenwenxin commented Mar 23, 2018

是我用户权限的问题吗?

Fail to jstack busy(0.1%) thread(40956/0x9ffc) stack of java process(40946) under user(root).

Error attaching to process: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process)
sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process)
	at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:411)
	at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:305)
	at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:140)
	at sun.jvm.hotspot.tools.Tool.start(Tool.java:185)
	at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
	at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.tools.jstack.JStack.runJStackTool(JStack.java:
@wangdongsong
Copy link

你主机上有JVM进程吗?

@oldratlee
Copy link
Owner

oldratlee commented Mar 29, 2018

@shenwenxin 首先,不要用sh执行,详见说明 #57 (comment)


Error attaching to process: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process)
sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process)
	at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:411)
	at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:305)
	at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:140)
	at sun.jvm.hotspot.tools.Tool.start(Tool.java:185)
	at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
	at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.tools.jstack.JStack.runJStackTool

看起来是 执行 jstack出错了,比如

  • jsatckJava进程坏掉了。
  • jstack的版本过低、被jsatckJava进程的Java版本不兼容

之类。

可以先直接用 jstack命令去操作一下 这个 Java进程 试试,再分析原因。

@oldratlee
Copy link
Owner

oldratlee commented Mar 29, 2018

@shenwenxin 另外给一下运行过程日志

$ bash -x show-busy-java-threads

# 或是 
$ sudo bash -x show-busy-java-threads

@oldratlee oldratlee self-assigned this Apr 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants