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 2011/06/05 07:17:12 UTC
DO NOT REPLY [Bug 51324] New: When OutputBuffer.doFlush gets
Exception, doFlush gets stuck to true
https://issues.apache.org/bugzilla/show_bug.cgi?id=51324
Bug #: 51324
Summary: When OutputBuffer.doFlush gets Exception, doFlush gets
stuck to true
Product: Tomcat 7
Version: 7.0.14
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: bow.ruggeri@service-now.com
Classification: Unclassified
Created attachment 27114
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27114
The line that causes doFlush to be stuck at true if it gets an exception
First time opening a bug, please forgive me if this report isn't perfect!
I recently ran into an issue where OutputBuffer's doFlush gets stuck to true.
In OutputBuffer.doFlush(boolean) it sets doFlush = true, then calls
bb.flushBuffer, then sets doFlush = false.
I issue I ran into was bb.flushBuffer eventually calls
OutputBuffer.realWriteBytes. The realWriteBytes eventually calls
coyoteResponse.doWrite. If coyoteResponse.doWrite throws an IOException, then
it rethrows a ClientAbortException.
What I am seeing is my client disconnecting early, and causing the doWrite to
throw a SocketException of "Broken pipe". That broken pipe causes a
ClientAbortException to be thrown.
When that is thrown, the error is bubbled up and doFlush is stuck as "true".
The next time the processor is used, it calls the recycle() method in
OutputBuffer. However, the recycle doesn't reset doFlush so its still set to
true.
I imagine there are quite a few ways to fix this, but the two obvious ones that
come to mind are:
- Have recycle() set doFlush back to false
or
- Have throw a finally in try/catch/finally in OutputBuffer.doFlush so doFlush
is set back to false when an Exception is catch
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 51324] When OutputBuffer.doFlush gets Exception,
doFlush gets stuck to true
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51324
--- Comment #2 from Jeremy Norris <jn...@gmail.com> 2011-06-07 06:14:27 UTC ---
I'm also experiencing this problem. Attached is a patch implementing both of
Bow's suggestions.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 51324] When OutputBuffer.doFlush gets Exception,
doFlush gets stuck to true
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51324
--- Comment #4 from Konstantin Kolinko <kn...@gmail.com> 2011-07-05 08:59:07 UTC ---
Proposed for backport to 6.0 and 5.5.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 51324] When OutputBuffer.doFlush gets Exception,
doFlush gets stuck to true
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51324
--- Comment #5 from Mark Thomas <ma...@apache.org> 2011-07-21 16:29:04 UTC ---
Fixed in 6.0.x and included in 6.0.33 onwards
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 51324] When OutputBuffer.doFlush gets Exception,
doFlush gets stuck to true
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51324
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Mark Thomas <ma...@apache.org> 2011-06-07 14:00:47 UTC ---
Thanks for the patch. This has been fixed in 7.0.x and will be included in
7.0.16 onwards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 51324] When OutputBuffer.doFlush gets Exception,
doFlush gets stuck to true
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51324
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #27122|0 |1
is patch| |
Attachment #27122|application/octet-stream |text/plain
mime type| |
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 51324] When OutputBuffer.doFlush gets Exception,
doFlush gets stuck to true
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51324
--- Comment #1 from Jeremy Norris <jn...@gmail.com> 2011-06-07 06:12:53 UTC ---
Created attachment 27122
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27122
Patch
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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