Unable to attach to 64-bit process The -F option can be used when the target process is not respond

1,在windows开发客户端使用   jmap -dump:format=b,file=heap1.hprof 6712 导出文件,报下面错

 Unable to attach to 64-bit process The -F option can be used when the target process is not respond

2,于是我想在方法里面加入-F,命名变成 jmap -F -dump:format=b,file=heap1.hprof 6712,报错变成下面的

Attaching to process ID 6712, please wait...
Error attaching to process: Windbg Error: GetModuleParameters failed!
sun.jvm.hotspot.debugger.DebuggerException: Windbg Error: GetModuleParameters failed!
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach0(Native Method)
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach(WindbgDebuggerLocal.java:152)
        at sun.jvm.hotspot.HotSpotAgent.attachDebugger(HotSpotAgent.java:671)
        at sun.jvm.hotspot.HotSpotAgent.setupDebuggerWin32(HotSpotAgent.java:569)
        at sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:335)
        at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:304)
        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.HeapDumper.main(HeapDumper.java:83)
        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.jmap.JMap.runTool(JMap.java:201)
        at sun.tools.jmap.JMap.main(JMap.java:130)

3,百思不得其解,在度量上面找了半天也没有找到满意的答案。

4,于是自己尝试使用jar包的情况运行

java -jar D:\developsoftware\demo\target\demo-0.0.1-SNAPSHOT.jar -Xmx32M -Xms32M

5,执行上面操作 成功

jmap -dump:format=b,file=heap1.hprof 21144
Dumping heap to D:\heap1.hprof ...
Heap dump file created

6,问题算是解决了,但是具体是什么原因还是未知,在此只是给大家提供一种参考。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

dream21st

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值