Testsuite: org.apache.tomcat.websocket.server.TestClose Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.219 sec ------------- Standard Error ----------------- 05-Dec-2024 09:48:54.758 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpCloseInOnMessage] 05-Dec-2024 09:48:55.292 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-1"] 05-Dec-2024 09:48:55.317 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 05-Dec-2024 09:48:55.317 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 05-Dec-2024 09:48:55.437 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-1-34169"] 05-Dec-2024 09:48:55.521 INFO [http-nio-127.0.0.1-auto-1-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 05-Dec-2024 09:48:55.525 INFO [http-nio-127.0.0.1-auto-1-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 05-Dec-2024 09:48:55.569 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:1298) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1186) 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: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) 05-Dec-2024 09:48:55.575 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] 05-Dec-2024 09:48:55.576 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-1-34169"] 05-Dec-2024 09:48:55.577 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 05-Dec-2024 09:48:55.590 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-1-34169"] 05-Dec-2024 09:48:55.600 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-1-34169"] 05-Dec-2024 09:48:55.607 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpCloseWhenOnMessageSends] 05-Dec-2024 09:48:55.609 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-2"] 05-Dec-2024 09:48:55.609 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 05-Dec-2024 09:48:55.610 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 05-Dec-2024 09:48:55.615 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-2-34061"] 05-Dec-2024 09:48:55.623 INFO [http-nio-127.0.0.1-auto-2-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 05-Dec-2024 09:48:55.624 INFO [http-nio-127.0.0.1-auto-2-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 05-Dec-2024 09:48:56.129 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:329) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:269) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:792) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:589) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:327) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:269) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:253) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:195) 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.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) 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: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) Caused by: java.io.IOException: Broken pipe at java.base/sun.nio.ch.SocketDispatcher.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:227) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:158) at java.base/sun.nio.ch.SocketChannelImpl.implWrite(SocketChannelImpl.java:597) at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:631) at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$NioOperationState.run(NioEndpoint.java:1637) at org.apache.tomcat.util.net.SocketWrapperBase$OperationState.start(SocketWrapperBase.java:1050) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1439) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1365) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1336) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:524) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:316) ... 26 more 05-Dec-2024 09:48:56.131 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] 05-Dec-2024 09:48:56.131 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:1256) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1186) 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: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) 05-Dec-2024 09:48:56.131 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-2-34061"] 05-Dec-2024 09:48:56.132 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 05-Dec-2024 09:48:56.135 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-2-34061"] 05-Dec-2024 09:48:56.137 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-2-34061"] 05-Dec-2024 09:48:56.138 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpCloseWhenOnMessageSends] 05-Dec-2024 09:48:56.140 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-3"] 05-Dec-2024 09:48:56.140 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 05-Dec-2024 09:48:56.140 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 05-Dec-2024 09:48:56.144 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-3-39905"] 05-Dec-2024 09:48:56.166 INFO [http-nio-127.0.0.1-auto-3-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 05-Dec-2024 09:48:56.166 INFO [http-nio-127.0.0.1-auto-3-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 05-Dec-2024 09:48:56.673 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:329) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:269) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:792) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:589) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:327) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:269) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:253) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:195) 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.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) 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: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) Caused by: java.io.IOException: Broken pipe at java.base/sun.nio.ch.SocketDispatcher.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:227) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:158) at java.base/sun.nio.ch.SocketChannelImpl.implWrite(SocketChannelImpl.java:597) at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:631) at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$NioOperationState.run(NioEndpoint.java:1637) at org.apache.tomcat.util.net.SocketWrapperBase$OperationState.start(SocketWrapperBase.java:1050) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1439) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1365) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1336) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:524) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:316) ... 26 more 05-Dec-2024 09:48:56.674 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] 05-Dec-2024 09:48:56.675 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:1256) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1186) 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: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) 05-Dec-2024 09:48:56.675 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-3-39905"] 05-Dec-2024 09:48:56.676 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 05-Dec-2024 09:48:56.679 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-3-39905"] 05-Dec-2024 09:48:56.680 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-3-39905"] 05-Dec-2024 09:48:56.682 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpClose] 05-Dec-2024 09:48:56.684 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-4"] 05-Dec-2024 09:48:56.685 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 05-Dec-2024 09:48:56.685 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 05-Dec-2024 09:48:56.689 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-4-37385"] 05-Dec-2024 09:48:56.695 INFO [http-nio-127.0.0.1-auto-4-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 05-Dec-2024 09:48:56.695 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] 05-Dec-2024 09:48:56.696 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-4-37385"] 05-Dec-2024 09:48:56.696 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 05-Dec-2024 09:48:56.698 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-4-exec-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base/sun.nio.ch.Net.getIntOption0(Native Method) java.base/sun.nio.ch.Net.getSocketOption(Net.java:493) java.base/sun.nio.ch.SocketChannelImpl.implCloseNonBlockingMode(SocketChannelImpl.java:1189) java.base/sun.nio.ch.SocketChannelImpl.implCloseSelectableChannel(SocketChannelImpl.java:1211) java.base/java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:258) java.base/java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:113) org.apache.tomcat.util.net.NioChannel.close(NioChannel.java:83) org.apache.tomcat.util.net.NioChannel.close(NioChannel.java:94) org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doClose(NioEndpoint.java:1217) org.apache.tomcat.util.net.SocketWrapperBase.close(SocketWrapperBase.java:424) org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doClose(WsRemoteEndpointImplServer.java:298) org.apache.tomcat.websocket.WsRemoteEndpointImplBase.close(WsRemoteEndpointImplBase.java:753) org.apache.tomcat.websocket.WsSession.closeConnection(WsSession.java:669) org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:647) org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:347) org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:279) org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1746) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148) org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) java.base/java.lang.Thread.run(Thread.java:1570) 05-Dec-2024 09:48:56.699 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-4-37385"] 05-Dec-2024 09:48:56.701 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-4-37385"] 05-Dec-2024 09:48:56.702 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpReset] 05-Dec-2024 09:48:56.704 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-5"] 05-Dec-2024 09:48:56.704 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 05-Dec-2024 09:48:56.705 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 05-Dec-2024 09:48:56.709 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-5-37691"] 05-Dec-2024 09:48:56.727 INFO [http-nio-127.0.0.1-auto-5-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 05-Dec-2024 09:48:56.728 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:329) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:269) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:792) at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:640) 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: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) Caused by: java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.SocketDispatcher.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:227) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:158) at java.base/sun.nio.ch.SocketChannelImpl.implWrite(SocketChannelImpl.java:597) at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:631) at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$NioOperationState.run(NioEndpoint.java:1637) at org.apache.tomcat.util.net.SocketWrapperBase$OperationState.start(SocketWrapperBase.java:1050) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1439) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1365) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1336) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:524) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:316) ... 19 more 05-Dec-2024 09:48:56.728 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] 05-Dec-2024 09:48:56.728 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-5-37691"] 05-Dec-2024 09:48:56.729 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 05-Dec-2024 09:48:56.731 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-5-37691"] 05-Dec-2024 09:48:56.733 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-5-37691"] 05-Dec-2024 09:48:56.734 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpResetWhenOnMessageSends] 05-Dec-2024 09:48:56.735 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-6"] 05-Dec-2024 09:48:56.736 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 05-Dec-2024 09:48:56.736 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 05-Dec-2024 09:48:56.739 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-6-38671"] 05-Dec-2024 09:48:56.748 INFO [http-nio-127.0.0.1-auto-6-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 05-Dec-2024 09:48:56.749 INFO [http-nio-127.0.0.1-auto-6-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 05-Dec-2024 09:48:56.751 INFO [http-nio-127.0.0.1-auto-6-exec-3] 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:329) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:269) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:792) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:589) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:327) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:269) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:253) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:195) 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.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) 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: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) Caused by: java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.SocketDispatcher.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:227) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:158) at java.base/sun.nio.ch.SocketChannelImpl.implWrite(SocketChannelImpl.java:597) at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:631) at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$NioOperationState.run(NioEndpoint.java:1637) at org.apache.tomcat.util.net.SocketWrapperBase$OperationState.start(SocketWrapperBase.java:1050) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1439) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1365) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1336) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:524) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:316) ... 26 more 05-Dec-2024 09:48:56.752 INFO [http-nio-127.0.0.1-auto-6-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Connection reset by peer] 05-Dec-2024 09:48:56.752 INFO [http-nio-127.0.0.1-auto-6-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.nio.channels.ClosedChannelException at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1256) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1186) 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: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) 05-Dec-2024 09:48:56.753 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-6-38671"] 05-Dec-2024 09:48:56.754 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 05-Dec-2024 09:48:56.756 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-6-38671"] 05-Dec-2024 09:48:56.760 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-6-38671"] 05-Dec-2024 09:48:56.761 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpResetWhenOnMessageSends] 05-Dec-2024 09:48:56.763 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-7"] 05-Dec-2024 09:48:56.764 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 05-Dec-2024 09:48:56.764 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 05-Dec-2024 09:48:56.767 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-7-45477"] 05-Dec-2024 09:48:56.771 INFO [http-nio-127.0.0.1-auto-7-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 05-Dec-2024 09:48:56.772 INFO [http-nio-127.0.0.1-auto-7-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 05-Dec-2024 09:48:56.772 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:329) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:269) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:792) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:589) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:327) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:269) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:253) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:195) 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.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) 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: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) Caused by: java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.SocketDispatcher.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:227) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:158) at java.base/sun.nio.ch.SocketChannelImpl.implWrite(SocketChannelImpl.java:597) at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:631) at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$NioOperationState.run(NioEndpoint.java:1637) at org.apache.tomcat.util.net.SocketWrapperBase$OperationState.start(SocketWrapperBase.java:1050) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1439) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1365) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1336) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:524) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlockInternal(WsRemoteEndpointImplBase.java:316) ... 26 more 05-Dec-2024 09:48:56.773 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] 05-Dec-2024 09:48:56.773 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:1256) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1186) 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: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) 05-Dec-2024 09:48:56.773 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-7-45477"] 05-Dec-2024 09:48:56.774 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 05-Dec-2024 09:48:56.776 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-7-45477"] 05-Dec-2024 09:48:56.779 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-7-45477"] 05-Dec-2024 09:48:56.781 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpResetInOnMessage] 05-Dec-2024 09:48:56.782 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-8"] 05-Dec-2024 09:48:56.783 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 05-Dec-2024 09:48:56.783 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 05-Dec-2024 09:48:56.787 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-8-35769"] 05-Dec-2024 09:48:56.792 INFO [http-nio-127.0.0.1-auto-8-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 05-Dec-2024 09:48:56.792 INFO [http-nio-127.0.0.1-auto-8-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 05-Dec-2024 09:48:56.793 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:403) at java.base/sun.nio.ch.SocketChannelImpl.implRead(SocketChannelImpl.java:435) at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:493) at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:147) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1296) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1186) 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: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) 05-Dec-2024 09:48:56.793 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] 05-Dec-2024 09:48:56.794 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-8-35769"] 05-Dec-2024 09:48:56.795 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 05-Dec-2024 09:48:56.798 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-8-35769"] 05-Dec-2024 09:48:56.799 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-8-35769"] 05-Dec-2024 09:48:56.801 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpClose] 05-Dec-2024 09:48:56.802 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-9"] 05-Dec-2024 09:48:56.802 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 05-Dec-2024 09:48:56.802 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 05-Dec-2024 09:48:56.806 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-9-45473"] 05-Dec-2024 09:48:56.813 INFO [http-nio-127.0.0.1-auto-9-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 05-Dec-2024 09:48:56.814 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:1298) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1186) 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: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) 05-Dec-2024 09:48:56.814 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] 05-Dec-2024 09:48:56.814 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-9-45473"] 05-Dec-2024 09:48:56.815 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 05-Dec-2024 09:48:56.817 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-9-45473"] 05-Dec-2024 09:48:56.819 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-9-45473"] 05-Dec-2024 09:48:56.821 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpReset] 05-Dec-2024 09:48:56.822 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-auto-10"] 05-Dec-2024 09:48:56.822 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 05-Dec-2024 09:48:56.822 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/11.0.2-dev] 05-Dec-2024 09:48:56.825 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-auto-10-43887"] 05-Dec-2024 09:48:56.839 INFO [http-nio-127.0.0.1-auto-10-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 05-Dec-2024 09:48:56.840 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:403) at java.base/sun.nio.ch.SocketChannelImpl.implRead(SocketChannelImpl.java:435) at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:493) at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:147) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1296) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1186) 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: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) 05-Dec-2024 09:48:56.840 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] 05-Dec-2024 09:48:56.841 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-auto-10-43887"] 05-Dec-2024 09:48:56.841 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 05-Dec-2024 09:48:56.843 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-10-exec-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base/jdk.internal.misc.Unsafe.park(Native Method) java.base/java.util.concurrent.locks.LockSupport.park(LockSupport.java:371) java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:519) java.base/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:4011) java.base/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3959) java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1707) java.base/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:435) org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:117) org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) org.apache.tomcat.util.threads.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1072) org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) java.base/java.lang.Thread.run(Thread.java:1570) 05-Dec-2024 09:48:56.844 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-127.0.0.1-auto-10-43887"] 05-Dec-2024 09:48:56.847 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-127.0.0.1-auto-10-43887"] ------------- ---------------- --------------- Testcase: testTcpCloseInOnMessage took 0.928 sec Testcase: testWsCloseThenTcpCloseWhenOnMessageSends took 0.532 sec Testcase: testTcpCloseWhenOnMessageSends took 0.543 sec Testcase: testWsCloseThenTcpClose took 0.02 sec Testcase: testWsCloseThenTcpReset took 0.032 sec Testcase: testWsCloseThenTcpResetWhenOnMessageSends took 0.027 sec Testcase: testTcpResetWhenOnMessageSends took 0.019 sec Testcase: testTcpResetInOnMessage took 0.02 sec Testcase: testTcpClose took 0.02 sec Testcase: testTcpReset took 0.028 sec