Arthas调试案例:Stack案例

简介: Arthas调试案例:Stack案例


Stack命令初使用

[arthas@139]$ stack com.taobao.cpu.service.impl.pricedecision.PriceDecisionImpl checkPayTerm  -n 1
Press Q or Ctrl+C to abort.
Affect(class count: 2 , method count: 1) cost in 625 ms, listenerId: 2
ts=2022-12-13 16:08:51;thread_name=http-nio-8080-exec-3;id=130;is_daemon=true;priority=5;TCCL=iuap.yms.server.classloader.YmsParallelWebappClassLoader@62d68cec
    @com.taobao.cpu.service.impl.pricedecision.PriceDecisionImpl.checkPayTerm()
        at com.taobao.cpu.service.impl.pricedecision.PriceDecisionImpl.updatePayTerms(PriceDecisionImpl.java:1688)
        at com.taobao.cpu.service.impl.pricedecision.PriceDecisionImpl.updatePriceDecision(PriceDecisionImpl.java:1321)
        at com.taobao.cpu.sourcing.buyoffer.service.impl.action.PriceDecisionUpdateAction.doActionBP(PriceDecisionUpdateAction.java:57)
        at com.taobao.cpu.sourcing.buyoffer.service.impl.action.PriceDecisionBaseAction.doAction(PriceDecisionBaseAction.java:87)
        at com.taobao.cpu.sourcing.buyoffer.service.impl.PriceDecisionImpl.save(PriceDecisionImpl.java:195)
        at com.taobao.cpu.sourcing.buyoffer.service.rule.pricedecision.PriceDecisionSaveRule.doBizNew(PriceDecisionSaveRule.java:651)
        at com.taobao.cpu.sourcing.buyoffer.service.rule.pricedecision.PriceDecisionSaveRule.execute(PriceDecisionSaveRule.java:125)
        at com.taobao.ucf.mdd.rule.executor.LocalRuleExecutor.execute(LocalRuleExecutor.java:27)
        at com.taobao.ucf.mdd.rule.handler.DefaultExecRulesHandler.doExecuteRule(DefaultExecRulesHandler.java:391)
        at com.taobao.ucf.mdd.rule.handler.DefaultExecRulesHandler.executeRule(DefaultExecRulesHandler.java:352)
        at com.taobao.ucf.mdd.rule.handler.DefaultExecRulesHandler.access$100(DefaultExecRulesHandler.java:90)
        at com.taobao.ucf.mdd.rule.handler.DefaultExecRulesHandler$RuleRegisterExecutor.execute(DefaultExecRulesHandler.java:295)
        at com.taobao.ucf.mdd.common.utils.OperatorLog.traceLogRaw(OperatorLog.java:56)
        at com.taobao.ucf.mdd.common.utils.OperatorLog.lambda$traceLog$0(OperatorLog.java:42)
        at com.taobao.cloud.apm.dapper.util.DapperUtil.createSpanFromMDCThrowExceptionWithLogType(DapperUtil.java:668)
        at com.taobao.ucf.mdd.common.utils.OperatorLog.traceLog(OperatorLog.java:41)
        at com.taobao.ucf.mdd.rule.handler.DefaultExecRulesHandler.executeRule(DefaultExecRulesHandler.java:192)
        at com.taobao.ucf.mdd.rule.handler.DefaultExecRulesHandler.doExecRules(DefaultExecRulesHandler.java:120)
        at com.taobao.ucf.mdd.rule.api.RuleEngine.doExecRules(RuleEngine.java:105)
        at com.taobao.ucf.mdd.rule.api.RuleOperatorProxy.executeRule(RuleOperatorProxy.java:98)
        at com.taobao.ucf.mdd.rule.api.RuleOperatorProxy.executeRule(RuleOperatorProxy.java:87)
        at com.taobao.ucf.mdd.ext.bill.rule.template.CommonOperator.execute(CommonOperator.java:121)
        at com.taobao.ucf.mdd.ext.bill.service.BillBizExecuteUpdateService.executeUpdate(BillBizExecuteUpdateService.java:64)
        at com.taobao.ucf.mdd.ext.bill.service.BillBizExecuteUpdateService.execute(BillBizExecuteUpdateService.java:41)
        at com.taobao.ucf.mdd.ext.bill.staticproxy.BillBizProxy.invoke(BillBizProxy.java:72)
        at com.taobao.ucf.mdd.ext.bill.staticproxy.BillBizProxy.doExecute(BillBizProxy.java:47)
        at com.taobao.ucf.mdd.ext.bill.biz.BillBiz.executeUpdate(BillBiz.java:136)
        at com.taobao.ucf.mdd.ext.service.DefaultBillService.executeUpdate(DefaultBillService.java:190)
        at com.taobao.ucf.mdd.ext.service.DefaultBillService$$FastClassBySpringCGLIB$$b3bca724.invoke(<generated>:-1)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
        at com.taobao.cpu.pubapp.md.ext.controller.service.CpuBillService$$EnhancerBySpringCGLIB$$afe53373.executeUpdate(<generated>:-1)
        at com.taobao.cpu.pubapp.md.ext.controller.BillController.executeData(BillController.java:503)
        at com.taobao.cpu.pubapp.md.ext.controller.BillController.save(BillController.java:322)
        at com.taobao.cpu.pubapp.md.ext.controller.BillController$$FastClassBySpringCGLIB$$8319bb9b.invoke(<generated>:-1)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
        at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:58)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
        at com.taobao.cpu.pub.ct.handler.BizActionSceneHandlerImpl.execute(BizActionSceneHandlerImpl.java:44)
        at com.taobao.cpu.pub.ct.core.BizSceneHandlerProxyImpl.doExecute(BizSceneHandlerProxyImpl.java:64)
        at com.taobao.cpu.pub.ct.core.BizSceneHandlerProxyImpl.execute(BizSceneHandlerProxyImpl.java:50)
        at com.taobao.cpu.pub.ct.core.AopBizSceneExecutorImpl.execute(AopBizSceneExecutorImpl.java:70)
        at com.taobao.cpu.pub.ct.aspect.AppControllerCrossTenantAspect.around(AppControllerCrossTenantAspect.java:75)
        at sun.reflect.GeneratedMethodAccessor1318.invoke(null:-1)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
        at com.taobao.cpu.pubapp.md.ext.controller.BillController$$EnhancerBySpringCGLIB$$2a3b5a8f.save(<generated>:-1)
        at sun.reflect.GeneratedMethodAccessor5617.invoke(null:-1)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at com.taobao.iuap.iweb.platform.IWebPlatformFilter.doFilter(IWebPlatformFilter.java:32)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at com.taobao.cloud.yonscript.filter.J2v8DebugHelperFilter.doFilter(J2v8DebugHelperFilter.java:37)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:289)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at com.taobao.cpu.pubapp.context.AppContextFilter.doFilter(AppContextFilter.java:27)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at com.taobao.diwork.filter.DiworkRequestListener.doFilter(DiworkRequestListener.java:118)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at com.taobao.cpu.security.YcSecurityFilter.doFilter(YcSecurityFilter.java:113)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at ch.qos.logback.classic.helpers.MDCInsertingServletFilter.doFilter(MDCInsertingServletFilter.java:49)
        at com.taobao.iuap.ucf.log.filter.MDCLogFilter.doFilter(MDCLogFilter.java:30)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:126)
        at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:64)
        at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:101)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at com.taobao.cloud.filter.ZoneFilter.lambda$doFilter$0(ZoneFilter.java:101)
        at io.github.resilience4j.decorators.Decorators$DecorateCallable.call(Decorators.java:355)
        at com.taobao.cloud.middleware.framework.IrisBulkheadLimit.call(IrisBulkheadLimit.java:267)
        at com.taobao.cloud.filter.ZoneFilter.doFilter(ZoneFilter.java:105)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Command execution times exceed limit: 1, so command will exit. You can set it with -n option.
