Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11368

Fix SSLFactory truststore reloader thread leak in KMSClientProvider

Details

    Description

      When a KMSClientProvider is initialized in ssl mode, It initializes a SSLFactory object. This in-turn creates an instance of ReloadingX509TrustManager which, on initialization, starts a trust store reloader thread.

      It is noticed that over time, as a number of short lived KMSClientProvider instances are created and destroyed, the trust store manager threads are not interrupted/killed and remain in TIMED_WAITING state. A Thread dump shows multiple:

      "Truststore reloader thread" daemon prio=10 tid=0x00007fb1cf942800 nid=0x4e99 waiting on condition [0x00007fb0485f5000]
         java.lang.Thread.State: TIMED_WAITING (sleeping)
              at java.lang.Thread.sleep(Native Method)
              at org.apache.hadoop.security.ssl.ReloadingX509TrustManager.run(ReloadingX509TrustManager.java:189)
              at java.lang.Thread.run(Thread.java:662)
      
         Locked ownable synchronizers:
              - None
      

      Attachments

        1. HADOOP-11368.1.patch
          3 kB
          Arun Suresh

        Activity

          asuresh Arun Suresh added a comment -

          Uploading patch to fix this.

          asuresh Arun Suresh added a comment - Uploading patch to fix this.
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12685960/HADOOP-11368.1.patch
          against trunk revision db73cc9.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 1 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. There were no new javadoc warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          -1 findbugs. The patch appears to introduce 65 new Findbugs (version 2.0.3) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common hadoop-common-project/hadoop-kms.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5204//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/5204//artifact/patchprocess/newPatchFindbugsWarningshadoop-common.html
          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5204//console

          This message is automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12685960/HADOOP-11368.1.patch against trunk revision db73cc9. +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. -1 findbugs . The patch appears to introduce 65 new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common hadoop-common-project/hadoop-kms. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5204//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/5204//artifact/patchprocess/newPatchFindbugsWarningshadoop-common.html Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5204//console This message is automatically generated.
          asuresh Arun Suresh added a comment -

          The findbugs warnings are unrelated and being tracked by HADOOP-11366

          asuresh Arun Suresh added a comment - The findbugs warnings are unrelated and being tracked by HADOOP-11366
          andrew.wang Andrew Wang added a comment -

          Yea, LGTM. Thanks for fixing this Arun, nice unit test too.

          +1 will commit shortly.

          andrew.wang Andrew Wang added a comment - Yea, LGTM. Thanks for fixing this Arun, nice unit test too. +1 will commit shortly.
          andrew.wang Andrew Wang added a comment -

          Committed to trunk and branch-2, TY again Arun.

          andrew.wang Andrew Wang added a comment - Committed to trunk and branch-2, TY again Arun.
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #6678 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6678/)
          HADOOP-11368. Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #6678 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6678/ ) HADOOP-11368 . Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #36 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/36/)
          HADOOP-11368. Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8)

          • hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #36 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/36/ ) HADOOP-11368 . Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8) hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java hadoop-common-project/hadoop-common/CHANGES.txt
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #771 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/771/)
          HADOOP-11368. Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #771 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/771/ ) HADOOP-11368 . Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #1968 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1968/)
          HADOOP-11368. Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #1968 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1968/ ) HADOOP-11368 . Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #34 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/34/)
          HADOOP-11368. Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8)

          • hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #34 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/34/ ) HADOOP-11368 . Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8) hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #38 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/38/)
          HADOOP-11368. Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          • hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #38 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/38/ ) HADOOP-11368 . Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #1988 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1988/)
          HADOOP-11368. Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8)

          • hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #1988 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1988/ ) HADOOP-11368 . Fix SSLFactory truststore reloader thread leak in KMSClientProvider. Contributed by Arun Suresh. (wang: rev 74d4bfded98239507511dedb515bc6a54958d5a8) hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java

          Pulled this into 2.6.1 after ajisakaa verified that the patch applies cleanly. Ran compilation and TestKMS before the push.

          vinodkv Vinod Kumar Vavilapalli added a comment - Pulled this into 2.6.1 after ajisakaa verified that the patch applies cleanly. Ran compilation and TestKMS before the push.

          People

            asuresh Arun Suresh
            asuresh Arun Suresh
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: