Testsuite: org.apache.tomcat.websocket.server.TestClose Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.16 sec ------------- Standard Error ----------------- 28-Jun-2024 17:25:03.955 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpCloseInOnMessage] 28-Jun-2024 17:25:04.404 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-1"] 28-Jun-2024 17:25:04.431 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 28-Jun-2024 17:25:04.432 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.26-dev] 28-Jun-2024 17:25:04.568 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-1-38713"] 28-Jun-2024 17:25:04.667 INFO [http-nio-127.0.0.1-auto-1-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 28-Jun-2024 17:25:04.670 INFO [http-nio-127.0.0.1-auto-1-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 28-Jun-2024 17:25:04.714 INFO [http-nio-127.0.0.1-auto-1-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.EOFException at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1293) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1181) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) 28-Jun-2024 17:25:04.721 INFO [http-nio-127.0.0.1-auto-1-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [null] 28-Jun-2024 17:25:04.722 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-1-38713"] 28-Jun-2024 17:25:04.723 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 28-Jun-2024 17:25:04.741 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-1-38713"] 28-Jun-2024 17:25:04.747 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-1-38713"] 28-Jun-2024 17:25:04.753 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpCloseWhenOnMessageSends] 28-Jun-2024 17:25:04.755 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-2"] 28-Jun-2024 17:25:04.756 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 28-Jun-2024 17:25:04.756 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.26-dev] 28-Jun-2024 17:25:04.762 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-2-41215"] 28-Jun-2024 17:25:04.783 INFO [http-nio-127.0.0.1-auto-2-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 28-Jun-2024 17:25:04.783 INFO [http-nio-127.0.0.1-auto-2-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 28-Jun-2024 17:25:05.291 INFO [http-nio-127.0.0.1-auto-2-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Broken pipe at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:326) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:266) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:789) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:589) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:324) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:266) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:250) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:192) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:284) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:102) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Broken pipe at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:153) at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:563) at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$NioOperationState.run(NioEndpoint.java:1632) at org.apache.tomcat.util.net.SocketWrapperBase$OperationState.start(SocketWrapperBase.java:1051) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1440) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1366) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1337) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:171) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:521) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:313) ... 28 more 28-Jun-2024 17:25:05.292 INFO [http-nio-127.0.0.1-auto-2-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Broken pipe] 28-Jun-2024 17:25:05.293 INFO [http-nio-127.0.0.1-auto-2-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.nio.channels.ClosedChannelException at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1251) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1181) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) 28-Jun-2024 17:25:05.293 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-2-41215"] 28-Jun-2024 17:25:05.294 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 28-Jun-2024 17:25:05.296 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-2-41215"] 28-Jun-2024 17:25:05.298 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-2-41215"] 28-Jun-2024 17:25:05.300 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpCloseWhenOnMessageSends] 28-Jun-2024 17:25:05.302 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-3"] 28-Jun-2024 17:25:05.302 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 28-Jun-2024 17:25:05.302 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.26-dev] 28-Jun-2024 17:25:05.307 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-3-34011"] 28-Jun-2024 17:25:05.316 INFO [http-nio-127.0.0.1-auto-3-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 28-Jun-2024 17:25:05.317 INFO [http-nio-127.0.0.1-auto-3-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 28-Jun-2024 17:25:05.826 INFO [http-nio-127.0.0.1-auto-3-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Broken pipe at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:326) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:266) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:789) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:589) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:324) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:266) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:250) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:192) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:284) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:102) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Broken pipe at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:153) at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:563) at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$NioOperationState.run(NioEndpoint.java:1632) at org.apache.tomcat.util.net.SocketWrapperBase$OperationState.start(SocketWrapperBase.java:1051) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1440) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1366) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1337) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:171) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:521) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:313) ... 28 more 28-Jun-2024 17:25:05.827 INFO [http-nio-127.0.0.1-auto-3-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Broken pipe] 28-Jun-2024 17:25:05.828 INFO [http-nio-127.0.0.1-auto-3-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.nio.channels.ClosedChannelException at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1251) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1181) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) 28-Jun-2024 17:25:05.828 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-3-34011"] 28-Jun-2024 17:25:05.829 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 28-Jun-2024 17:25:05.831 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-3-34011"] 28-Jun-2024 17:25:05.833 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-3-34011"] 28-Jun-2024 17:25:05.834 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpClose] 28-Jun-2024 17:25:05.836 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-4"] 28-Jun-2024 17:25:05.836 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 28-Jun-2024 17:25:05.836 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.26-dev] 28-Jun-2024 17:25:05.841 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-4-38737"] 28-Jun-2024 17:25:05.847 INFO [http-nio-127.0.0.1-auto-4-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 28-Jun-2024 17:25:05.847 INFO [http-nio-127.0.0.1-auto-4-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1001], reason [null] 28-Jun-2024 17:25:05.848 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-4-38737"] 28-Jun-2024 17:25:05.848 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 28-Jun-2024 17:25:05.850 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-4-38737"] 28-Jun-2024 17:25:05.853 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-4-38737"] 28-Jun-2024 17:25:05.854 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpReset] 28-Jun-2024 17:25:05.856 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-5"] 28-Jun-2024 17:25:05.856 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 28-Jun-2024 17:25:05.856 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.26-dev] 28-Jun-2024 17:25:05.860 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-5-34145"] 28-Jun-2024 17:25:05.864 INFO [http-nio-127.0.0.1-auto-5-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 28-Jun-2024 17:25:05.865 INFO [http-nio-127.0.0.1-auto-5-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Connection reset by peer at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:326) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:266) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:789) at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:637) at org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:347) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:279) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:153) at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:563) at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$NioOperationState.run(NioEndpoint.java:1632) at org.apache.tomcat.util.net.SocketWrapperBase$OperationState.start(SocketWrapperBase.java:1051) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1440) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1366) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1337) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:171) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:521) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:313) ... 19 more 28-Jun-2024 17:25:05.866 INFO [http-nio-127.0.0.1-auto-5-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1001], reason [null] 28-Jun-2024 17:25:05.866 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-5-34145"] 28-Jun-2024 17:25:05.867 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 28-Jun-2024 17:25:05.869 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [http-nio-127.0.0.1-auto-5-exec-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: app//org.apache.tomcat.websocket.server.WsWriteTimeout.unregister(WsWriteTimeout.java:102) app//org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doClose(WsRemoteEndpointImplServer.java:310) app//org.apache.tomcat.websocket.WsRemoteEndpointImplBase.close(WsRemoteEndpointImplBase.java:750) app//org.apache.tomcat.websocket.WsSession.closeConnection(WsSession.java:666) app//org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:644) app//org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:347) app//org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:279) app//org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) app//org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) app//org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) app//org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) app//org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) app//org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) app//org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) app//org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) app//org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) app//org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) java.base@17.0.7/java.lang.Thread.run(Thread.java:833) 28-Jun-2024 17:25:05.870 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-5-34145"] 28-Jun-2024 17:25:05.872 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-5-34145"] 28-Jun-2024 17:25:05.873 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpResetWhenOnMessageSends] 28-Jun-2024 17:25:05.874 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-6"] 28-Jun-2024 17:25:05.875 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 28-Jun-2024 17:25:05.875 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.26-dev] 28-Jun-2024 17:25:05.879 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-6-42261"] 28-Jun-2024 17:25:05.885 INFO [http-nio-127.0.0.1-auto-6-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 28-Jun-2024 17:25:05.885 INFO [http-nio-127.0.0.1-auto-6-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 28-Jun-2024 17:25:05.886 INFO [http-nio-127.0.0.1-auto-6-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Connection reset by peer at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:326) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:266) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:789) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:589) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:324) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:266) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:250) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:192) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:284) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:102) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:153) at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:563) at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$NioOperationState.run(NioEndpoint.java:1632) at org.apache.tomcat.util.net.SocketWrapperBase$OperationState.start(SocketWrapperBase.java:1051) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1440) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1366) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1337) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:171) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:521) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:313) ... 28 more 28-Jun-2024 17:25:05.887 INFO [http-nio-127.0.0.1-auto-6-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Connection reset by peer] 28-Jun-2024 17:25:05.887 INFO [http-nio-127.0.0.1-auto-6-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.nio.channels.ClosedChannelException at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1251) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1181) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) 28-Jun-2024 17:25:05.887 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-6-42261"] 28-Jun-2024 17:25:05.887 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 28-Jun-2024 17:25:05.889 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-6-42261"] 28-Jun-2024 17:25:05.892 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-6-42261"] 28-Jun-2024 17:25:05.893 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpResetWhenOnMessageSends] 28-Jun-2024 17:25:05.895 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-7"] 28-Jun-2024 17:25:05.895 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 28-Jun-2024 17:25:05.896 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.26-dev] 28-Jun-2024 17:25:05.900 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-7-44231"] 28-Jun-2024 17:25:05.904 INFO [http-nio-127.0.0.1-auto-7-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 28-Jun-2024 17:25:05.904 INFO [http-nio-127.0.0.1-auto-7-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 28-Jun-2024 17:25:05.905 INFO [http-nio-127.0.0.1-auto-7-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Connection reset by peer at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:326) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:266) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:789) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:589) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:324) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:266) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:250) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:192) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:284) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:102) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:153) at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:563) at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$NioOperationState.run(NioEndpoint.java:1632) at org.apache.tomcat.util.net.SocketWrapperBase$OperationState.start(SocketWrapperBase.java:1051) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1440) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1366) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1337) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:171) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:521) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:313) ... 28 more 28-Jun-2024 17:25:05.906 INFO [http-nio-127.0.0.1-auto-7-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Connection reset by peer] 28-Jun-2024 17:25:05.906 INFO [http-nio-127.0.0.1-auto-7-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.nio.channels.ClosedChannelException at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1251) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1181) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) 28-Jun-2024 17:25:05.906 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-7-44231"] 28-Jun-2024 17:25:05.907 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 28-Jun-2024 17:25:05.908 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [http-nio-127.0.0.1-auto-7-exec-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: app//org.apache.tomcat.util.threads.TaskThread.getCreationTime(TaskThread.java:48) app//org.apache.tomcat.util.threads.ThreadPoolExecutor.currentThreadShouldBeStopped(ThreadPoolExecutor.java:2198) app//org.apache.tomcat.util.threads.ThreadPoolExecutor.stopCurrentThreadIfNeeded(ThreadPoolExecutor.java:2176) app//org.apache.tomcat.util.threads.ThreadPoolExecutor.afterExecute(ThreadPoolExecutor.java:2166) app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) java.base@17.0.7/java.lang.Thread.run(Thread.java:833) 28-Jun-2024 17:25:05.909 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-7-44231"] 28-Jun-2024 17:25:05.912 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-7-44231"] 28-Jun-2024 17:25:05.913 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpResetInOnMessage] 28-Jun-2024 17:25:05.914 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-8"] 28-Jun-2024 17:25:05.915 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 28-Jun-2024 17:25:05.915 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.26-dev] 28-Jun-2024 17:25:05.920 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-8-41037"] 28-Jun-2024 17:25:05.934 INFO [http-nio-127.0.0.1-auto-8-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 28-Jun-2024 17:25:05.935 INFO [http-nio-127.0.0.1-auto-8-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 28-Jun-2024 17:25:05.935 INFO [http-nio-127.0.0.1-auto-8-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.net.SocketException: Connection reset at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394) at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426) at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:147) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1291) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1181) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) 28-Jun-2024 17:25:05.936 INFO [http-nio-127.0.0.1-auto-8-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Connection reset] 28-Jun-2024 17:25:05.936 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-8-41037"] 28-Jun-2024 17:25:05.937 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 28-Jun-2024 17:25:05.938 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-8-41037"] 28-Jun-2024 17:25:05.940 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-8-41037"] 28-Jun-2024 17:25:05.942 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpClose] 28-Jun-2024 17:25:05.943 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-9"] 28-Jun-2024 17:25:05.943 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 28-Jun-2024 17:25:05.944 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.26-dev] 28-Jun-2024 17:25:05.948 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-9-36473"] 28-Jun-2024 17:25:05.960 INFO [http-nio-127.0.0.1-auto-9-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 28-Jun-2024 17:25:05.961 INFO [http-nio-127.0.0.1-auto-9-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.EOFException at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1293) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1181) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) 28-Jun-2024 17:25:05.962 INFO [http-nio-127.0.0.1-auto-9-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [null] 28-Jun-2024 17:25:05.962 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-9-36473"] 28-Jun-2024 17:25:05.963 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 28-Jun-2024 17:25:05.965 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-9-36473"] 28-Jun-2024 17:25:05.973 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-9-36473"] 28-Jun-2024 17:25:05.974 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpReset] 28-Jun-2024 17:25:05.976 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-10"] 28-Jun-2024 17:25:05.976 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 28-Jun-2024 17:25:05.976 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.26-dev] 28-Jun-2024 17:25:05.985 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-10-33129"] 28-Jun-2024 17:25:05.994 INFO [http-nio-127.0.0.1-auto-10-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 28-Jun-2024 17:25:05.994 INFO [http-nio-127.0.0.1-auto-10-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.net.SocketException: Connection reset at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394) at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426) at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:147) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1291) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1181) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.base/java.lang.Thread.run(Thread.java:833) 28-Jun-2024 17:25:05.995 INFO [http-nio-127.0.0.1-auto-10-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Connection reset] 28-Jun-2024 17:25:05.995 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-10-33129"] 28-Jun-2024 17:25:05.998 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 28-Jun-2024 17:25:06.000 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-10-33129"] 28-Jun-2024 17:25:06.001 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-10-33129"] ------------- ---------------- --------------- Testcase: testTcpCloseInOnMessage took 0.864 sec Testcase: testWsCloseThenTcpCloseWhenOnMessageSends took 0.546 sec Testcase: testTcpCloseWhenOnMessageSends took 0.534 sec Testcase: testWsCloseThenTcpClose took 0.02 sec Testcase: testWsCloseThenTcpReset took 0.018 sec Testcase: testWsCloseThenTcpResetWhenOnMessageSends took 0.02 sec Testcase: testTcpResetWhenOnMessageSends took 0.02 sec Testcase: testTcpResetInOnMessage took 0.028 sec Testcase: testTcpClose took 0.033 sec Testcase: testTcpReset took 0.028 sec