Environment
- Arthas version: 4.0.5
- Operating System version: Ubuntu 24.04 LTS
- Java version of target JVM: 21.0.7
- Java version of JVM used to attach: 21.0.7
Preconditions / Setup
- Arthas is attached to the application as a Java agent and connected to the tunnel-server.
- The Arthas Web Console is used to start JFR profiling of the application.
- After profiling finishes, the generated recording is listed under Outputs.
Steps to reproduce this issue
- In the Web Console, click Download for a recording whose size exceeds 10 MB.
- Observe the downloaded file.
Expected Result
The full .jfr file is downloaded intact, regardless of size.
Actual Result
• Recordings ≤ 10 MB download correctly.
• Recordings > 10 MB download as a small file that contains only the text:
Stack trace from tunnel-server:
com.alibaba.arthas.deps.io.netty.handler.codec.http.TooLongHttpContentException: Response entity too large: DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
at com.alibaba.arthas.deps.io.netty.handler.codec.http.HttpObjectAggregator.handleOversizedMessage(HttpObjectAggregator.java:275)
at com.alibaba.arthas.deps.io.netty.handler.codec.http.HttpObjectAggregator.handleOversizedMessage(HttpObjectAggregator.java:86)
at com.alibaba.arthas.deps.io.netty.handler.codec.MessageAggregator.invokeHandleOversizedMessage(MessageAggregator.java:403)
at com.alibaba.arthas.deps.io.netty.handler.codec.MessageAggregator.decode(MessageAggregator.java:252)
at com.alibaba.arthas.deps.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at com.alibaba.arthas.deps.io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
at com.alibaba.arthas.deps.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at com.alibaba.arthas.deps.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at com.alibaba.arthas.deps.io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at com.alibaba.arthas.deps.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at com.alibaba.arthas.deps.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
at com.alibaba.arthas.deps.io.netty.channel.local.LocalChannel.readInbound(LocalChannel.java:323)
at com.alibaba.arthas.deps.io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:469)
at com.alibaba.arthas.deps.io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:51)
at com.alibaba.arthas.deps.io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:427)
at com.alibaba.arthas.deps.io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
at com.alibaba.arthas.deps.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
at com.alibaba.arthas.deps.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
at com.alibaba.arthas.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
at com.alibaba.arthas.deps.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
at com.alibaba.arthas.deps.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at com.alibaba.arthas.deps.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Unknown Source)
Here are the suspected areas:
|
httpResponse.setContent("error".getBytes("utf-8")); |
|
public static final int MAX_HTTP_CONTENT_LENGTH = 1024 * 1024 * 10; |
Questions
- Is the 10 MB ceiling intentional/expected?
- If intentional, is there a recommended work-around to download JFR files larger than 10 MB via tunnel-server for those with no direct access to production system other than the web-console?
Thanks for your help!
Environment
Preconditions / Setup
Steps to reproduce this issue
Expected Result
The full .jfr file is downloaded intact, regardless of size.
Actual Result
• Recordings ≤ 10 MB download correctly.
• Recordings > 10 MB download as a small file that contains only the text:
Stack trace from tunnel-server:
Here are the suspected areas:
arthas/tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ProxyClient.java
Line 99 in baed344
arthas/common/src/main/java/com/taobao/arthas/common/ArthasConstants.java
Line 17 in baed344
Questions
Thanks for your help!