vmtool error: ArthasJniLibraryxxxx.tmp no suitable image found
- Dominant language
- Java
- Stars
- 37.5k
- Forks
- 7.6k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 4
Description
- [ ] 我已经在 [issues](https://github.com/alibaba/arthas/issues) 里搜索,没有重复的issue。
### 环境信息
* `arthas-boot.jar` 或者 `as.sh` 的版本: xxx
* Arthas 版本: 3.7.2 / 3.7.2编译版
* 操作系统版本: MacOS Majove 10.14.6 (18G9323)
* 目标进程的JVM版本: Java SE 8(1.8.0_401) / Eclipse Temurin 8(1.8.0_412)
* 执行`arthas-boot`的版本: 3.7.2 / 3.7.2编译版
### 重现问题的步骤
执行 vmtool时报错
### 期望的结果
如何解决这个问题?
```
[INFO] arthas home: /Users/charles/work/arthas/arthas/packaging/target/arthas-bin
[INFO] The target process already listen port 3658, skip attach.
[INFO] arthas-client connect 127.0.0.1 3658
,---. ,------. ,--------.,--. ,--. ,---. ,---.
/ O \ | .--. ''--. .--'| '--' | / O \ ' .-'
| .-. || '--'.' | | | .--. || .-. |`. `-.
| | | || |\ \ | | | | | || | | |.-' |
`--' `--'`--' '--' `--' `--' `--'`--' `--'`-----'
wiki https://arthas.aliyun.com/doc
tutorials https://arthas.aliyun.com/doc/arthas-tutorials.html
version 3.7.2.20240508134613
main_class com.crmixc.trade.application.svr.App
pid 72930
time 2024-05-08 13:59:55
[arthas@72930]$ vmtool --action getInstances -c 18b4aac2 --className com.crmixc.trade.application.biz.service.impl.OrderUploadServiceImpl --express 'instances[0]'
vmtool error: /private/var/folders/vy/qqvts3f91rj3rm_x_nfdj9xh0000gn/T/ArthasJniLibrary2690960575193180013.tmp: dlopen(/private/var/folders/vy/qqvts3f91rj3rm_x_nfdj9xh0000gn/T/ArthasJniLibrary2690960575193180013.tmp, 1): no suitable image found. Did find:
/private/var/folders/vy/qqvts3f91rj3rm_x_nfdj9xh0000gn/T/ArthasJniLibrary2690960575193180013.tmp: cannot load 'ArthasJniLibrary2690960575193180013.tmp' (load command 0x80000034 is unknown)
/private/var/folders/vy/qqvts3f91rj3rm_x_nfdj9xh0000gn/T/ArthasJniLibrary2690960575193180013.tmp: cannot load 'ArthasJniLibrary2690960575193180013.tmp' (load command 0x80000034 is unknown)
[arthas@72930]$ stop
Resetting all enhanced classes ...
Affect(class count: 0 , method count: 0) cost in 2 ms, listenerId: 0
Arthas Server is going to shutdown...
[arthas@72930]$ session (c519c257-825d-4cbd-872b-6756c37aae1d) is closed because server is going to shutdown.
```
Contributor guide
Research direction
Start with the vmtool entry point using the reported Arthas 3.7.2 setup on macOS Mojave and Java 8, reproducing the ArthasJniLibrary*.tmp dlopen error. Check the arthas-boot.jar or as.sh execution path and compare the native-library loading behavior. Done means vmtool completes the reported getInstances command without the “no suitable image found” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100