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

在 wisp 的场景,执行 thread -n -1 会出错 #2342

Closed
hengyunabc opened this issue Nov 11, 2022 · 0 comments
Closed

在 wisp 的场景,执行 thread -n -1 会出错 #2342

hengyunabc opened this issue Nov 11, 2022 · 0 comments
Milestone

Comments

@hengyunabc
Copy link
Collaborator

2022-11-11 11:55:00 [arthas-command-execute] ERROR c.t.a.c.s.system.impl.ProcessImpl -Error during processing the command:
java.lang.NullPointerException: null
        at com.taobao.arthas.core.command.monitor200.ThreadCommand.findThreadInfoById(ThreadCommand.java:225)
        at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:214)
        at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:122)
        at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:82)
        at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:18)
        at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:111)
        at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:108)
        at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:385)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:984)
        at java.base/com.alibaba.wisp.engine.WispTask.runOutsideWisp(WispTask.java:262)
        at java.base/com.alibaba.wisp.engine.WispTask.runCommand(WispTask.java:251)
        at java.base/com.alibaba.wisp.engine.WispTask$CacheableCoroutine.run(WispTask.java:223)
        at java.base/java.dyn.CoroutineBase.startInternal(CoroutineBase.java:74)

检查下代码,可能是这个实现有问题java.lang.management.ThreadMXBean.getThreadInfo,返回结果数组里,元素可能有 null 。

@hengyunabc hengyunabc added this to the 3.6.7 milestone Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant