On 12/09/2010 17:45, Mark Thomas wrote:
> Digging into the root causes of [1] it appears that there are a number
> of threading / timing issues with the current AsyncContextImpl. Running
> the provided test case with ab -n 50 -c 20 triggers the error every
> couple of runs. The error appears to occur when the thread where
> complete() is called finishes before the thread where startAsync() is
> called.

<snip/>

> At the moment [2] is in a very rough and ready state and only handles
> startAsync() and complete() for the BIO HTTP connector. I wanted to give
> folks early sight of this patch so I could incorporate any early feedback.
> 
> I plan to expand the patch to cover dispatch(), timeouts, the other
> connectors, passing our test cases and passing the TCK before
> committing. I'm not sure how long that will take. I hope to get this
> done this week.
> 
> [1] https://issues.apache.org/bugzilla/show_bug.cgi?id=49884
> [2]
> http://people.apache.org/~markt/patches/2010-09-12-async-refactoring.patch

Just to keep folks in the loop. The latest patch [3] is now available
for you to take a look at. It now handles timeouts and passes all our
tests cases. It even does pretty well with the TCK.

In further testing of [1] I came across an edge case that required
adding a lock to the SocketWrapper. Without this requests could get lost
and end up timing out when they should have been processed.
Performance-wise this doesn't appear to add any noticeable cost.

My plan is still to get this fully working for BIO HTTP before extending
it to the other connectors. Still on the to do list for BIO HTTP are:
- checking dispatches work (need to add some test cases for this)
- fixing timeouts (I know these are broken)
- error handling (largely commented out at the moment)

I don't want to commit this incrementally since that will just trigger a
deluge of failed test reports from Gump and buildbot. If folks would
prefer a more incremental approach and can live with the nags for a few
weeks, I'm happy to commit rather than provide patches for review.

Mark

[3]
http://people.apache.org/~markt/patches/2010-09-15-async-refactoring.patch

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to