wu-sheng commented on a change in pull request #2931: Support bootstrap class
enhance and fix OOM by empty stack of exception.
URL: https://github.com/apache/skywalking/pull/2931#discussion_r296427604
##########
File path:
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/util/ThrowableTransformer.java
##########
@@ -30,10 +32,12 @@
public String convert2String(Throwable throwable, final int maxLength) {
final StringBuilder stackMessage = new StringBuilder();
Throwable causeException = throwable;
- while (causeException != null) {
+
+ int depth = CAUSE_EXCEPTION_DEPTH;
+ while (causeException != null || depth == 0) {
stackMessage.append(printExceptionInfo(causeException));
- boolean overMaxLength =
printStackElement(throwable.getStackTrace(), new AppendListener() {
+ boolean isLookDeeper =
printStackElement(causeException.getStackTrace(), new AppendListener() {
Review comment:
@Arugal @SummerOfServenteen I think there are two places originally wrong,
which also trigger #2926
Thank @Arugal to catch this.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services