tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54928] New: IllegalStateException: Calling [asyncError()] is not valid for a request with Async state [COMPLETING]
Date Sat, 04 May 2013 12:41:30 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54928

            Bug ID: 54928
           Summary: IllegalStateException: Calling [asyncError()] is not
                    valid for a request with Async state [COMPLETING]
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: rstoyanchev@yahoo.com
    Classification: Unclassified

In an async scenario (request.startAsync), when the client goes away, trying to
write to the response raises an IOException. If I then call
asyncContext.complete() in order to finalize and clean up the request, soon
after the following exception occurs:

java.lang.IllegalStateException: Calling [asyncError()] is not valid for a
request with Async state [COMPLETING]
        at
org.apache.coyote.AsyncStateMachine.asyncError(AsyncStateMachine.java:304)
        at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:793)
        at org.apache.coyote.Request.action(Request.java:373)
        at
org.apache.catalina.core.AsyncContextImpl.setErrorState(AsyncContextImpl.java:441)
        at
org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:312)
        at
org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1509)
        at
org.apache.coyote.http11.Http11NioProcessor.asyncDispatch(Http11NioProcessor.java:221)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:619)
        at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1581)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1540)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)

It looks like an attempt to maybe to send an error event to AsyncListener's but
asyncContext.complete has already been called.

Is calling asyncContext.complete() a reasonable way to handle an IOException
from the response in order to finalize the request and release any resorces
associated with it?

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