Testsuite: org.apache.catalina.valves.TestStuckThreadDetectionValve Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.976 sec ------------- Standard Error ----------------- 26-Jul-2024 10:46:41.673 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testDetection] 26-Jul-2024 10:46:42.702 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-1"] 26-Jul-2024 10:46:42.782 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 26-Jul-2024 10:46:42.782 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.92-dev] 26-Jul-2024 10:46:43.075 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-1-40073"] 26-Jul-2024 10:46:46.092 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-127.0.0.1-auto-1-exec-1] (id=[19]) has been active for [2,745] milliseconds (since [7/26/24, 10:46 AM]) to serve the same request for [http://localhost:40073/myservlet] and may be stuck (configured threshold for this StuckThreadDetectionValve is [2] seconds). There is/are [1] thread(s) in total that are monitored by this Valve and may be stuck. java.lang.Throwable at java.base@17.0.7/java.lang.Thread.sleep(Native Method) at app//org.apache.catalina.valves.TestStuckThreadDetectionValve$StickingServlet.doGet(TestStuckThreadDetectionValve.java:149) at app//javax.servlet.http.HttpServlet.service(HttpServlet.java:529) at app//javax.servlet.http.HttpServlet.service(HttpServlet.java:623) at app//org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199) at app//org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at app//org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) at app//org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at app//org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at app//org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:185) at app//org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) at app//org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at app//org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at app//org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:345) at app//org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:383) at app//org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at app//org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:936) at app//org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791) at app//org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base@17.0.7/java.lang.Thread.run(Thread.java:833) 26-Jul-2024 10:46:51.335 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-1-40073"] 26-Jul-2024 10:46:51.336 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 26-Jul-2024 10:46:51.351 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-1-40073"] 26-Jul-2024 10:46:51.360 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-1-40073"] 26-Jul-2024 10:46:51.370 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testInterruption] 26-Jul-2024 10:46:51.385 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-2"] 26-Jul-2024 10:46:51.389 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 26-Jul-2024 10:46:51.390 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.92-dev] 26-Jul-2024 10:46:51.427 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-2-46001"] 26-Jul-2024 10:46:54.410 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-127.0.0.1-auto-2-exec-1] (id=[35]) has been active for [2,926] milliseconds (since [7/26/24, 10:46 AM]) to serve the same request for [http://localhost:46001/myservlet] and may be stuck (configured threshold for this StuckThreadDetectionValve is [2] seconds). There is/are [1] thread(s) in total that are monitored by this Valve and may be stuck. java.lang.Throwable at java.base@17.0.7/java.lang.Thread.sleep(Native Method) at app//org.apache.catalina.valves.TestStuckThreadDetectionValve$StickingServlet.doGet(TestStuckThreadDetectionValve.java:149) at app//javax.servlet.http.HttpServlet.service(HttpServlet.java:529) at app//javax.servlet.http.HttpServlet.service(HttpServlet.java:623) at app//org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199) at app//org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at app//org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) at app//org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at app//org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at app//org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:185) at app//org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) at app//org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at app//org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at app//org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:345) at app//org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:383) at app//org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at app//org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:936) at app//org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791) at app//org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base@17.0.7/java.lang.Thread.run(Thread.java:833) 26-Jul-2024 10:46:57.416 WARNING [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve$MonitoredThread.interruptIfStuck Thread [http-nio-127.0.0.1-auto-2-exec-1] (id=[35]) has been interrupted because it was active for [5,931] milliseconds (since [7/26/24, 10:46 AM]) to serve the same request for [http://localhost:46001/myservlet] and was probably stuck (configured interruption threshold for this StuckThreadDetectionValve is [5] seconds). java.lang.Throwable at java.base@17.0.7/java.lang.Thread.sleep(Native Method) at app//org.apache.catalina.valves.TestStuckThreadDetectionValve$StickingServlet.doGet(TestStuckThreadDetectionValve.java:149) at app//javax.servlet.http.HttpServlet.service(HttpServlet.java:529) at app//javax.servlet.http.HttpServlet.service(HttpServlet.java:623) at app//org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199) at app//org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at app//org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) at app//org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at app//org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at app//org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:185) at app//org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) at app//org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at app//org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at app//org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:345) at app//org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:383) at app//org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at app//org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:936) at app//org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791) at app//org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base@17.0.7/java.lang.Thread.run(Thread.java:833) 26-Jul-2024 10:46:57.419 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-2-46001"] 26-Jul-2024 10:46:57.422 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 26-Jul-2024 10:46:57.427 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-2-46001"] 26-Jul-2024 10:46:57.430 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-2-46001"] ------------- ---------------- --------------- Testcase: testDetection took 9.827 sec Testcase: testInterruption took 6.064 sec