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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Patch Available Patch Available Open Open
        13h 23m 1 Jason Lowe 17/Oct/12 15:48
        Open Open Patch Available Patch Available
        2d 2h 51m 2 Jason Lowe 19/Oct/12 18:04
        Patch Available Patch Available Resolved Resolved
        37m 11s 1 Robert Joseph Evans 19/Oct/12 18:41
        Resolved Resolved Closed Closed
        109d 23h 24m 1 Thomas Graves 06/Feb/13 17:05
        Allen Wittenauer made changes -
        Fix Version/s 3.0.0 [ 12323268 ]
        Thomas Graves made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        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
        Robert Joseph Evans made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 2.0.3-alpha [ 12323272 ]
        Fix Version/s 0.23.5 [ 12323311 ]
        Fix Version/s 3.0.0 [ 12323268 ]
        Resolution Fixed [ 1 ]
        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.
        Jason Lowe made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Jason Lowe made changes -
        Attachment YARN-163.patch [ 12550007 ]
        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.
        Jason Lowe made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        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?
        Jason Lowe made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Jason Lowe made changes -
        Field Original Value New Value
        Attachment YARN-163.patch [ 12549420 ]
        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.
        Jason Lowe created 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