Testsuite: org.apache.catalina.valves.TestStuckThreadDetectionValve Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.012 sec ------------- Standard Error ----------------- 26-Jul-2024 11:10:35.825 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testDetection] 26-Jul-2024 11:10:36.310 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent An older version [1.2.38] of the Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of [1.3.0] 26-Jul-2024 11:10:36.315 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.38] using APR version [1.6.5]. 26-Jul-2024 11:10:36.315 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true]. 26-Jul-2024 11:10:36.316 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 26-Jul-2024 11:10:36.319 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1f 31 Mar 2020] 26-Jul-2024 11:10:36.966 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-127.0.0.1-auto-1"] 26-Jul-2024 11:10:37.016 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 26-Jul-2024 11:10:37.017 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.92-dev] 26-Jul-2024 11:10:37.254 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-127.0.0.1-auto-1-39653"] 26-Jul-2024 11:10:40.254 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-apr-127.0.0.1-auto-1-exec-1] (id=[19]) has been active for [2,748] milliseconds (since [7/26/24, 11:10 AM]) to serve the same request for [http://localhost:39653/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.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2134) 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 11:10:45.503 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-127.0.0.1-auto-1-39653"] 26-Jul-2024 11:10:45.507 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 26-Jul-2024 11:10:45.526 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-apr-127.0.0.1-auto-1-39653"] 26-Jul-2024 11:10:45.546 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-apr-127.0.0.1-auto-1-39653"] 26-Jul-2024 11:10:45.568 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testInterruption] 26-Jul-2024 11:10:45.571 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent An older version [1.2.38] of the Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of [1.3.0] 26-Jul-2024 11:10:45.572 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.38] using APR version [1.6.5]. 26-Jul-2024 11:10:45.573 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true]. 26-Jul-2024 11:10:45.573 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 26-Jul-2024 11:10:45.574 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1f 31 Mar 2020] 26-Jul-2024 11:10:45.579 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-127.0.0.1-auto-2"] 26-Jul-2024 11:10:45.581 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 26-Jul-2024 11:10:45.581 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.92-dev] 26-Jul-2024 11:10:45.595 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-127.0.0.1-auto-2-38661"] 26-Jul-2024 11:10:48.596 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,915] milliseconds (since [7/26/24, 11:10 AM]) to serve the same request for [http://localhost:38661/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.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2134) 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 11:10:51.600 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,918] milliseconds (since [7/26/24, 11:10 AM]) to serve the same request for [http://localhost:38661/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.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2134) 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 11:10:51.607 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-127.0.0.1-auto-2-38661"] 26-Jul-2024 11:10:51.608 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 26-Jul-2024 11:10:51.611 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-apr-127.0.0.1-auto-2-38661"] 26-Jul-2024 11:10:51.615 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-apr-127.0.0.1-auto-2-38661"] ------------- ---------------- --------------- Testcase: testDetection took 9.87 sec Testcase: testInterruption took 6.05 sec