Tomcat 8.0.21 trouble

Upgraded to Tomcat 8.0.21 on my staging server. Most everyting works, but clicking one Vaadin button, evoking a series of forms loaded from various database tables, results in a repeatable hang and the following Tomcat error (complete with mis-spelled message):

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(
    at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.endMessage(
    at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$IntermediateMessageHandler.onResult(
    at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$

There have been no java code changes since Tomcat 8.0.20 where everything works perfectly. I’m not sure this is related to Vaadin in any way, but it might be. Rolling back… I’d be interested if anyone else sees it, or suspects anything in my code might be contributing.
Vaadin 7.4.2

For what it’s worth, rolling back to Tomcat 8.0.20 while retaining the newer Tomcat Native 1.1.33 has restored normal operation.

Hi Steve,

We have the same problem since tomcat 8.0.21. We also switched back to an older tomcat version which works fine for us. The problem occurs on a page where we have a popup window with a ProgressBar and a background thread. The ProgressBar works fine but when the thread finishes the work and wants to close the popup followed by a UI push, we get the same exception.

That’s good information. I’ve started a bug #
at Apache (registration required), but am unable to contribute any meaningful diagnostic information due to my lack of knowledge in this area. I don’t use a popup window in my offending routine, but I do have an indeterminate progress indicator using a background thread. Maybe that’s related to the problem.

It looks like we have a resolution due to some sleuthing by Mark Thomas at Apache:

--- Comment #2 from Mark Thomas <> ---
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.