https://bz.apache.org/bugzilla/show_bug.cgi?id=57638
Bug ID: 57638
Summary: IllegalArgumentException in AjpNioProcessor when
packetSize > 8192
Product: Tomcat 8
Version: 8.0.20
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
For reference: http://markmail.org/thread/vu7kgdpqxdw7tlkz
This stack trace is from 8.0.17 but I have been able to reproduce it in 8.0.20
and 7.0.56 - 7.0.59:
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)
Connector configuration:
<Connector port="@connector-port@"
redirectPort="443"
protocol="org.apache.coyote.ajp.AjpNioProtocol"
URIEncoding="UTF-8"
packetSize="65536"
executor="tomcatThreadPool" />
Here's what I know so far:
1. AjpNioProtocol fails under some conditions (my post-login page)
with packetSize larger than the default (I have tried 65536, 32768,
16184, and 8200). The failing page is ~30k in size, enough to
exceed the default packet size but not e.g. maximum 64k
2. Using AjpProtocol (BIO) connector solves the problem
3. Using the default AJP packet size (8192) solves the problem
4. Specifying socket.appReadBufSize and socket.appWriteBufSize to be
the same as the packet size solves the problem
I'm still working on a small test case to help motivate debugging.
Wild-guessing that the root cause is mismatched buffer sizes, or lack of
checking when using a smaller protocol buffer than whatever buffer is pumping
into the protocol's buffer.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]