Upgrade to Pro — share decks privately, control downloads, hide ads and more …

挙動をエレガントに変えたい! ~JDK付属ツール編~

 挙動をエレガントに変えたい! ~JDK付属ツール編~

jcmdのシグナルハンドラチェックを回避するための作業の記録。JJUG CCC 2025 Fall LT資料。

Avatar for Yasumasa Suenaga

Yasumasa Suenaga

November 15, 2025
Tweet

More Decks by Yasumasa Suenaga

Other Decks in Technology

Transcript

  1. ある日、WSL 1でスレッドダンプを取ろうとすると… $ ./java/jdk-25.0.1/bin/jcmd 207 Thread.print 207: com.sun.tools.attach.AttachNotSupportedException: pid: 207

    cmd: '/home/yasuenag/java/jdk- 25.0.1/bin/javaLongSleep' state is not ready to participate in attach handshake! at jdk.attach/sun.tools.attach.VirtualMachineImpl.checkCatchesAndSendQuitTo(VirtualMachineImpl.java:376) at jdk.attach/sun.tools.attach.VirtualMachineImpl.<init>(VirtualMachineImpl.java:109) at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:56) at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:201) at jdk.jcmd/sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:113) at jdk.jcmd/sun.tools.jcmd.JCmd.main(JCmd.java:97)