tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Buffer failure in AjpNio connector?
Date Wed, 25 Feb 2015 14:44:35 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

On 2/25/15 9:10 AM, Christopher Schultz wrote:
> We are testing on Tomcat 8.0.17 and we have been getting failures
> that look like this:
> 
> SEVERE: Exception while dispatching incoming RPC call 
> java.lang.IllegalArgumentException at
> java.nio.Buffer.limit(Buffer.java:275) at 
> org.apache.coyote.ajp.AjpNioProcessor.readSocket(AjpNioProcessor.java:179)
>
> 
at
> org.apache.coyote.ajp.AjpNioProcessor.read(AjpNioProcessor.java:159)
>
> 
at
> org.apache.coyote.ajp.AbstractAjpProcessor.readMessage(AbstractAjpProcessor.java:1067)
>
> 
at
> org.apache.coyote.ajp.AbstractAjpProcessor.receive(AbstractAjpProcessor.java:1005)
>
> 
at
> org.apache.coyote.ajp.AbstractAjpProcessor.refillReadBuffer(AbstractAjpProcessor.java:1131)
>
>  The error message itself comes from GWT's server-side component,
> but the exception indicates the failure is occurring at the Tomcat
> level. We are re-testing with Tomcat 8.0.20, as there have been
> some improvements to NIO, but I wasn't sure if those changes would
> affect the AJP connector.
> 
> We will also be testing on Tomcat 7.0.59. Is the NIO implementation
> in Tomat 7 different (stable) enough that this kind of (presumed)
> bug won't exist in that version?

Back in 7.0.59, and we are getting an immediate failure on login to
our application, which is great because it's reproducible. Since the
failure is being reported as part of a failure, it's looping forever
with the same exception, filling the log file. I think this ought to
be enough to see what might be happening. Stack trace follows the
<Connector> configuration. Switching to the BIO connector solves all
problems.

    <Connector port="@connector-port@"
       redirectPort="443"
           protocol="org.apache.coyote.ajp.AjpNioProtocol"
         packetSize="65536"
        URIEncoding="UTF-8"
           executor="tomcatThreadPool" />

Our packet size matches the configuration for mod_jk.

Feb 25, 2015 9:39:02 AM org.apache.catalina.core.ApplicationDispatcher
invoke
SEVERE: Servlet.service() for servlet velocity threw exception
java.nio.BufferOverflowException
        at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
        at
org.apache.coyote.ajp.AjpNioProcessor.output(AjpNioProcessor.java:305)
        at
org.apache.coyote.ajp.AbstractAjpProcessor$SocketOutputBuffer.doWrite(AbstractAjpProcessor.java:1228)
        at org.apache.coyote.Response.doWrite(Response.java:499)
        at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:402)
        at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
        at
org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.java:485)
        at
org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:464)
        at org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:302)
        at
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:527)
        at
org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:152)
        at
org.apache.velocity.io.VelocityWriter.flushBuffer(VelocityWriter.java:129)
        at
org.apache.velocity.io.VelocityWriter.write(VelocityWriter.java:306)
        at
org.apache.velocity.io.VelocityWriter.write(VelocityWriter.java:322)
        at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:491)
        at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.apache.velocity.Template.merge(Template.java:356)
        at org.apache.velocity.Template.merge(Template.java:260)
        at
org.apache.velocity.tools.view.VelocityView.performMerge(VelocityView.java:942)
        at
org.apache.velocity.tools.view.VelocityView.merge(VelocityView.java:902)
        at
org.apache.velocity.tools.view.VelocityViewServlet.mergeTemplate(VelocityViewServlet.java:318)
        at
org.apache.velocity.tools.view.VelocityLayoutServlet.mergeTemplate(VelocityLayoutServlet.java:247)
        at
org.apache.velocity.tools.view.VelocityViewServlet.doRequest(VelocityViewServlet.java:220)
        at
org.apache.velocity.tools.view.VelocityViewServlet.doGet(VelocityViewServlet.java:182)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
        at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
        at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
        at
org.apache.struts.chain.commands.servlet.PerformForward.handleAsInclude(PerformForward.java:141)
        at
org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:92)
        at
org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
        at
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
        at
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
        at
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
        at
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
        at
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
        at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

Any ideas?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU7d/SAAoJEBzwKT+lPKRY75MQAJMF2Ofdq7N/WqOVhfdA4An1
G5uEixXZ0hKDF3qwxRUFvTMdoLCzggcbtxDmlkeWwjGe98buyKCFfVTm7VEPz0B5
9Lap+MwUQWFppVUE9Ib+fUoAreQ4IViSWZf+tu31t9N2u+M9mduB9vpW4CkRRk52
ANv8q4b/ZUZb7NXfFs+OLgvoLf8hWXZRLWUupM9AKC8UH89PTLvHmoAaI071PK1T
CG5eAbzX32tKRdKSVwts8R+WpK2fEkx/3FvhUMx2zxJocI62XSm/AB0YP7YtIc8N
5UmYcyuN/PzEKFam7PshXFjgrwZhSWfpwEaSpmQoJLwGKUMqN0BQG25HBFd4+/+c
W21XA0imbS3Q9xs4HFdJ/HISb2IgEyfZ2fFEXpiVGMI/z7R3VJZESeC1Evis+bD4
DfPcW/dj6EVH2pAqcUi3zSsalxiPWg71yTNKm9Z5LUL35J27QDkVilbQb5nXdpvM
1kfgtKtz63RI8dDUnoU/wydPa4tR+GnXX+Vgk81Xz2Y8aAtf9HvMful5ZD+TwazR
E/hmBDVEdLv5KhUsfUpe7p/DQXRmV5Woar2FXKdubgpM5FunPGVmHZUgGOFZsKiI
pXtIp7vMI0h6/peDrvwy3rd1FkvBP+Qr+AgDqa19eSTJDFUVQHOqWi27WJbkFBHq
tXjX+NaChzNpxZW4vUDY
=JAd5
-----END PGP SIGNATURE-----

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


Mime
View raw message