You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/03/02 20:34:00 UTC

[jira] [Work logged] (HADOOP-18143) toString method of RpcCall throws IllegalArgumentException

     [ https://issues.apache.org/jira/browse/HADOOP-18143?focusedWorklogId=735561&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-735561 ]

ASF GitHub Bot logged work on HADOOP-18143:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Mar/22 20:33
            Start Date: 02/Mar/22 20:33
    Worklog Time Spent: 10m 
      Work Description: vinayakumarb commented on a change in pull request #4030:
URL: https://github.com/apache/hadoop/pull/4030#discussion_r818078733



##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ProtobufRpcEngine2.java
##########
@@ -629,6 +630,7 @@ private RpcWritable call(RPC.Server server,
   // which uses the rpc header.  in the normal case we want to defer decoding
   // the rpc header until needed by the rpc engine.
   static class RpcProtobufRequest extends RpcWritable.Buffer {
+    private final ReentrantLock lock = new ReentrantLock();

Review comment:
       I guess re-entrant lock is unnecessary.
   adding `synchronized` to `getRequestHeader()` method and calling this method instead of all direct usages of `requestHeader` would be sufficient. 
   This would ensure that `requestHeader` will never be null. So unnecessary null check can be removed.
   
   Remember, this is a critical path, any extra performance impacts, however small it is would impact the overall RPC performance.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 735561)
    Time Spent: 40m  (was: 0.5h)

> toString method of RpcCall throws IllegalArgumentException
> ----------------------------------------------------------
>
>                 Key: HADOOP-18143
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18143
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: András Győri
>            Assignee: András Győri
>            Priority: Critical
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> We have observed breaking tests such as TestApplicationACLs. We have located the root cause, which is HADOOP-18082. It seems that there is a concurrency issue within ProtobufRpcEngine2. When using a debugger, the missing fields are there, hence the suspicion of concurrency problem. The stack trace:
> {noformat}
> java.lang.IllegalArgumentException
>     at java.nio.Buffer.position(Buffer.java:244)
>     at org.apache.hadoop.ipc.RpcWritable$ProtobufWrapper.readFrom(RpcWritable.java:131)
>     at org.apache.hadoop.ipc.RpcWritable$Buffer.getValue(RpcWritable.java:232)
>     at org.apache.hadoop.ipc.ProtobufRpcEngine2$RpcProtobufRequest.getRequestHeader(ProtobufRpcEngine2.java:645)
>     at org.apache.hadoop.ipc.ProtobufRpcEngine2$RpcProtobufRequest.toString(ProtobufRpcEngine2.java:663)
>     at java.lang.String.valueOf(String.java:3425)
>     at java.lang.StringBuilder.append(StringBuilder.java:516)
>     at org.apache.hadoop.ipc.Server$RpcCall.toString(Server.java:1328)
>     at java.lang.String.valueOf(String.java:3425)
>     at java.lang.StringBuilder.append(StringBuilder.java:516)
>     at org.apache.hadoop.ipc.Server$Handler.run(Server.java:3097){noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org