You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/09/21 14:08:06 UTC
svn commit: r1173582 - in /tomcat/tc6.0.x/trunk: STATUS.txt
java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml
Author: markt
Date: Wed Sep 21 12:08:06 2011
New Revision: 1173582
URL: http://svn.apache.org/viewvc?rev=1173582&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51794
Race condition in NioEndpoint selector
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1173582&r1=1173581&r2=1173582&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Sep 21 12:08:06 2011
@@ -76,11 +76,6 @@ PATCHES PROPOSED TO BACKPORT:
+1: kkolinko, rjung, fhanik
-1:
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51794
- Race condition in NioEndpoint selector
- +1: fhanik, kkolinko, markt
- -1
-
* Fine grained control of session attribute replication in clusters.
Trunk revisions: 1172233, 1172234, 1172236
TC7 revisions: 1172259
Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1173582&r1=1173581&r2=1173582&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Sep 21 12:08:06 2011
@@ -1579,12 +1579,11 @@ public class NioEndpoint {
int keyCount = 0;
try {
if ( !close ) {
- if (wakeupCounter.get()>0) {
+ if (wakeupCounter.getAndSet(-1) > 0) {
//if we are here, means we have other stuff to do
//do a non blocking select
keyCount = selector.selectNow();
- }else {
- wakeupCounter.set( -1);
+ } else {
keyCount = selector.select(selectorTimeout);
}
wakeupCounter.set(0);
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1173582&r1=1173581&r2=1173582&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Sep 21 12:08:06 2011
@@ -71,6 +71,10 @@
Detect incomplete AJP messages and reject the associated request if one
is found. (markt)
</fix>
+ <fix>
+ <bug>51794</bug>: Fix race condition in NioEndpoint selector. Patch
+ provided by dlord. (fhanik)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org