Testsuite: org.apache.catalina.valves.TestStuckThreadDetectionValve Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.324 sec ------------- Standard Error ----------------- 20-Dec-2023 12:08:17.649 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testDetection] 20-Dec-2023 12:08:17.793 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.38] using APR version [1.6.5]. 20-Dec-2023 12:08:17.794 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true]. 20-Dec-2023 12:08:17.794 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 20-Dec-2023 12:08:17.797 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1f 31 Mar 2020] 20-Dec-2023 12:08:18.278 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-127.0.0.1-auto-1"] 20-Dec-2023 12:08:18.309 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 20-Dec-2023 12:08:18.310 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.85-dev] 20-Dec-2023 12:08:18.423 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-127.0.0.1-auto-1-38725"] 20-Dec-2023 12:08:21.466 WARNING [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-apr-127.0.0.1-auto-1-exec-1] (id=[19]) has been active for [2,916] milliseconds (since [12/20/23, 12:08 PM]) to serve the same request for [http://localhost:38725/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:209) at app//org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) 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:481) 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:342) at app//org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) at app//org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at app//org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at app//org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2134) 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) 20-Dec-2023 12:08:26.567 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-127.0.0.1-auto-1-38725"] 20-Dec-2023 12:08:26.569 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 20-Dec-2023 12:08:26.605 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-apr-127.0.0.1-auto-1-38725"] 20-Dec-2023 12:08:26.620 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-apr-127.0.0.1-auto-1-38725"] 20-Dec-2023 12:08:26.627 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testInterruption] 20-Dec-2023 12:08:26.628 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.38] using APR version [1.6.5]. 20-Dec-2023 12:08:26.628 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true]. 20-Dec-2023 12:08:26.628 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 20-Dec-2023 12:08:26.629 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1f 31 Mar 2020] 20-Dec-2023 12:08:26.630 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-127.0.0.1-auto-2"] 20-Dec-2023 12:08:26.630 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 20-Dec-2023 12:08:26.631 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.85-dev] 20-Dec-2023 12:08:26.675 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-127.0.0.1-auto-2-39695"] 20-Dec-2023 12:08:29.647 WARNING [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-apr-127.0.0.1-auto-2-exec-1] (id=[36]) has been active for [2,888] milliseconds (since [12/20/23, 12:08 PM]) to serve the same request for [http://localhost:39695/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:209) at app//org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) 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:481) 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:342) at app//org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) at app//org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at app//org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at app//org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2134) 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) 20-Dec-2023 12:08:32.653 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve$MonitoredThread.interruptIfStuck Thread [http-apr-127.0.0.1-auto-2-exec-1] (id=[36]) has been interrupted because it was active for [5,895] milliseconds (since [12/20/23, 12:08 PM]) to serve the same request for [http://localhost:39695/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:209) at app//org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) 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:481) 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:342) at app//org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) at app//org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at app//org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at app//org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2134) 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) 20-Dec-2023 12:08:32.664 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-127.0.0.1-auto-2-39695"] 20-Dec-2023 12:08:32.667 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 20-Dec-2023 12:08:32.671 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-apr-127.0.0.1-auto-2-39695"] 20-Dec-2023 12:08:32.680 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-apr-127.0.0.1-auto-2-39695"] ------------- ---------------- --------------- Testcase: testDetection took 9.209 sec Testcase: testInterruption took 6.056 sec