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 2017/07/27 11:55:30 UTC

svn commit: r1803165 - in /tomcat/trunk: build.xml java/org/apache/tomcat/util/net/LocalStrings.properties java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml

Author: markt
Date: Thu Jul 27 11:55:30 2017
New Revision: 1803165

URL: http://svn.apache.org/viewvc?rev=1803165&view=rev
Log:
Add additional logging to record problems that occur while waiting for the NIO pollers to stop during the Connector stop process.

Modified:
    tomcat/trunk/build.xml
    tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/build.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1803165&r1=1803164&r2=1803165&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Thu Jul 27 11:55:30 2017
@@ -1590,6 +1590,7 @@
               excludeFilter="res/findbugs/filter-false-positives.xml" >
       <sourcePath path="${basedir}/java" />
       <class location="${tomcat.classes}" />
+      <class location="${test.classes}" />
       <auxClasspath>
         <fileset file="${jdt.jar}" />
         <fileset file="${ant.core.lib}" />

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties?rev=1803165&r1=1803164&r2=1803165&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties Thu Jul 27 11:55:30 2017
@@ -77,6 +77,8 @@ endpoint.apr.remoteport=APR socket [{0}]
 endpoint.jsse.noSslContext=No SSLContext could be found for the host name [{0}]
 endpoint.nio.registerFail=Failed to register socket with selector from poller
 endpoint.nio.selectorCloseFail=Failed to close selector when closing the poller
+endpoint.nio.stopLatchAwaitFail=The pollers did not stop within the expected time
+endpoint.nio.stopLatchAwaitInterrupted=This thread was interrupted while waiting for the pollers to stop
 endpoint.nio.timeoutCme=Exception during processing of timeouts. The code has been checked repeatedly and no concurrent modification has been found. If you are able to repeat this error please open a Tomcat bug and provide the steps to reproduce.
 endpoint.nio2.exclusiveExecutor=The NIO2 connector requires an exclusive executor to operate properly on shutdown
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1803165&r1=1803164&r2=1803165&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Jul 27 11:55:30 2017
@@ -284,15 +284,17 @@ public class NioEndpoint extends Abstrac
                 pollers[i] = null;
             }
             try {
-                getStopLatch().await(selectorTimeout + 100, TimeUnit.MILLISECONDS);
-            } catch (InterruptedException ignore) {
+                if (!getStopLatch().await(selectorTimeout + 100, TimeUnit.MILLISECONDS)) {
+                    log.warn(sm.getString("endpoint.nio.stopLatchAwaitFail"));
+                }
+            } catch (InterruptedException e) {
+                log.warn(sm.getString("endpoint.nio.stopLatchAwaitInterrupted"), e);
             }
             shutdownExecutor();
             eventCache.clear();
             nioChannels.clear();
             processorCache.clear();
         }
-
     }
 
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1803165&r1=1803164&r2=1803165&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Jul 27 11:55:30 2017
@@ -56,9 +56,13 @@
     <changelog>
       <update>
         <bug>61345</bug>: Add a server listener that can be used to do system
-         property replacement from the property source configured in the
-         digester. (remm)
+        property replacement from the property source configured in the
+        digester. (remm)
       </update>
+      <add>
+        Add additional logging to record problems that occur while waiting for
+        the NIO pollers to stop during the Connector stop process. (markt)
+      </add>
     </changelog>
   </subsection>
 </section>



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