On 10/10/2016 15:47, Thomas Boniface wrote: > Hello, > > I have managed to test this use case on the server revealing the issue with > the latest tomcat release (7.0.72). I still can observe the issue on > catalina.out side: a broken pipe exception pops up and a recycle is shown > for the async context but no complete.
Steps to reproduce? Better still, a test case that demonstrates the issue? Mark > > Oct 10, 2016 4:41:07 PM org.apache.coyote.AbstractProcessor setErrorState > INFO: An error occurred in processing while on a non-container thread. The > connection will be closed immediately > java.net.SocketException: Broken pipe > at java.net.SocketOutputStream.$$YJP$$socketWrite0(Native Method) > at java.net.SocketOutputStream.socketWrite0(SocketOutputStream.java) > at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) > at java.net.SocketOutputStream.write(SocketOutputStream.java:153) > at > org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215) > at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480) > at > org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:159) > at > org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:761) > at org.apache.coyote.Response.action(Response.java:174) > at org.apache.coyote.Response.finish(Response.java:274) > at > org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:322) > at > org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:108) > ... > Oct 10, 2016 4:41:07 PM org.apache.catalina.core.AsyncContextImpl logDebug > FINE: Req: 2de85b25 CReq: 70e2c044 RP: 1dff11c5 Stage: 7 Thread: > http-bio-8080-exec-8 State: N/A Method: recycle > URI: > /www/delivery/swfIndex.php?reqType=AdsSetup&protocolVersion=2.0&zoneId=5335 > > On application logs side the behavior changed a bit as I now have a > IllegalStateException: > > java.lang.IllegalStateException: It is illegal to call this method if the > current request is not in asynchronous mode (i.e. isAsyncStarted() returns > false) > at > org.apache.catalina.connector.Request.getAsyncContext(Request.java:1740) > ~[catalina.jar:7.0.72] > > In the end, the situation seems pretty similar. The container appears to > recycle the request without completing the async context and I can't > complete on application side as the request I have is now recycled. > > Thanks, > Thomas > > > 2016-10-03 17:06 GMT+02:00 Thomas Boniface <tho...@stickyads.tv>: > >> Hi, >> >> Thanks for your feedbacks. I noticed the issue I described do not occur on >> my local or integration environment. I still try to figure out how to >> reproduce this in an environment I can easely update to the latest tomcat >> version. >> >> Although it may not occur in latest release. Could you give me an input on >> what are the consequences of the behaviour I described ? >> >> Thanks, >> Thomas >> >> 2016-09-29 9:41 GMT+02:00 Violeta Georgieva <violet...@apache.org>: >> >>> Hi, >>> >>> 2016-09-29 10:14 GMT+03:00 Thomas Boniface <tho...@stickyads.tv>: >>>> >>>> The tomcat version is 7.0.64. >>> >>> I would recommend you to verify the behaviour against the latest Tomcat 7 >>> (7.0.72). >>> We have changes in the async processing since 7.0.64. >>> http://tomcat.apache.org/tomcat-7.0-doc/changelog.html >>> >>> Regards, >>> Violeta >>> >>>> Thomas >>>> >>>> 2016-09-28 22:43 GMT+02:00 Christopher Schultz < >>> ch...@christopherschultz.net >>>>> : >>>> > Thomas, > > On 9/28/16 11:55 AM, Thomas Boniface wrote: >>>>>>> Hi, >>>>>>> >>>>>>> When a client calls an asynchronous servlet and closes the >>>>>>> connection a java.io.IOException: Broken pipe is catched by Tomcat >>>>>>> level when the webapp tries to write to the socket. >>>>>>> >>>>>>> This exception is not transmited to the webapp level but it seems >>>>>>> the request has been recycled (all content is reinitialised), in >>>>>>> such a case it impossible for the webapp to retrieve the >>>>>>> AsyncContext from the HttpServletRequest making the AsyncContext >>>>>>> complete call impossible. >>>>>>> >>>>>>> Activating the tomcat logging for AsyncContext >>>>>>> (org.apache.catalina.core.AsyncContextImpl.level = FINE) shows the >>>>>>> recycle method is called but not the complete method, what seems to >>>>>>> confirm my assumption. In a use case were the client waits for the >>>>>>> response, I can see both complete and recycle are called. >>>>>>> >>>>>>> My question is, what is the impact of the complete not being called >>>>>>> on the AsyncContext, is the socket cleaned up properly ? > > Tomcat version? > > -chris >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>>> >>>>> >>> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org