alibaba / alibaba/arthas

运行arthas进程中的profiler start报错

Open
#2,855 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
37.6k
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` 的版本: 3.72
* Arthas 版本: 3.72
* 操作系统版本: Linux 4.18.0-477.10.1.el8_8.x86_64 #1 SMP Tue May 16 11:07:48 PDT 2023 x86_64 x86_64 x86_64 GNU/Linux
* 目标进程的JVM版本: openjdk version "1.8.0_362"
* 执行`arthas-boot`的版本: 3.7.2

### 重现问题的步骤

1. ./as.sh
2. profiler start

### 期望的结果

开始执行信息收集

### 实际运行的结果

AsyncProfiler error: /tmp/ArthasJniLibrary7126202527535478252.tmp: /tmp/ArthasJniLibrary7126202527535478252.tmp: failed to map segment from shared object

```
2024-06-27 09:28:25 [arthas-command-execute] ERROR c.t.a.c.c.monitor200.ProfilerCommand -AsyncProfiler error
java.lang.UnsatisfiedLinkError: /tmp/ArthasJniLibrary7126202527535478252.tmp: /tmp/ArthasJniLibrary7126202527535478252.tmp: failed to map segment from shared object
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
at java.lang.Runtime.load0(Runtime.java:782)
at java.lang.System.load(System.java:1100)
at one.profiler.AsyncProfiler.getInstance(AsyncProfiler.java:45)
at com.taobao.arthas.core.command.monitor200.ProfilerCommand.profilerInstance(ProfilerCommand.java:271)
at com.taobao.arthas.core.command.monitor200.ProfilerCommand.process(ProfilerCommand.java:358)
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(FutureTask.java:266)
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)
```

Contributor guide

Open the contributing guide

Research direction

Start with ProfilerCommand.java at profilerInstance (line 271) and process (line 358), then trace the AsyncProfiler.getInstance call shown in the stack trace. Reproduce with as.sh and profiler start on the reported Linux and Java versions; done means profiling starts collecting information without the UnsatisfiedLinkError.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, linux
Domain
devtools, operating-systems, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.