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

HttpServer wraps InterruptedExceptions by IOExceptions if interrupted in startup

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.20.204.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: util
    • Labels:
      None

      Description

      Following on some discusson on mapred-dev, we should keep an eye on the fact that Jetty uses sleeps when starting up; jetty can be a big part of the delays of bringing up a node. When interrupted, the exception is wrapped by an IOException, the root cause is still there, just hidden.

      If we want callers to distinguish InterruptedExceptions from IOEs, then this exception should be extracted. Some helper method to start an http daemon could do this -catch the IOE, and if there is a nested interrupted exception, rethrow it, otherwise rethrowing the original IOE

      1. HADOOP-6220.patch
        0.9 kB
        Steve Loughran
      2. HADOOP-6220.patch
        0.9 kB
        Steve Loughran
      3. HADOOP-6220-trunk.patch
        1 kB
        Steve Loughran

        Activity

        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #845 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/845/)
        HADOOP-6220

        stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1177051
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #845 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/845/ ) HADOOP-6220 stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1177051 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #815 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/815/)
        HADOOP-6220

        stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1177051
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #815 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/815/ ) HADOOP-6220 stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1177051 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #1060 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1060/)
        HADOOP-6220

        stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1177051
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1060 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1060/ ) HADOOP-6220 stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1177051 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #982 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/982/)
        HADOOP-6220

        stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1177051
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #982 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/982/ ) HADOOP-6220 stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1177051 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1004 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1004/)
        HADOOP-6220

        stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1177051
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1004 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1004/ ) HADOOP-6220 stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1177051 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
        Hide
        stevel@apache.org Steve Loughran added a comment -

        Committed revision 1177051.

        Show
        stevel@apache.org Steve Loughran added a comment - Committed revision 1177051.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        +1 voting by self
        no tests as there is no easy way to generate the race condition.

        Show
        stevel@apache.org Steve Loughran added a comment - +1 voting by self no tests as there is no easy way to generate the race condition.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12496295/HADOOP-6220-trunk.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 javadoc. The javadoc tool did not generate any warning messages.

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

        +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 .

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

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

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12496295/HADOOP-6220-trunk.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 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +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 . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/227//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/227//console This message is automatically generated.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        patch against trunk

        Show
        stevel@apache.org Steve Loughran added a comment - patch against trunk
        Hide
        stevel@apache.org Steve Loughran added a comment -

        No tests as it's so hard to recreate this situation in a test; you need one thread sleeping and another interrupting.

        Show
        stevel@apache.org Steve Loughran added a comment - No tests as it's so hard to recreate this situation in a test; you need one thread sleeping and another interrupting.
        Hide
        hadoopqa Hadoop QA added a comment -

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

        +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 javadoc. The javadoc tool did not generate any warning messages.

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

        +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 core unit tests.

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

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/289//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/289//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/289//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12470237/HADOOP-6220.patch against trunk revision 1071364. +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 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +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 core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/289//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/289//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/289//console This message is automatically generated.
        Hide
        hadoopqa Hadoop QA added a comment -

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

        +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 javadoc. The javadoc tool did not generate any warning messages.

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

        +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 core unit tests.

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

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/218//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/218//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/218//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12470237/HADOOP-6220.patch against trunk revision 1066284. +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 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +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 core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/218//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/218//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/218//console This message is automatically generated.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        this is the existing patch, instead of just throwing an IOException when startup is interrupted, it gets converted to an InterruptedIOException

        Show
        stevel@apache.org Steve Loughran added a comment - this is the existing patch, instead of just throwing an IOException when startup is interrupted, it gets converted to an InterruptedIOException
        Hide
        stevel@apache.org Steve Loughran added a comment -

        in sync with trunk

        Show
        stevel@apache.org Steve Loughran added a comment - in sync with trunk
        Hide
        steve_l Steve Loughran added a comment -

        Seen in trying to shut down nodes as they come up; it's nice to be able to differentiate "we interrupted you" from "something went wrong".

        Changing the signature? It's more dramatic, but yes, more explicit.

        Show
        steve_l Steve Loughran added a comment - Seen in trying to shut down nodes as they come up; it's nice to be able to differentiate "we interrupted you" from "something went wrong". Changing the signature? It's more dramatic, but yes, more explicit.
        Hide
        chris.douglas Chris Douglas added a comment -

        If we want callers to distinguish InterruptedExceptions from IOEs, then this exception should be extracted [...]

        Would adding InterruptedException to the throws list of HttpServer::start, and rethrowing, be clearer? InterruptedIOException should be reserved for, well, interrupted I/O. Have you seen wrapped InterruptedExceptions in logs or other evidence that would support this change?

        It is difficult to evaluate this without corresponding changes to the callers. What one might do with this is speculative in its current form.

        Show
        chris.douglas Chris Douglas added a comment - If we want callers to distinguish InterruptedExceptions from IOEs, then this exception should be extracted [...] Would adding InterruptedException to the throws list of HttpServer::start, and rethrowing, be clearer? InterruptedIOException should be reserved for, well, interrupted I/O. Have you seen wrapped InterruptedExceptions in logs or other evidence that would support this change? It is difficult to evaluate this without corresponding changes to the callers. What one might do with this is speculative in its current form.
        Hide
        hadoopqa Hadoop QA added a comment -

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

        +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 javadoc. The javadoc tool did not generate any warning messages.

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

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

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

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

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/36/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/36/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/36/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/36/console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12428910/HADOOP-6220.patch against trunk revision 896259. +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 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/36/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/36/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/36/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/36/console This message is automatically generated.
        Hide
        steve_l Steve Loughran added a comment -

        resubmitting, no obvious reason why this should fail TestUTF8; HADOOP-6479 adds better diagnostics if Hudson is still failing.

        Show
        steve_l Steve Loughran added a comment - resubmitting, no obvious reason why this should fail TestUTF8; HADOOP-6479 adds better diagnostics if Hudson is still failing.
        Hide
        steve_l Steve Loughran added a comment -

        unmarking as incompatible. Any InterruptedException is still turned into an IOException, only now it is a subclass to say "we were interrupted". Anything that looks for an IOE will get the same experience as before

        Show
        steve_l Steve Loughran added a comment - unmarking as incompatible. Any InterruptedException is still turned into an IOException, only now it is a subclass to say "we were interrupted". Anything that looks for an IOE will get the same experience as before
        Hide
        hadoopqa Hadoop QA added a comment -

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

        +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 javadoc. The javadoc tool did not generate any warning messages.

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

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

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

        -1 core tests. The patch failed core unit tests.

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/237/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/237/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/237/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/237/console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12428910/HADOOP-6220.patch against trunk revision 893666. +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 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/237/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/237/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/237/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/237/console This message is automatically generated.
        Hide
        steve_l Steve Loughran added a comment -

        This turns an interrupt into an InterruptedIOException; includes the original exception as the cause. No test. This is a tricky one to set up a test for as you need to block the startup and then interrupt the starting thread.

        Show
        steve_l Steve Loughran added a comment - This turns an interrupt into an InterruptedIOException; includes the original exception as the cause. No test. This is a tricky one to set up a test for as you need to block the startup and then interrupt the starting thread.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development