tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54178] runtime exception in onComplete of AsyncListener, will make org.apache.catalina.connector.Request not recycled (orginally reported MESSAGE POST to tomcat, but it called doGet)
Date Tue, 02 Apr 2013 09:10:49 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54178

wan_jm@126.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---
            Summary|MESSAGE POST to tomcat, but |runtime exception in
                   |it called doGet             |onComplete of
                   |                            |AsyncListener, will make
                   |                            |org.apache.catalina.connect
                   |                            |or.Request not recycled
                   |                            |(orginally reported MESSAGE
                   |                            |POST to tomcat, but it
                   |                            |called doGet)

--- Comment #10 from wan_jm@126.com ---
hi Sir, it is reproducible now. after I debug with tomcat source code and my
application. first, I will give my analysis; second I will give the opinion
that it is a bug, hope I am right; third my question;

first: analysis
  I found that if there is a run-time exception(exclude IOException) in the
implication of onComplete, then this exception will be catched in
AbstractProtocol$AbstractConnectionHandler.process() in line
AbstractProtocol.java:581, and processor is release in line 598 of the same
file. 

but the code assume onComplete successfully returned and released
org.apache.catalina.connector.Request in function asyncDispatch; So in this
scenario Request is not recycled.

when the processor is reused again, the browser request will be the processed
by the Request that is not recycled, as there is servlet in it. then the
request is handled by the wrong servlet.


second: reason;
  you may tell me that it is the bug of the application; but in fact if this
happens in tomcat, request to another application in the same tomcat will got
error result it the client request meets the processor which contains the
Request that is not recycled;

  I think tomcat should make sure that one application deployed in it should
not be interrupt by others? do you think so?

third:
 I want to know why AsyncContextImpl.fireOnComplete catches only IOException
instead of Throwable; then maybe the above is fixed;


Sorry for my interrupt.

thanks;

-- 
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


Mime
View raw message