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

sc command classname match may bug #2277

Closed
ChenYun4164 opened this issue Sep 7, 2022 · 1 comment · Fixed by #2308
Closed

sc command classname match may bug #2277

ChenYun4164 opened this issue Sep 7, 2022 · 1 comment · Fixed by #2308
Milestone

Comments

@ChenYun4164
Copy link

  • [√ ] 我已经在 issues 里搜索,没有重复的issue。

环境信息

  • arthas-boot.jar 或者 as.sh 的版本: 3.6.6
  • Arthas 版本: 3.6.6
  • 操作系统版本: OS 名称: Microsoft Windows 10 专业版 OS 版本: 10.0.19044 暂缺 Build 19044
  • 目标进程的JVM版本: corretto-1.8.0_342
  • 执行arthas-boot的版本: corretto-1.8.0_342

重现问题的步骤

  1. 证明 sc 命令可以识别通配符
    image
    image

  2. 但当加上 -c 命令指定特定 classloader 时,必须提供至少特定数量字符,无法像 sc * 一样匹配所有类
    image

  3. 在 3.6.5 3.6.4 版本均做过测试,同样存在该问题

期望的结果

加强匹配能力

实际运行的结果

2022-09-07 11:16:19 [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.util.SearchUtils.filter(SearchUtils.java:85)
at com.taobao.arthas.core.util.SearchUtils.searchClass(SearchUtils.java:59)
at com.taobao.arthas.core.command.klass100.SearchClassCommand.process(SearchClassCommand.java:128)
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.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)

@ChenYun4164
Copy link
Author

sm 命令同样存在该问题

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

Successfully merging a pull request may close this issue.

2 participants