Summary: | IllegalStateException when calling asyncContext.dispatch() in a non container thread with ReadListener used | ||
---|---|---|---|
Product: | Tomcat 8 | Reporter: | Daniel Qian <chanjarster> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 8.5.24 | ||
Target Milestone: | ---- | ||
Hardware: | PC | ||
OS: | Mac OS X 10.1 |
Description
Daniel Qian
2017-12-27 07:36:57 UTC
I'm planning on taking a look at this today. Does the client need to do anything to trigger this or is a simple POST sufficient? I'll try the simple POST but if there is more to it it would be helpful to know what that is. Thanks for the report and the test case. Bug reports are so much easier to work with when good test cases like this one are provided. I adapted the provided Servlet into a Tomcat test case. The main change was to fix the potential timing issues (some of our CI systems can be randomly slow during test runs) by using a latch to trigger the dispatch rather than a fixed wait time. There was a Tomcat bug here that I have fixed. Fixed in: - trunk for 9.0.3 onwards - 8.5.x for 8.5.25 onwards - 8.0.x for 8.0.49 onwards 7.0.x was not affected as Servlet 3.0 does not support non-blocking I/O. (In reply to Mark Thomas from comment #1) > I'm planning on taking a look at this today. Does the client need to do > anything to trigger this or is a simple POST sufficient? I'll try the simple > POST but if there is more to it it would be helpful to know what that is. Yes, I missed mention that I used a curl command with slow speed simulation: curl -X POST -F "bigfile=@somefile" --limit-rate 5k http://localhost:8080/async-read2 |