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 Wed, 24 Apr 2013 11:43:35 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54178

Mark Thomas <markt@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #13 from Mark Thomas <markt@apache.org> ---
(In reply to comment #10)
> 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;

Thanks for the additional work to get to the bottom of this.

> first: analysis

The analysis skips over a few stages but is correct. A RuntimeException in a
AsyncListener leads to the problems observed because the Request object is not
recycled.

> second: reason;

Applications should not be throwing RuntimeExceptions in an AsyncListener but
equally it makes sense for Tomcat to protect against that happening in case
they do.

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

Only IOException were caught as they were the only ones that should have been
thrown. I agree the fix is to catch Throwable (well almost - there are some
Throwables that should never be caught but Tomcat has utility code to handle
that).

The fix has been applied to trunk and 7.0.x and will be included in 7.0.40
onwards.

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