tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49730] Race condition in StandardThreadExecutor : requests are sometimes enqueued instead of creating new threads
Date Sat, 02 Oct 2010 21:36:54 GMT

--- Comment #6 from 2010-10-02 17:36:49 EDT ---
(In reply to comment #5)
> Regarding TC7:
> 1) Why StandardThreadExecutor in TC7 was not patched? Can it be removed, or
> should it be patched by applying TC6 patch to TC7?

StandardThreadExecutor actually delegates to a
org.apache.tomcat.util.threads.ThreadPoolExecutor which is the one that has
been patched. 
But then your question leads to this next : why the catch
(RejectedExecutionException rx) in StandardThreadExecutor.execute ? it's
already handled in org.apache.tomcat.util.threads.ThreadPoolExecutor.execute

Some javadoc comments would also be useful to explain why we have 2 classes
whereas there was only one in tc6 (I guess it's because of the Lifecycle
refactoring and JMX things?)

> Regarding TC6 and TC7 patches:
> 2) I would prefer using a finally block to decrement the counter on errors.

agreed, but it should not be decremented if the task can be forced into the
queue after a RejectedExecutionException.

Do you want a new patch to the current trunk ? for the interrupt() and the
decrement in finally ?

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message