Vaadin 7.4.2 webapp runs perfectly in Tomcat 8.0.20 repeatedly evokes IllegalStateException in Tomcat 8.0.21: Exception in thread "WebSocketServer-localhost-/vfc-6" java.lang.IllegalStateException: When sending a fragmented message, all fragments bust be of the same type at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:411) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.endMessage(WsRemoteEndpointImplBase.java:366) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$IntermediateMessageHandler.onResult(WsRemoteEndpointImplBase.java:513) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer$OnResultRunnable.run(WsRemoteEndpointImplServer.java:247) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Rolling back to 8.0.20 but retaining Tomcat Native 1.1.33 restores error-free webapp operation. I haven't isolated a simple example as the webapp mostly works and I don't yet know what triggers the error. The offending function generates new threads, access a database, creates various forms and uses WebSocket to push data to other user interfaces. I understand I have provided insufficient information to qualify as a bug report, but please take it as a data point, in case you receive other similar reports.
Are you using perMessageDeflate ?
Thanks for the report. It was sketchy in terms of reproduction but there was enough information to pin-point a suspect commit. From there it was fairly easy to see what had gone wrong. A fix for a problem in trunk was incorrect. It fixed the blocking case which was broken in trunk but broke the non-blocking case. The back-port then broke the perMessage-deflate if compression of a single message part resulted in multiple message parts. The original issue has been fixed in trunk and the regression / incorrect fix reverted in 8.0.x for 8.0.22 onwards and 7.0.x for 7.0.62 onwards.
Thanks Mark for taking the time to convert my limited insight into a solution.
*** Bug 57831 has been marked as a duplicate of this bug. ***