alibaba / alibaba/arthas

记录一个操作导致arthas卡死问题 ClassCircularityError: com/alibaba/arthas/deps/ch/qos/logback/classic/spi/ThrowableProxy

Open
#3,153 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
37.5k
Forks
7.6k
Avg merge
1d 22h
Merged PRs (30d)
4

Description

启动 math-game.jar 。然后arthas attach之后执行:

```
$ options unsafe true
NAME BEFORE-VALUE AFTER-VALUE
-----------------------------------
unsafe false true
$ stack 'java.util.zip.ZipFile$ZipFileInflaterInputStream' '' -n 20
Press Q or Ctrl+C to abort.
```

可以发现arthas shell 卡死了。用 jstack 查看,也没有明显的死锁。但是退出 math-game.jar 会有下面的异常信息:

```
Exception in thread "as-shutdown-hooker" java.lang.ClassCircularityError: com/alibaba/arthas/deps/ch/qos/logback/classic/spi/ThrowableProxy
at com.alibaba.arthas.deps.ch.qos.logback.classic.spi.LoggingEvent.(LoggingEvent.java:119)
at com.alibaba.arthas.deps.ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
at com.alibaba.arthas.deps.ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
at com.alibaba.arthas.deps.ch.qos.logback.classic.Logger.error(Logger.java:538)
at com.taobao.arthas.core.server.ArthasBootstrap.destroy(ArthasBootstrap.java:535)
at com.taobao.arthas.core.server.ArthasBootstrap$2.run(ArthasBootstrap.java:179)
```

---

如果先任意执行一个 arthas 的其它的 watch/trace 命令,再执行 `stack 'java.util.zip.ZipFile$ZipFileInflaterInputStream' '' -n 20`就不会死锁。

Contributor guide

Open the contributing guide

Research direction

Reproduce with math-game.jar after attaching Arthas, enabling unsafe, and running the specified stack command first. Read the stack trace around ArthasBootstrap.java:535 and LoggingEvent.java:119, then compare behavior after another watch or trace command. Done means the shell no longer hangs and shutdown does not report ClassCircularityError.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.