Testsuite: org.apache.catalina.valves.TestStuckThreadDetectionValve Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.942 sec ------------- Standard Error ----------------- 27-Nov-2024 13:47:24.842 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testDetection] 27-Nov-2024 13:47:26.007 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-1"] 27-Nov-2024 13:47:26.034 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 27-Nov-2024 13:47:26.034 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 27-Nov-2024 13:47:26.156 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-1-34041"] 27-Nov-2024 13:47:29.176 WARNING [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-127.0.0.1-auto-1-exec-1] (id=[28]) has been active for [2,810] milliseconds (since [11/27/24, 1:47 PM]) to serve the same request for [http://localhost:34041/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/java.lang.Thread.sleepNanos0(Native Method) at java.base/java.lang.Thread.sleepNanos(Thread.java:491) at java.base/java.lang.Thread.sleep(Thread.java:522) at org.apache.catalina.valves.TestStuckThreadDetectionValve$StickingServlet.doGet(TestStuckThreadDetectionValve.java:149) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:619) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:716) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:130) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:79) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483) at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:187) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:395) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1746) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:1570) 27-Nov-2024 13:47:34.366 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-1-34041"] 27-Nov-2024 13:47:34.370 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 27-Nov-2024 13:47:34.393 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-1-34041"] 27-Nov-2024 13:47:34.402 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-1-34041"] 27-Nov-2024 13:47:34.415 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testInterruption] 27-Nov-2024 13:47:34.428 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-2"] 27-Nov-2024 13:47:34.429 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 27-Nov-2024 13:47:34.441 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 27-Nov-2024 13:47:34.509 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-2-32823"] 27-Nov-2024 13:47:37.487 WARNING [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-127.0.0.1-auto-2-exec-1] (id=[44]) has been active for [2,848] milliseconds (since [11/27/24, 1:47 PM]) to serve the same request for [http://localhost:32823/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/java.lang.Thread.sleepNanos0(Native Method) at java.base/java.lang.Thread.sleepNanos(Thread.java:491) at java.base/java.lang.Thread.sleep(Thread.java:522) at org.apache.catalina.valves.TestStuckThreadDetectionValve$StickingServlet.doGet(TestStuckThreadDetectionValve.java:149) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:619) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:716) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:130) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:79) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483) at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:187) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:395) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1746) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:1570) 27-Nov-2024 13:47:40.491 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve$MonitoredThread.interruptIfStuck Thread [http-nio-127.0.0.1-auto-2-exec-1] (id=[44]) has been interrupted because it was active for [5,852] milliseconds (since [11/27/24, 1:47 PM]) to serve the same request for [http://localhost:32823/myservlet] and was probably stuck (configured interruption threshold for this StuckThreadDetectionValve is [5] seconds). java.lang.Throwable at java.base/java.lang.Thread.sleepNanos0(Native Method) at java.base/java.lang.Thread.sleepNanos(Thread.java:491) at java.base/java.lang.Thread.sleep(Thread.java:522) at org.apache.catalina.valves.TestStuckThreadDetectionValve$StickingServlet.doGet(TestStuckThreadDetectionValve.java:149) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:619) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:716) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:130) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:79) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483) at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:187) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:395) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1746) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:1570) 27-Nov-2024 13:47:40.496 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-2-32823"] 27-Nov-2024 13:47:40.498 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 27-Nov-2024 13:47:40.502 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-2-32823"] 27-Nov-2024 13:47:40.506 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-2-32823"] ------------- ---------------- --------------- Testcase: testDetection took 9.73 sec Testcase: testInterruption took 6.094 sec