Testsuite: org.apache.catalina.valves.TestStuckThreadDetectionValve Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.514 sec ------------- Standard Error ----------------- 23-Jan-2024 11:41:32.212 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testDetection] 23-Jan-2024 11:41:32.755 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-1"] 23-Jan-2024 11:41:32.834 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 23-Jan-2024 11:41:32.834 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.19-dev] 23-Jan-2024 11:41:33.044 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-1-40169"] 23-Jan-2024 11:41:36.038 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio2-127.0.0.1-auto-1-exec-2] (id=[18]) has been active for [2,880] milliseconds (since [1/23/24, 11:41 AM]) to serve the same request for [http://localhost:40169/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//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) at app//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) at app//org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) at app//org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at app//org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) 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:115) 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:340) at app//org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) at app//org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at app//org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) at app//org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1683) at app//org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at app//org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1243) at app//org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:328) at app//org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:468) at app//org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:404) at java.base@17.0.7/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base@17.0.7/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base@17.0.7/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) 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:61) at java.base@17.0.7/java.lang.Thread.run(Thread.java:833) 23-Jan-2024 11:41:41.182 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-1-40169"] 23-Jan-2024 11:41:41.185 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 23-Jan-2024 11:41:41.223 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-1-40169"] 23-Jan-2024 11:41:41.236 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-1-40169"] 23-Jan-2024 11:41:41.255 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testInterruption] 23-Jan-2024 11:41:41.273 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-2"] 23-Jan-2024 11:41:41.416 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 23-Jan-2024 11:41:41.417 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.19-dev] 23-Jan-2024 11:41:41.442 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-2-45725"] 23-Jan-2024 11:41:44.424 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio2-127.0.0.1-auto-2-exec-2] (id=[34]) has been active for [2,970] milliseconds (since [1/23/24, 11:41 AM]) to serve the same request for [http://localhost:45725/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//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) at app//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) at app//org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) at app//org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at app//org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) 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:115) 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:340) at app//org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) at app//org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at app//org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) at app//org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1683) at app//org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at app//org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1243) at app//org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:328) at app//org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:468) at app//org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:404) at java.base@17.0.7/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base@17.0.7/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base@17.0.7/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) 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:61) at java.base@17.0.7/java.lang.Thread.run(Thread.java:833) 23-Jan-2024 11:41:47.429 WARNING [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve$MonitoredThread.interruptIfStuck Thread [http-nio2-127.0.0.1-auto-2-exec-2] (id=[34]) has been interrupted because it was active for [5,973] milliseconds (since [1/23/24, 11:41 AM]) to serve the same request for [http://localhost:45725/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//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) at app//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) at app//org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) at app//org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at app//org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) 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:115) 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:340) at app//org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) at app//org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at app//org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) at app//org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1683) at app//org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at app//org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1243) at app//org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:328) at app//org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:468) at app//org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:404) at java.base@17.0.7/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base@17.0.7/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base@17.0.7/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) 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:61) at java.base@17.0.7/java.lang.Thread.run(Thread.java:833) 23-Jan-2024 11:41:47.438 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-2-45725"] 23-Jan-2024 11:41:47.441 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 23-Jan-2024 11:41:47.444 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-2-45725"] 23-Jan-2024 11:41:47.454 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-2-45725"] ------------- ---------------- --------------- Testcase: testDetection took 9.244 sec Testcase: testInterruption took 6.21 sec