Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha4, 2.8.2
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      TestJMXGet times out occasionally with the following call stack.

      java.lang.Exception: test timed out
      	at java.lang.Object.wait(Native Method)
      	at java.io.PipedInputStream.awaitSpace(PipedInputStream.java:273)
      	at java.io.PipedInputStream.receive(PipedInputStream.java:231)
      	at java.io.PipedOutputStream.write(PipedOutputStream.java:149)
      	at java.io.PrintStream.write(PrintStream.java:480)
      	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
      	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
      	at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)
      	at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)
      	at java.io.PrintStream.write(PrintStream.java:527)
      	at java.io.PrintStream.print(PrintStream.java:669)
      	at java.io.PrintStream.println(PrintStream.java:806)
      	at org.apache.hadoop.hdfs.tools.JMXGet.err(JMXGet.java:245)
      	at org.apache.hadoop.hdfs.tools.JMXGet.printAllValues(JMXGet.java:105)
      	at org.apache.hadoop.tools.TestJMXGet.checkPrintAllValues(TestJMXGet.java:136)
      	at org.apache.hadoop.tools.TestJMXGet.testNameNode(TestJMXGet.java:108)
      
      1. HDFS-11967.01.patch
        0.9 kB
        Arpit Agarwal

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11860 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11860/)
        HDFS-11967. TestJMXGet fails occasionally. Contributed by Arpit Agarwal. (arp: rev b3d3ede91a2f73f86e262db4254fb8d8641841b7)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestJMXGet.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11860 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11860/ ) HDFS-11967 . TestJMXGet fails occasionally. Contributed by Arpit Agarwal. (arp: rev b3d3ede91a2f73f86e262db4254fb8d8641841b7) (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestJMXGet.java
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        Also thanks for the test verification Manoj Govindassamy!

        Show
        arpitagarwal Arpit Agarwal added a comment - Also thanks for the test verification Manoj Govindassamy !
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        Committed this.

        Thank you for the reviews Chen Liang, Manoj Govindassamy and Anu Engineer.

        Show
        arpitagarwal Arpit Agarwal added a comment - Committed this. Thank you for the reviews Chen Liang , Manoj Govindassamy and Anu Engineer .
        Hide
        anu Anu Engineer added a comment -

        +1, LGTM. Thanks for the contribution. Chen Liang and Manoj Govindassamy Thanks for the reviews.

        Show
        anu Anu Engineer added a comment - +1, LGTM. Thanks for the contribution. Chen Liang and Manoj Govindassamy Thanks for the reviews.
        Hide
        manojg Manoj Govindassamy added a comment -

        With more and more MBeans getting added, the default 1K buffer in PipedInputStream is no more sufficient. The proposed patch v01 is fixing the problem in my local setup where I am able to recreate the problem consistently (along with the fix for HDFS-10999).

        Patch looks good to me. +1.

        Show
        manojg Manoj Govindassamy added a comment - With more and more MBeans getting added, the default 1K buffer in PipedInputStream is no more sufficient. The proposed patch v01 is fixing the problem in my local setup where I am able to recreate the problem consistently (along with the fix for HDFS-10999 ). Patch looks good to me. +1.
        Hide
        vagarychen Chen Liang added a comment -

        v001 patch LGTM, thanks Arpit Agarwal for the analysis and the patch!

        Show
        vagarychen Chen Liang added a comment - v001 patch LGTM, thanks Arpit Agarwal for the analysis and the patch!
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        The unit test failures are unrelated to the patch.

        Show
        arpitagarwal Arpit Agarwal added a comment - The unit test failures are unrelated to the patch.
        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 15m 8s trunk passed
        +1 compile 0m 53s trunk passed
        +1 checkstyle 0m 38s trunk passed
        +1 mvnsite 1m 3s trunk passed
        +1 findbugs 1m 44s trunk passed
        +1 javadoc 0m 42s trunk passed
        +1 mvninstall 0m 57s the patch passed
        +1 compile 0m 50s the patch passed
        +1 javac 0m 50s the patch passed
        +1 checkstyle 0m 33s the patch passed
        +1 mvnsite 0m 57s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 2m 9s the patch passed
        +1 javadoc 0m 37s the patch passed
        -1 unit 71m 16s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 20s The patch does not generate ASF License warnings.
        99m 24s



        Reason Tests
        Failed junit tests hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting
          hadoop.hdfs.TestDFSStripedOutputStreamWithFailure080
        Timed out junit tests org.apache.hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:14b5c93
        JIRA Issue HDFS-11967
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12872544/HDFS-11967.01.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 7c059f7adeff 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / d64c842
        Default Java 1.8.0_131
        findbugs v3.1.0-RC1
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/19883/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/19883/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/19883/console
        Powered by Apache Yetus 0.5.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 15m 8s trunk passed +1 compile 0m 53s trunk passed +1 checkstyle 0m 38s trunk passed +1 mvnsite 1m 3s trunk passed +1 findbugs 1m 44s trunk passed +1 javadoc 0m 42s trunk passed +1 mvninstall 0m 57s the patch passed +1 compile 0m 50s the patch passed +1 javac 0m 50s the patch passed +1 checkstyle 0m 33s the patch passed +1 mvnsite 0m 57s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 9s the patch passed +1 javadoc 0m 37s the patch passed -1 unit 71m 16s hadoop-hdfs in the patch failed. +1 asflicense 0m 20s The patch does not generate ASF License warnings. 99m 24s Reason Tests Failed junit tests hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure080 Timed out junit tests org.apache.hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HDFS-11967 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12872544/HDFS-11967.01.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 7c059f7adeff 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / d64c842 Default Java 1.8.0_131 findbugs v3.1.0-RC1 unit https://builds.apache.org/job/PreCommit-HDFS-Build/19883/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/19883/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/19883/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        Attached patch initializes the PipedInputStream with a 1MB buffer.

        I ran 100 iterations of TestJMXGet and saw no failures. It used to fail everytime without the change.

        Show
        arpitagarwal Arpit Agarwal added a comment - Attached patch initializes the PipedInputStream with a 1MB buffer. I ran 100 iterations of TestJMXGet and saw no failures. It used to fail everytime without the change.
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        The problem appears to be that the input stream gets filled up. The default PipeInputStream buffer is just 1KB.

            private void awaitSpace() throws IOException {
                while (in == out) {
                    checkStateForReceive();
        
                    /* full: kick any waiting readers */
                    notifyAll();
                    try {
                        wait(1000);
        
        Show
        arpitagarwal Arpit Agarwal added a comment - The problem appears to be that the input stream gets filled up. The default PipeInputStream buffer is just 1KB. private void awaitSpace() throws IOException { while (in == out) { checkStateForReceive(); /* full: kick any waiting readers */ notifyAll(); try { wait(1000);

          People

          • Assignee:
            arpitagarwal Arpit Agarwal
            Reporter:
            arpitagarwal Arpit Agarwal
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development