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

ClassCastException in test TestRPC#testWrappedStopProxy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • common, ipc

    Description

      What happened:

      In HCommon, test TestRPC#testWrappedStopProxy tries to cast org.apache.hadoop.ipc.WritableRpcEngine$Invoker to org.apache.hadoop.ipc.TestRPC$StoppedInvocationHandler and causes ClassCastException.

      Buggy code:

      In TestRPC.java:

      @Test
      public void testWrappedStopProxy() throws IOException {
        StoppedProtocol wrappedProxy = RPC.getProxy(StoppedProtocol.class,
            StoppedProtocol.versionID, null, conf);
        StoppedInvocationHandler invocationHandler = (StoppedInvocationHandler)    // <--- Here causes ClassCastException
            Proxy.getInvocationHandler(wrappedProxy);
        ...
      } 

      How to reproduce:

      (1) Just directly run test TestRPC#testWrappedStopProxy.

      You can use the reproduce.sh in the attachment to easily reproduce the bug.

      We are happy to provide a patch if this issue is confirmed. 

      Attachments

        1. reproduce.sh
          0.4 kB
          ConfX

        Issue Links

          Activity

            People

              Unassigned Unassigned
              FuzzingTeam ConfX
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: