tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 59635] New: PerMessageDeflate.sendMassagePart() IllegalArgumentException using atmosphere
Date Wed, 25 May 2016 15:07:37 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=59635

            Bug ID: 59635
           Summary: PerMessageDeflate.sendMassagePart()
                    IllegalArgumentException using atmosphere
           Product: Tomcat 8
           Version: 8.0.33
          Hardware: Macintosh
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: WebSocket
          Assignee: dev@tomcat.apache.org
          Reporter: l.kasparek@laudert.de

Hi,
I have a problem since I have updated my Tomcat from version 8.0.32 to version
8.0.33.

I have a java maven project based on Wicket MVC, Atmosphere and Tomcat.

After the update to Tomcat 8.0.33 I get an IllegalArgumentException when I am
sending an empty atmosphere message. The reason for this exception seems to be
located in PerMessageDeflate.sendMessagePart(). I compared the method between
both versions and found out that a change was made where the message is checked
if it is empty. 
Following bug report should match to this change:
https://bz.apache.org/bugzilla/show_bug.cgi?id=59189

Line 324 in PerMessageDeflate was changed from
"uncompressedPart.getPayload().limit() == 0"
to
"uncompressedPart.getPayload().limit() == 0 && uncompressedPart.isFin() &&
deflater.getBytesRead() == 0)"

It seems that now our empty message isn't handled like an empty message
anymore, leeding to the following IllegalArgumentException:

java.lang.IllegalArgumentException
    at java.nio.Buffer.limit(Buffer.java:275) ~[?:1.8.0_74]
    at
org.apache.tomcat.websocket.PerMessageDeflate.sendMessagePart(PerMessageDeflate.java:373)
~[tomcat-websocket.jar:8.0.33]
    at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessage(WsRemoteEndpointImplBase.java:300)
~[tomcat-websocket.jar:8.0.33]
    at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$TextMessageSendHandler.write(WsRemoteEndpointImplBase.java:759)
~[tomcat-websocket.jar:8.0.33]
    at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendStringByCompletion(WsRemoteEndpointImplBase.java:216)
~[tomcat-websocket.jar:8.0.33]
    at
org.apache.tomcat.websocket.WsRemoteEndpointAsync.sendText(WsRemoteEndpointAsync.java:47)
~[tomcat-websocket.jar:8.0.33]
    at
org.atmosphere.container.version.JSR356WebSocket.write(JSR356WebSocket.java:73)
~[atmosphere-runtime-2.2.7.jar:2.2.7]
    at org.atmosphere.websocket.WebSocket.write(WebSocket.java:254)
~[atmosphere-runtime-2.2.7.jar:2.2.7]
    at org.atmosphere.websocket.WebSocket.write(WebSocket.java:219)
~[atmosphere-runtime-2.2.7.jar:2.2.7]
    at org.atmosphere.websocket.WebSocket.write(WebSocket.java:47)
~[atmosphere-runtime-2.2.7.jar:2.2.7]
    at
org.atmosphere.cpr.AtmosphereResponse$2.write(AtmosphereResponse.java:531)
~[atmosphere-runtime-2.2.7.jar:2.2.7]
    at
org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:148)
~[atmosphere-runtime-2.2.7.jar:2.2.7]
    at
org.atmosphere.cpr.DefaultBroadcaster.invokeOnStateChange(DefaultBroadcaster.java:1074)
[atmosphere-runtime-2.2.7.jar:2.2.7]
    at
org.atmosphere.cpr.DefaultBroadcaster.prepareInvokeOnStateChange(DefaultBroadcaster.java:1094)
[atmosphere-runtime-2.2.7.jar:2.2.7]
    at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:899)
[atmosphere-runtime-2.2.7.jar:2.2.7]
    at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:520)
[atmosphere-runtime-2.2.7.jar:2.2.7]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[?:1.8.0_74]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_74]
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:1.8.0_74]
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:1.8.0_74]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_74]

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message