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

unchecked exceptions thrown in IPC Connection orphan clients

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.20.2
    • Fix Version/s: 0.21.0
    • Component/s: ipc
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      If the server sends back some malformed data, for example, receiveResponse() can end up with an incorrect call ID. Then, when it tries to find it in the calls map, it will end up with null and throw NPE in receiveResponse. This isn't caught anywhere, so the original IPC client ends up hanging forever instead of catching an exception. Another example is if the writable implementation itself throws an unchecked exception or OOME.

      We should catch Throwable in Connection.run() and shut down the connection if we catch one.

      1. hadoop-6723.txt
        3 kB
        Todd Lipcon
      2. hadoop-6723-20-1.patch
        3 kB
        Eli Collins

        Activity

        Hide
        tlipcon Todd Lipcon added a comment -

        Patch simply catches the exception and closes down the connection. The included test case times out without this patch, since the call waits forever.

        Show
        tlipcon Todd Lipcon added a comment - Patch simply catches the exception and closes down the connection. The included test case times out without this patch, since the call waits forever.
        Hide
        tlipcon Todd Lipcon added a comment -

        Hudson didn't post.

        http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/480/

        [exec] +1 overall. Here are the results of testing the latest attachment
        [exec] http://issues.apache.org/jira/secure/attachment/12442802/hadoop-6723.txt
        [exec] against trunk revision 937881.
        [exec]
        [exec] +1 @author. The patch does not contain any @author tags.
        [exec]
        [exec] +1 tests included. The patch appears to include 3 new or modified tests.
        [exec]
        [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
        [exec]
        [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
        [exec]
        [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
        [exec]
        [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
        [exec]
        [exec] +1 core tests. The patch passed core unit tests.
        [exec]
        [exec] +1 contrib tests. The patch passed contrib unit tests.

        Show
        tlipcon Todd Lipcon added a comment - Hudson didn't post. http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/480/ [exec] +1 overall. Here are the results of testing the latest attachment [exec] http://issues.apache.org/jira/secure/attachment/12442802/hadoop-6723.txt [exec] against trunk revision 937881. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. [exec] [exec] +1 core tests. The patch passed core unit tests. [exec] [exec] +1 contrib tests. The patch passed contrib unit tests.
        Hide
        tomwhite Tom White added a comment -

        +1

        Show
        tomwhite Tom White added a comment - +1
        Hide
        hammer Jeff Hammerbacher added a comment -

        Any reason this hasn't been committed yet?

        Show
        hammer Jeff Hammerbacher added a comment - Any reason this hasn't been committed yet?
        Hide
        tomwhite Tom White added a comment -

        I've just committed this. Thanks Todd!

        Show
        tomwhite Tom White added a comment - I've just committed this. Thanks Todd!
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #264 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/264/)
        HADOOP-6723. Unchecked exceptions thrown in IPC Connection should not orphan clients. Contributed by Todd Lipcon.

        Show
        hudson Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #264 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/264/ ) HADOOP-6723 . Unchecked exceptions thrown in IPC Connection should not orphan clients. Contributed by Todd Lipcon.
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Common-trunk #346 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/346/)

        Show
        hudson Hudson added a comment - Integrated in Hadoop-Common-trunk #346 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/346/ )
        Hide
        eli Eli Collins added a comment -

        Patch for 20 attached.

        Show
        eli Eli Collins added a comment - Patch for 20 attached.
        Hide
        eli Eli Collins added a comment -

        Patch for 20 attached.

        Show
        eli Eli Collins added a comment - Patch for 20 attached.

          People

          • Assignee:
            tlipcon Todd Lipcon
            Reporter:
            tlipcon Todd Lipcon
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development