Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.3
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: fs/s3
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      We've had a report of hive deadlocking on teardown, as a synchronous FS close was blocking shutdown threads, similar to HADOOP-3139

      S3a close needs to be made non-synchronized. All we need is some code to prevent re-entrancy at the start; easily done

      1. HADOOP-13599-branch-2-003.patch
        2 kB
        Steve Loughran
      2. HADOOP-13599-branch-2-002.patch
        2 kB
        Steve Loughran
      3. HADOOP-13599-branch-2-001.patch
        1 kB
        Steve Loughran

        Activity

        Hide
        stevel@apache.org Steve Loughran added a comment -

        Patch 001: move to an atomic boolean for the close check

        Show
        stevel@apache.org Steve Loughran added a comment - Patch 001: move to an atomic boolean for the close check
        Hide
        stevel@apache.org Steve Loughran added a comment -

        Patch 002. This adds a fairly low-value test case to close an instance twice; this verifies that nothing visibly fails on that second call; re-entrancy is still something which will need manual review.

        test endpoint: s3a ireland

        Show
        stevel@apache.org Steve Loughran added a comment - Patch 002. This adds a fairly low-value test case to close an instance twice; this verifies that nothing visibly fails on that second call; re-entrancy is still something which will need manual review. test endpoint: s3a ireland
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 21s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 6m 35s branch-2 passed
        +1 compile 0m 15s branch-2 passed with JDK v1.8.0_101
        +1 compile 0m 18s branch-2 passed with JDK v1.7.0_111
        +1 checkstyle 0m 15s branch-2 passed
        +1 mvnsite 0m 24s branch-2 passed
        +1 mvneclipse 0m 16s branch-2 passed
        +1 findbugs 0m 33s branch-2 passed
        +1 javadoc 0m 13s branch-2 passed with JDK v1.8.0_101
        +1 javadoc 0m 16s branch-2 passed with JDK v1.7.0_111
        +1 mvninstall 0m 17s the patch passed
        +1 compile 0m 13s the patch passed with JDK v1.8.0_101
        +1 javac 0m 13s the patch passed
        +1 compile 0m 16s the patch passed with JDK v1.7.0_111
        +1 javac 0m 16s the patch passed
        -0 checkstyle 0m 12s hadoop-tools/hadoop-aws: The patch generated 1 new + 8 unchanged - 0 fixed = 9 total (was 8)
        +1 mvnsite 0m 21s the patch passed
        +1 mvneclipse 0m 12s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 0m 43s the patch passed
        +1 javadoc 0m 10s the patch passed with JDK v1.8.0_101
        +1 javadoc 0m 14s the patch passed with JDK v1.7.0_111
        +1 unit 0m 20s hadoop-aws in the patch passed with JDK v1.7.0_111.
        +1 asflicense 0m 17s The patch does not generate ASF License warnings.
        14m 45s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:b59b8b7
        JIRA Issue HADOOP-13599
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12828199/HADOOP-13599-branch-2-002.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux c01e9b44de6a 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision branch-2 / 8c8ff0c
        Default Java 1.7.0_111
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_111
        findbugs v3.0.0
        checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/10492/artifact/patchprocess/diff-checkstyle-hadoop-tools_hadoop-aws.txt
        JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10492/testReport/
        modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10492/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 21s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 6m 35s branch-2 passed +1 compile 0m 15s branch-2 passed with JDK v1.8.0_101 +1 compile 0m 18s branch-2 passed with JDK v1.7.0_111 +1 checkstyle 0m 15s branch-2 passed +1 mvnsite 0m 24s branch-2 passed +1 mvneclipse 0m 16s branch-2 passed +1 findbugs 0m 33s branch-2 passed +1 javadoc 0m 13s branch-2 passed with JDK v1.8.0_101 +1 javadoc 0m 16s branch-2 passed with JDK v1.7.0_111 +1 mvninstall 0m 17s the patch passed +1 compile 0m 13s the patch passed with JDK v1.8.0_101 +1 javac 0m 13s the patch passed +1 compile 0m 16s the patch passed with JDK v1.7.0_111 +1 javac 0m 16s the patch passed -0 checkstyle 0m 12s hadoop-tools/hadoop-aws: The patch generated 1 new + 8 unchanged - 0 fixed = 9 total (was 8) +1 mvnsite 0m 21s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 43s the patch passed +1 javadoc 0m 10s the patch passed with JDK v1.8.0_101 +1 javadoc 0m 14s the patch passed with JDK v1.7.0_111 +1 unit 0m 20s hadoop-aws in the patch passed with JDK v1.7.0_111. +1 asflicense 0m 17s The patch does not generate ASF License warnings. 14m 45s Subsystem Report/Notes Docker Image:yetus/hadoop:b59b8b7 JIRA Issue HADOOP-13599 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12828199/HADOOP-13599-branch-2-002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux c01e9b44de6a 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision branch-2 / 8c8ff0c Default Java 1.7.0_111 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_111 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/10492/artifact/patchprocess/diff-checkstyle-hadoop-tools_hadoop-aws.txt JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10492/testReport/ modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10492/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        cnauroth Chris Nauroth added a comment -
          private static final AtomicBoolean closed = new AtomicBoolean(false);
        

        Please make this a member variable, so multiple S3AFileSystem instances created within the same process can get closed independently. I assume this is just a copy-paste error from warnedOfCoreThreadDeprecation, where static is appropriate.

          @Test
          public void testCloseReentrant() throws Throwable {
            conf = new Configuration();
            fs = S3ATestUtils.createTestFileSystem(conf);
            fs.close();
            fs.close();
          }
        

        I suggest changing the name of this test method, because it doesn't really cover reentrancy. It does cover idempotence though, so maybe testCloseIdempotent?

        Show
        cnauroth Chris Nauroth added a comment - private static final AtomicBoolean closed = new AtomicBoolean( false ); Please make this a member variable, so multiple S3AFileSystem instances created within the same process can get closed independently. I assume this is just a copy-paste error from warnedOfCoreThreadDeprecation , where static is appropriate. @Test public void testCloseReentrant() throws Throwable { conf = new Configuration(); fs = S3ATestUtils.createTestFileSystem(conf); fs.close(); fs.close(); } I suggest changing the name of this test method, because it doesn't really cover reentrancy. It does cover idempotence though, so maybe testCloseIdempotent ?
        Hide
        stevel@apache.org Steve Loughran added a comment -

        Patch 003, address chris's comments, especially the bit where I broke everything

        Show
        stevel@apache.org Steve Loughran added a comment - Patch 003, address chris's comments, especially the bit where I broke everything
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 17s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 7m 43s branch-2 passed
        +1 compile 0m 18s branch-2 passed with JDK v1.8.0_101
        +1 compile 0m 20s branch-2 passed with JDK v1.7.0_111
        +1 checkstyle 0m 16s branch-2 passed
        +1 mvnsite 0m 26s branch-2 passed
        +1 mvneclipse 1m 10s branch-2 passed
        +1 findbugs 0m 34s branch-2 passed
        +1 javadoc 0m 13s branch-2 passed with JDK v1.8.0_101
        +1 javadoc 0m 16s branch-2 passed with JDK v1.7.0_111
        +1 mvninstall 0m 17s the patch passed
        +1 compile 0m 14s the patch passed with JDK v1.8.0_101
        +1 javac 0m 14s the patch passed
        +1 compile 0m 16s the patch passed with JDK v1.7.0_111
        +1 javac 0m 16s the patch passed
        +1 checkstyle 0m 11s the patch passed
        +1 mvnsite 0m 21s the patch passed
        +1 mvneclipse 0m 13s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 0m 41s the patch passed
        +1 javadoc 0m 10s the patch passed with JDK v1.8.0_101
        +1 javadoc 0m 13s the patch passed with JDK v1.7.0_111
        +1 unit 0m 21s hadoop-aws in the patch passed with JDK v1.7.0_111.
        +1 asflicense 0m 17s The patch does not generate ASF License warnings.
        16m 48s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:b59b8b7
        JIRA Issue HADOOP-13599
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12830543/HADOOP-13599-branch-2-003.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux e372b4ac32ec 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision branch-2 / 80628ee
        Default Java 1.7.0_111
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_111
        findbugs v3.0.0
        JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10614/testReport/
        modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10614/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 17s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 43s branch-2 passed +1 compile 0m 18s branch-2 passed with JDK v1.8.0_101 +1 compile 0m 20s branch-2 passed with JDK v1.7.0_111 +1 checkstyle 0m 16s branch-2 passed +1 mvnsite 0m 26s branch-2 passed +1 mvneclipse 1m 10s branch-2 passed +1 findbugs 0m 34s branch-2 passed +1 javadoc 0m 13s branch-2 passed with JDK v1.8.0_101 +1 javadoc 0m 16s branch-2 passed with JDK v1.7.0_111 +1 mvninstall 0m 17s the patch passed +1 compile 0m 14s the patch passed with JDK v1.8.0_101 +1 javac 0m 14s the patch passed +1 compile 0m 16s the patch passed with JDK v1.7.0_111 +1 javac 0m 16s the patch passed +1 checkstyle 0m 11s the patch passed +1 mvnsite 0m 21s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 41s the patch passed +1 javadoc 0m 10s the patch passed with JDK v1.8.0_101 +1 javadoc 0m 13s the patch passed with JDK v1.7.0_111 +1 unit 0m 21s hadoop-aws in the patch passed with JDK v1.7.0_111. +1 asflicense 0m 17s The patch does not generate ASF License warnings. 16m 48s Subsystem Report/Notes Docker Image:yetus/hadoop:b59b8b7 JIRA Issue HADOOP-13599 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12830543/HADOOP-13599-branch-2-003.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux e372b4ac32ec 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision branch-2 / 80628ee Default Java 1.7.0_111 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_111 findbugs v3.0.0 JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10614/testReport/ modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10614/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        cnauroth Chris Nauroth added a comment -

        +1 for patch 003. I committed this to trunk, branch-2 and branch-2.8 after resolving a minor merge conflict for trunk. Thank you, Steve.

        Show
        cnauroth Chris Nauroth added a comment - +1 for patch 003. I committed this to trunk, branch-2 and branch-2.8 after resolving a minor merge conflict for trunk. Thank you, Steve.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10510 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10510/)
        HADOOP-13599. s3a close() to be non-synchronized, so avoid risk of (cnauroth: rev 47f80922dc7cb2fa6d084e6fb1f354c4ec1d4c69)

        • (edit) hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AConfiguration.java
        • (edit) hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10510 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10510/ ) HADOOP-13599 . s3a close() to be non-synchronized, so avoid risk of (cnauroth: rev 47f80922dc7cb2fa6d084e6fb1f354c4ec1d4c69) (edit) hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AConfiguration.java (edit) hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java

          People

          • Assignee:
            stevel@apache.org Steve Loughran
            Reporter:
            stevel@apache.org Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development