萝卜白菜。 2021-06-29 09:15 采纳率: 100%
浏览 192
已结题

TongWeb高并发下阻塞ClassLoader.getResource下

TongWeb高并发下打jstack,发现线程大部分如下,请问什么原因?

"http-nio2-0.0.0.0-8088-exec-188" #9227 daemon prio=5 os_prio=0 tid=0x0000fffeb8364000 nid=0x18724 waiting for monitor entry [0x0000fffe7ca6c000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at sun.misc.URLClassPath.getNextLoader(URLClassPath.java:479)
    - waiting to lock <0x000000008060ef00> (a sun.misc.URLClassPath)
    at sun.misc.URLClassPath.findResource(URLClassPath.java:224)
    at java.net.URLClassLoader$2.run(URLClassLoader.java:572)
    at java.net.URLClassLoader$2.run(URLClassLoader.java:570)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findResource(URLClassLoader.java:569)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1090)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1085)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1085)
    at com.tongweb.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:1023)
    at com.tongweb.tomee.catalina.ThanosTomEEWebappClassLoader.getResource(ThanosTomEEWebappClassLoader.java:190)
    at java.lang.Class.getResource(Class.java:2267)
    at org.samples.TestFilter.doFilterInternal(TestFilter.java:17)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    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:119)
    at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)
    at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at com.tongweb.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at com.tongweb.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
    at com.tongweb.catalina.core.ThanosStandardContextValve.invoke(ThanosStandardContextValve.java:107)
    at com.tongweb.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
    at com.tongweb.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:452)
    at com.tongweb.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at com.tongweb.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
    at com.tongweb.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
    at com.tongweb.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at com.tongweb.catalina.core.ThanosStandardEngineValve.invoke(ThanosStandardEngineValve.java:43)
    at com.tongweb.catalina.realm.RealmValve.invoke(RealmValve.java:21)
    at com.tongweb.catalina.connector.ThanosCoyoteAdaptor.service(ThanosCoyoteAdaptor.java:460)
    at com.tongweb.coyote.http11.Http11Processor.service(Http11Processor.java:780)
    at com.tongweb.coyote.http11.ThanosHttp11Processor.service(ThanosHttp11Processor.java:19)
    at com.tongweb.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at com.tongweb.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:913)
    at com.tongweb.web.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1610)
    at com.tongweb.web.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    - locked <0x00000000fea16e70> (a com.tongweb.web.util.net.Nio2Endpoint$Nio2SocketWrapper)
    at com.tongweb.web.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:853)
    at com.tongweb.web.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:640)
    at com.tongweb.web.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:618)
    at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
    at sun.nio.ch.Invoker$2.run(Invoker.java:218)
    at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
    at com.tongweb.web.util.threads.TWThreadPoolExecutor.runWorker(TWThreadPoolExecutor.java:1172)
    at com.tongweb.web.util.threads.TWThreadPoolExecutor$Worker.run(TWThreadPoolExecutor.java:628)
    at com.tongweb.web.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)

"http-nio2-0.0.0.0-8088-exec-187" #9226 daemon prio=5 os_prio=0 tid=0x0000fffeb8363000 nid=0x18723 waiting for monitor entry [0x0000fffe7cc6c000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at sun.misc.URLClassPath.getNextLoader(URLClassPath.java:479)
    - waiting to lock <0x000000008060ef00> (a sun.misc.URLClassPath)
    at sun.misc.URLClassPath.findResource(URLClassPath.java:224)
    at java.net.URLClassLoader$2.run(URLClassLoader.java:572)
    at java.net.URLClassLoader$2.run(URLClassLoader.java:570)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findResource(URLClassLoader.java:569)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1090)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1085)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1085)
    at com.tongweb.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:1023)
    at com.tongweb.tomee.catalina.ThanosTomEEWebappClassLoader.getResource(ThanosTomEEWebappClassLoader.java:190)
    at java.lang.Class.getResource(Class.java:2267)
    at org.samples.TestFilter.doFilterInternal(TestFilter.java:17)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    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:119)
    at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)
    at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at com.tongweb.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at com.tongweb.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
    at com.tongweb.catalina.core.ThanosStandardContextValve.invoke(ThanosStandardContextValve.java:107)
    at com.tongweb.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
    at com.tongweb.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:452)
    at com.tongweb.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at com.tongweb.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
    at com.tongweb.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
    at com.tongweb.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at com.tongweb.catalina.core.ThanosStandardEngineValve.invoke(ThanosStandardEngineValve.java:43)
    at com.tongweb.catalina.realm.RealmValve.invoke(RealmValve.java:21)
    at com.tongweb.catalina.connector.ThanosCoyoteAdaptor.service(ThanosCoyoteAdaptor.java:460)
    at com.tongweb.coyote.http11.Http11Processor.service(Http11Processor.java:780)
    at com.tongweb.coyote.http11.ThanosHttp11Processor.service(ThanosHttp11Processor.java:19)
    at com.tongweb.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at com.tongweb.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:913)
    at com.tongweb.web.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1610)
    at com.tongweb.web.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    - locked <0x00000000fe937478> (a com.tongweb.web.util.net.Nio2Endpoint$Nio2SocketWrapper)
    at com.tongweb.web.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:853)
    at com.tongweb.web.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:640)
    at com.tongweb.web.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:618)
    at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
    at sun.nio.ch.Invoker$2.run(Invoker.java:218)
    at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
    at com.tongweb.web.util.threads.TWThreadPoolExecutor.runWorker(TWThreadPoolExecutor.java:1172)
    at com.tongweb.web.util.threads.TWThreadPoolExecutor$Worker.run(TWThreadPoolExecutor.java:628)
    at com.tongweb.web.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
 

  • 写回答

1条回答 默认 最新

    报告相同问题?

    相关推荐 更多相似问题

    悬赏问题

    • ¥20 有没有认识硅云的研发 求介绍
    • ¥15 unittest __import__加载名为‘1’的model无法找到
    • ¥30 魔术师读心术猜数字实验
    • ¥15 关于#Python#的问题,如何解决?
    • ¥15 CMD 生成TXT内容输出成一行
    • ¥20 关于#pandas#的问题,如何解决?(语言-python)
    • ¥30 c语言设计井字棋小游戏
    • ¥15 关于属性关联的双极容度多属性决策vikor方法的公式
    • ¥15 10吨190马力爆炸品运输车,以80km/h的速度行驶1个小时输出的动能或者做的功是多少?
    • ¥15 《phthon编程从入门到实践》第十八章,从django入手,learning_log,ModuleNotFoundError: No module named 'learning_logs