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 2006/01/21 21:35:09 UTC
DO NOT REPLY [Bug 38346] New: - InputBuffer breaks request.readLine()
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38346>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38346
Summary: InputBuffer breaks request.readLine()
Product: Tomcat 5
Version: 5.5.14
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: rainer.jung@kippdata.de
There are two bugs in
org.apache.catalina.connector.InputBuffer:
1) If you send a POST with 8K in the body then the optimizedWrite flag in
CharChunk prevents the input data from being read into the CharChunk. This only
happens at and after the second request on an input processor, because the
optimizedWrite flag ist being set to true when recycling the InputBuffer after
the first request.
2) After fixing that, you can more easily see another bug: realReadChars always
reads the full ByteChunk buffer size and then tries to convert it into the
CharChunk. There is a corner case, where CharChunk has a limit just a little too
small, to be able to do that. This is not about making CharChunk much bigger. I
can give more precise details, but the patch might be self-explaining (it is
very short).
I attach
- a patch
- a JSP and a perl script to easily reproduce the problem. Problem 1) can be
reprodiced by setting CHUNK in the script to 8192, problem 2 (after fixing 1) by
setting it slightly bigger than 8192, e.g. 8300.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38346] - InputBuffer breaks request.readLine()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38346>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38346
------- Additional Comments From rainer.jung@kippdata.de 2006-01-21 21:36 -------
Created an attachment (id=17478)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17478&action=view)
Patch for InputBuffer fixing 1) and 2)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38346] - InputBuffer breaks request.readLine()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38346>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38346
------- Additional Comments From rainer.jung@kippdata.de 2006-01-23 15:48 -------
I was at our customers side today. The problem is always reproducible with the
ajp connector. On his system, I can not reproduce with HTTP connector. But from
the code in InputBuffer it's clear, that the occurence of the bug only depends
on the amount of data received on the socket, when the buffer loads new data.
I'm pretty confident, that the patch also fixes bugs 34829, 28959, 27447, and
24897. I know, that CoyoteReader/InputBuffer/(Byte|Char)Chunk are difficult to
understand and noone wants to touch them. But I instrumented the classes to
exactly find out what's happening, and if Remy (or whoever is willing to dig
into it) likes more explanation of the patch please ask.
At the customer's installation his problem was fixed with the patch.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38346] - InputBuffer breaks request.readLine()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38346>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38346
------- Additional Comments From rainer.jung@kippdata.de 2006-01-21 21:38 -------
Created an attachment (id=17480)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17480&action=view)
Test Client perl script
Client side script which posts data to the test JSP to reproduce both bugs.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38346] - InputBuffer breaks request.readLine()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38346>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38346
william.barker@wilshire.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From william.barker@wilshire.com 2006-01-24 05:22 -------
(In reply to comment #5)
> I was at our customers side today. The problem is always reproducible with
the
> ajp connector. On his system, I can not reproduce with HTTP connector. But
from
> the code in InputBuffer it's clear, that the occurence of the bug only
depends
> on the amount of data received on the socket, when the buffer loads new data.
By default, the HTTP connector only reads 4K at a time, so serendipitously
this bug doesn't show itself.
The patch has been committed to the SVN trunk, and will appear in 5.5.16.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38346] - InputBuffer breaks request.readLine()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38346>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38346
------- Additional Comments From rainer.jung@kippdata.de 2006-01-21 21:37 -------
Created an attachment (id=17479)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17479&action=view)
Test JSP
Test JSP to be called by the next attachment
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38346] - InputBuffer breaks request.readLine()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38346>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38346
markt@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mcamou@mail.com
------- Additional Comments From markt@apache.org 2007-06-01 19:09 -------
*** Bug 38836 has been marked as a duplicate of this bug. ***
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38346] - InputBuffer breaks request.readLine()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38346>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38346
------- Additional Comments From rainer.jung@kippdata.de 2006-01-21 21:39 -------
By the way: the same problem (and the same fix) apply to the 5.0 branch.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org