You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/09/05 13:29:23 UTC
[Bug 61491] New: IllegalArgumentException thrown by
PerMessageDeflate sendMessagePart()
https://bz.apache.org/bugzilla/show_bug.cgi?id=61491
Bug ID: 61491
Summary: IllegalArgumentException thrown by PerMessageDeflate
sendMessagePart()
Product: Tomcat 8
Version: 8.5.20
Hardware: PC
Status: NEW
Severity: critical
Priority: P2
Component: WebSocket
Assignee: dev@tomcat.apache.org
Reporter: email.wtam@gmail.com
Target Milestone: ----
This issue is similar to https://bz.apache.org/bugzilla/show_bug.cgi?id=59635
but it is happending in another location of the code. Please refer to the
following stack.
compressedPayload.limit() is zero because of the compressedPayload.flip() call.
Sep 04, 2017 11:10:08 PM org.glassfish.jersey.server.ServerRuntime$Responder
writeResponse
SEVERE: Error while closing the output stream in order to commit response.
java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Unknown Source)
at
org.apache.tomcat.websocket.PerMessageDeflate.sendMessagePart(PerMessageDeflate.java:374)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessage(WsRemoteEndpointImplBase.java:341)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$TextMessageSendHandler.write(WsRemoteEndpointImplBase.java:803)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendStringByCompletion(WsRemoteEndpointImplBase.java:212)
at
org.apache.tomcat.websocket.WsRemoteEndpointAsync.sendText(WsRemoteEndpointAsync.java:47)
at
org.atmosphere.container.version.JSR356WebSocket.write(JSR356WebSocket.java:73)
at org.atmosphere.websocket.WebSocket.write(WebSocket.java:255)
at org.atmosphere.websocket.WebSocket.write(WebSocket.java:46)
at
org.atmosphere.cpr.AtmosphereResponseImpl$Stream.write(AtmosphereResponseImpl.java:980)
at
org.glassfish.jersey.servlet.internal.ResponseWriter$NonCloseableOutputStreamWrapper.write(ResponseWriter.java:325)
at java.io.ByteArrayOutputStream.writeTo(Unknown Source)
at
org.glassfish.jersey.message.internal.CommittingOutputStream.flushBuffer(CommittingOutputStream.java:307)
at
org.glassfish.jersey.message.internal.CommittingOutputStream.commit(CommittingOutputStream.java:261)
at
org.glassfish.jersey.message.internal.CommittingOutputStream.close(CommittingOutputStream.java:276)
at
org.glassfish.jersey.message.internal.OutboundMessageContext.close(OutboundMessageContext.java:877)
at
org.glassfish.jersey.server.ContainerResponse.close(ContainerResponse.java:412)
at
org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:784)
at
org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)
at
org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
at
org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:321)
at
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at
org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
at
org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
at
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
at
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
at
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
at
com.apriori.async.ws.config.AsyncServletContainer.service(AsyncServletContainer.java:108)
at
org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:135)
at
org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:96)
at
org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:337)
at
org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:175)
at
org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:223)
at
org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:115)
at
org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:67)
at
org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2287)
at
org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:593)
at
org.atmosphere.websocket.DefaultWebSocketProcessor.open(DefaultWebSocketProcessor.java:224)
at
org.atmosphere.container.JSR356Endpoint.onOpen(JSR356Endpoint.java:264)
at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.init(WsHttpUpgradeHandler.java:133)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:914)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
--
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
[Bug 61491] IllegalArgumentException thrown by PerMessageDeflate
sendMessagePart()
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61491
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
I've managed to reproduce this.
It is triggered by a zero length message after a non-zero length message when
the compression context is retained between messages.
I'm starting to think about a fix.
--
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
[Bug 61491] IllegalArgumentException thrown by PerMessageDeflate
sendMessagePart()
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61491
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
From the stack trace, this appears to be a duplicate of bug 59635.
Are you sure compressedPayload.limit() is zero? 1, 2 and 3 are also
possibilities.
What is really needed here is a test case. Can you provide the String that was
being sent at the time?
I'll take another look at the code but a reliable test case would make this a
lot simpler.
--
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
[Bug 61491] IllegalArgumentException thrown by PerMessageDeflate
sendMessagePart()
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61491
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Fixed in:
- trunk for 9.0.0.M27 onwards
- 8.5.x for 8.5.21 onwards
- 8.0.x for 8.0.47 onwards
- 7.0.x for 7.0.82 onwards
--
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