Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004723 [Resin] minor always 08-22-11 11:02 09-02-11 10:29
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.21
Summary 0004723: async state machine issues
Description (rep by Mark Price)

we're seeing some odd errors in our production logs when processing async requests.
The message we see is:

java.lang.IllegalStateException: async dispatch is not valid outside of an async cycle. Current state: INIT
    at com.caucho.network.listen.SocketLinkRequestState.toAsyncWake(SocketLinkRequestState.java:278)
    at com.caucho.network.listen.TcpSocketLink.requestWakeComet(TcpSocketLink.java:681)
    at com.caucho.network.listen.TcpAsyncController.wake(TcpAsyncController.java:113)
    at com.caucho.server.http.AsyncContextImpl.dispatch(AsyncContextImpl.java:237)

where current state is one of INIT,REQUEST,KEEPALIVE.

Our usage pattern is as follows:

on request thread
- ServletRequest.startAsync(request, response)
- store AsyncContext in a ConcurrentHashMap keyed by sessionId

on incoming event thread
- lookup AsyncContext by sessionId
- AsyncContextImpl.dispatch()


We have a copy of the code that is causing this error, and it looks as though we should never have more than one AsyncContext per session. Are there any other scenarios in which this error is expected - i.e. is AysncContext state guaranteed to be ready for dispatch after ServletRequest.startAsync(request, response)?


Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
08-22-11 11:02 ferg New Issue
09-02-11 10:29 ferg Assigned To  => ferg
09-02-11 10:29 ferg Status new => closed
09-02-11 10:29 ferg Resolution open => fixed
09-02-11 10:29 ferg Fixed in Version  => 4.0.21


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
26 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker