Author: markt
Date: Fri Apr 6 19:35:41 2018
New Revision: 1828545
URL: http://svn.apache.org/viewvc?rev=1828545&view=rev
Log:
Correct off-by-one error in thread pool that allowed thread pools to increase
in size to one more than the configured limit.
Patch provided by usc.
This closes #104
Modified:
tomcat/trunk/java/org/apache/tomcat/util/threads/TaskQueue.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/tomcat/util/threads/TaskQueue.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/threads/TaskQueue.java?rev=1828545&r1=1828544&r2=1828545&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/threads/TaskQueue.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/threads/TaskQueue.java Fri Apr 6
19:35:41 2018
@@ -71,7 +71,7 @@ public class TaskQueue extends LinkedBlo
//we are maxed out on threads, simply queue the object
if (parent.getPoolSize() == parent.getMaximumPoolSize()) return
super.offer(o);
//we have idle threads, just add it to the queue
- if (parent.getSubmittedCount()<(parent.getPoolSize())) return
super.offer(o);
+ if (parent.getSubmittedCount()<=(parent.getPoolSize())) return
super.offer(o);
//if we have less threads than maximum force creation of a new thread
if (parent.getPoolSize()<parent.getMaximumPoolSize()) return false;
//if we reached here, we need to add it to the queue
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1828545&r1=1828544&r2=1828545&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Apr 6 19:35:41 2018
@@ -45,6 +45,13 @@
issues do not "pop up" wrt. others).
-->
<section name="Tomcat 9.0.8 (markt)" rtext="in development">
+ <subsection name="Coyote">
+ <fix>
+ Correct off-by-one error in thread pool that allowed thread pools to
+ increase in size to one more than the configured limit. Patch provided by
+ usc. (markt)
+ </fix>
+ </subsection>
</section>
<section name="Tomcat 9.0.7 (markt)" rtext="release in progress">
<subsection name="Catalina">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]