[arthas@139]$

作用:作用就是将一个方法的被调用的链路展示出来。调用链路是自下而上。

相关文章
|
6月前
|
Arthas 测试技术
Arthas调试案例:Trace案例
Arthas调试案例:Trace案例
|
6月前
|
Arthas 测试技术
Arthas调试案例:watch案例
Arthas调试案例:watch案例
|
Arthas Java 测试技术
Arthas 实践案例 | 学习笔记
快速学习 Arthas 实践案例
Arthas 实践案例 | 学习笔记
|
Arthas 监控 IDE
《Arthas系列一》搭建调试环境,千里之行始于足下
《Arthas系列一》最简单的调试环境
377 0
《Arthas系列一》搭建调试环境,千里之行始于足下
|
Arthas JavaScript 前端开发
Arthas的表达式太难了?在线调试Ognl表达式!
![Arthas](https://arthas.aliyun.com/doc/_images/arthas.png) `Arthas`是Alibaba开源的Java诊断工具,深受开发者喜爱。 * Github: [https://github.com/alibaba/arthas](https://github.com/alibaba/arthas) * 文档:[https:/
2311 0
|
6月前
|
Arthas 监控 Java
Java 诊断利器 Arthas使用
Java 诊断利器 Arthas使用
213 0
|
6月前
|
Arthas 监控 Java
Arthas 可以用于监控和诊断在 Windows 系统下部署的 Tomcat 服务
Arthas 可以用于监控和诊断在 Windows 系统下部署的 Tomcat 服务
833 2
|
Arthas 监控 Java
开源Java诊断工具Arthas:开篇之watch实战
还在为排查Java程序线上问题头痛吗,看我们用阿里开源的诊断神器 Arthas 来帮您
536 1
|
Arthas Dubbo Java
Alibaba Java诊断工具Arthas查看Dubbo动态代理类
Alibaba Java诊断工具Arthas查看Dubbo动态代理类
110 0
|
5月前
|
Arthas 测试技术 Java
一文带你快速了解 Java 线上问题快速诊断神器 Arthas
【6月更文挑战第1天】一文带你快速了解 Java 线上问题快速诊断神器 Arthas
285 3