Hadoop YARN
  1. Hadoop YARN
  2. YARN-163

Retrieving container log via NM webapp can hang with multibyte characters in log

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.3, 2.0.0-alpha
    • Fix Version/s: 2.0.3-alpha, 0.23.5
    • Component/s: nodemanager
    • Labels:
      None

      Description

      ContainerLogsBlock.printLogs currently assumes that skipping N bytes in the log file is the same as skipping N characters, but that is not true when the log contains multibyte characters. This can cause the loop that skips a portion of the log to try to skip past the end of the file and loop forever (or until Jetty kills the worker thread).

      1. YARN-163.patch
        4 kB
        Jason Lowe
      2. YARN-163.patch
        4 kB
        Jason Lowe

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1231 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1231/)
        YARN-163. Retrieving container log via NM webapp can hang with multibyte characters in log (jlowe via bobby) (Revision 1400189)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400189
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1231 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1231/ ) YARN-163 . Retrieving container log via NM webapp can hang with multibyte characters in log (jlowe via bobby) (Revision 1400189) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400189 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1201 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1201/)
        YARN-163. Retrieving container log via NM webapp can hang with multibyte characters in log (jlowe via bobby) (Revision 1400189)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400189
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1201 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1201/ ) YARN-163 . Retrieving container log via NM webapp can hang with multibyte characters in log (jlowe via bobby) (Revision 1400189) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400189 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #410 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/410/)
        svn merge -c 1400189 FIXES: YARN-163. Retrieving container log via NM webapp can hang with multibyte characters in log (jlowe via bobby) (Revision 1400191)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400191
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-yarn-project/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #410 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/410/ ) svn merge -c 1400189 FIXES: YARN-163 . Retrieving container log via NM webapp can hang with multibyte characters in log (jlowe via bobby) (Revision 1400191) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400191 Files : /hadoop/common/branches/branch-0.23/hadoop-yarn-project/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Yarn-trunk #9 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/9/)
        YARN-163. Retrieving container log via NM webapp can hang with multibyte characters in log (jlowe via bobby) (Revision 1400189)

        Result = FAILURE
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400189
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
        Show
        Hudson added a comment - Integrated in Hadoop-Yarn-trunk #9 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/9/ ) YARN-163 . Retrieving container log via NM webapp can hang with multibyte characters in log (jlowe via bobby) (Revision 1400189) Result = FAILURE bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400189 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-trunk-Commit #2895 (See https://builds.apache.org/job/Hadoop-trunk-Commit/2895/)
        YARN-163. Retrieving container log via NM webapp can hang with multibyte characters in log (jlowe via bobby) (Revision 1400189)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400189
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
        Show
        Hudson added a comment - Integrated in Hadoop-trunk-Commit #2895 (See https://builds.apache.org/job/Hadoop-trunk-Commit/2895/ ) YARN-163 . Retrieving container log via NM webapp can hang with multibyte characters in log (jlowe via bobby) (Revision 1400189) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400189 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
        Hide
        Robert Joseph Evans added a comment -

        Thanks Jason,

        I put this into trunk, branch-2, and branch-0.23

        Show
        Robert Joseph Evans added a comment - Thanks Jason, I put this into trunk, branch-2, and branch-0.23
        Hide
        Robert Joseph Evans added a comment -

        +1 lgtm. I'll check it in.

        Show
        Robert Joseph Evans added a comment - +1 lgtm. I'll check it in.
        Hide
        Jason Lowe added a comment -

        Thanks for the review, Bobby. Updated patch to use IOUtils.skipFully

        Show
        Jason Lowe added a comment - Thanks for the review, Bobby. Updated patch to use IOUtils.skipFully
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12549420/YARN-163.patch
        against trunk revision .

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

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

        +1 javadoc. The javadoc tool did not generate any warning messages.

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

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) 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-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager.

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

        Test results: https://builds.apache.org/job/PreCommit-YARN-Build/94//testReport/
        Console output: https://builds.apache.org/job/PreCommit-YARN-Build/94//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12549420/YARN-163.patch against trunk revision . +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) 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-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-YARN-Build/94//testReport/ Console output: https://builds.apache.org/job/PreCommit-YARN-Build/94//console This message is automatically generated.
        Hide
        Robert Joseph Evans added a comment -

        I wish there were some tests for the patch, but I can see how that is difficult for this, because there were no tests to begin with. My only comment for this is that now that we are skipping using a InputStream instead of a Reader, could you also switch the code to use IOUtils.skipFully?

        Show
        Robert Joseph Evans added a comment - I wish there were some tests for the patch, but I can see how that is difficult for this, because there were no tests to begin with. My only comment for this is that now that we are skipping using a InputStream instead of a Reader, could you also switch the code to use IOUtils.skipFully?
        Hide
        Jason Lowe added a comment -

        Patch to skip bytes instead of characters. Still needs a unit test, but I manually tested it on a job with lots of multibyte characters in its logs and it fixes the issue.

        Show
        Jason Lowe added a comment - Patch to skip bytes instead of characters. Still needs a unit test, but I manually tested it on a job with lots of multibyte characters in its logs and it fixes the issue.

          People

          • Assignee:
            Jason Lowe
            Reporter:
            Jason Lowe
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development