Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-6206

RequestHedgingRMFailoverProvider may have concurrency issues when accessing the same request object

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Here, since multiple threads are accessing the same request object - 'args', and the request protobuf implementation is not synchronized. That caused errors like below:

             Callable<Object> c = new Callable<Object>() {
                  @Override
                  public Object call() throws Exception {
                    return method.invoke(pInfo.proxy, args);
                  }
                };
      
      java.lang.ArrayIndexOutOfBoundsException: 1
      at java.util.ArrayList.elementData(ArrayList.java:418)
      at java.util.ArrayList.get(ArrayList.java:431)
      at com.google.protobuf.LazyStringArrayList.getByteString(LazyStringArrayList.java:157)
      at com.google.protobuf.UnmodifiableLazyStringList.getByteString(UnmodifiableLazyStringList.java:66)
      at org.apache.hadoop.yarn.proto.YarnServiceProtos$GetApplicationsRequestProto.getSerializedSize(YarnServiceProtos.java:17070)
      at com.google.protobuf.AbstractMessageLite.writeDelimitedTo(AbstractMessageLite.java:84)
      at org.apache.hadoop.ipc.ProtobufRpcEngine$RpcMessageWithHeader.write(ProtobufRpcEngine.java:356)
      at org.apache.hadoop.ipc.Client$Connection.sendRpcRequest(Client.java:1059)
      at org.apache.hadoop.ipc.Client.call(Client.java:1457)
      at org.apache.hadoop.ipc.Client.call(Client.java:1398)
      at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:233)
      at com.sun.proxy.$Proxy17.getApplications(Unknown Source)
      at org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getApplications(ApplicationClientProtocolPBClientImpl.java:251)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:282)
      at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:194)
      at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:176)
      at com.sun.proxy.$Proxy18.getApplications(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      Attachments

        1. YARN-6206.1.patch
          55 kB
          Jian He
        2. YARN-6206.2.patch
          56 kB
          Jian He
        3. YARN-6206.3.patch
          57 kB
          Jian He

        Activity

          People

            jianhe Jian He
            jianhe Jian He
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: