Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HADOOP-18082.Add debug log when RPC#Reader gets a Call. #3891

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

jianghuazhu
Copy link
Contributor

Description of PR

Log some information from the moment Call enters the RPC inside, which will help us understand more about Call.
The records here should be in the form of logs. The priority of the logs should not be too high, and debugging is the best.
Details: HADOOP-18082

How was this patch tested?

Corresponding to the test, the pressure is not large.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 39s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s 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.
_ trunk Compile Tests _
+1 💚 mvninstall 33m 16s trunk passed
+1 💚 compile 22m 54s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 compile 19m 24s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 1m 6s trunk passed
+1 💚 mvnsite 1m 41s trunk passed
+1 💚 javadoc 1m 14s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 1m 46s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 2m 26s trunk passed
+1 💚 shadedclient 22m 2s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 59s the patch passed
+1 💚 compile 21m 30s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javac 21m 30s the patch passed
+1 💚 compile 19m 30s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 19m 30s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 8s the patch passed
+1 💚 mvnsite 1m 40s the patch passed
+1 💚 javadoc 1m 12s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 1m 46s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 2m 35s the patch passed
+1 💚 shadedclient 21m 57s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 28m 6s /patch-unit-hadoop-common-project_hadoop-common.txt hadoop-common in the patch passed.
+1 💚 asflicense 0m 58s The patch does not generate ASF License warnings.
208m 25s
Reason Tests
Failed junit tests hadoop.ipc.TestIPC
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/1/artifact/out/Dockerfile
GITHUB PR #3891
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell
uname Linux f3b632853b25 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / d3cc51309188487a173b84212a5fa3be9c08acd2
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/1/testReport/
Max. process+thread count 1267 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@jianghuazhu
Copy link
Contributor Author

Here are some failed unit tests:
org.apache.hadoop.ipc.TestIPC

It doesn't look like it has much to do with what I'm submitting.
Would you like to help review this PR, @jojochuang @virajjasani @tomscut .
Thank you so much.

@@ -3046,6 +3046,8 @@ private void internalQueueCall(Call call, boolean blocking)
} else {
callQueue.add(call);
}

LOG.debug("{} has entered the CallQueue and is waiting to be processed.", call);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If only callId is output, there may be too little useful information. What do you think?

Copy link
Contributor Author

@jianghuazhu jianghuazhu Jan 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tomscut for the comment and review.
The detailed log here is this:
2022-01-18 16:37:56,653 DEBUG org.apache.hadoop.ipc.Server: Call#75 Retry#0 org.apache.hadoop.hdfs.protocol.ClientProtocol.getFileInfo from xxxx.xxxx.xxxx.xxxx:port has entered the CallQueue and is waiting to be processed. 2022-01-18 16:37:56,654 DEBUG org.apache.hadoop.ipc.Server: Call#76 Retry#0 org.apache.hadoop.hdfs.protocol.ClientProtocol.getFileInfo from xxxx.xxxx.xxxx.xxxx:port has entered the CallQueue and is waiting to be processed.
When the Call is processed by Hanler, the detailed log is as follows:
2022-01-18 16:37:59,725 [5178363759] - WARN [IPC Server handler 126 on 8025:Server@494] - Slow RPC : getFileInfo took 509 milliseconds to process from client Call#76 Retry#0 org.apache.hadoop.hdfs.protocol.ClientProtocol.getFileInfo from xxxx.xxxx.xxxx.xxxx:port
In my opinion, the Calls recorded in these two places should be consistent.
@tomscut , do you have any good suggestions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I made a mistake. The output here is not only callId. And I think it is ok.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to add a DEBUG log seems good, but how about this line instead?

LOG.debug("Call has entered the CallQueue and is waiting to be processed. Call details: {}", call);

Usually we tend to read object's string presentation at the end to not mix up with the log statement, e.g RpcCall's toString() has word "from" and perhaps it becomes bit difficult to read the whole statement at the first sight, but if put at the end of the statement, we know that now we are only looking at RpcCall details:

    @Override
    public String toString() {
      return super.toString() + " " + rpcRequest + " from " + connection;
    }

@@ -3046,6 +3046,8 @@ private void internalQueueCall(Call call, boolean blocking)
} else {
callQueue.add(call);
}

LOG.debug("{} has entered the CallQueue and is waiting to be processed.", call);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I made a mistake. The output here is not only callId. And I think it is ok.

@jianghuazhu
Copy link
Contributor Author

Thanks @tomscut .

Copy link
Contributor

@virajjasani virajjasani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a minor comment

@@ -3046,6 +3046,8 @@ private void internalQueueCall(Call call, boolean blocking)
} else {
callQueue.add(call);
}

LOG.debug("{} has entered the CallQueue and is waiting to be processed.", call);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to add a DEBUG log seems good, but how about this line instead?

LOG.debug("Call has entered the CallQueue and is waiting to be processed. Call details: {}", call);

Usually we tend to read object's string presentation at the end to not mix up with the log statement, e.g RpcCall's toString() has word "from" and perhaps it becomes bit difficult to read the whole statement at the first sight, but if put at the end of the statement, we know that now we are only looking at RpcCall details:

    @Override
    public String toString() {
      return super.toString() + " " + rpcRequest + " from " + connection;
    }

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 39s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s 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.
_ trunk Compile Tests _
+1 💚 mvninstall 38m 23s trunk passed
+1 💚 compile 22m 15s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 compile 19m 25s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 1m 10s trunk passed
+1 💚 mvnsite 1m 37s trunk passed
+1 💚 javadoc 1m 13s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 1m 41s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 2m 28s trunk passed
+1 💚 shadedclient 22m 1s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 58s the patch passed
+1 💚 compile 21m 28s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javac 21m 28s the patch passed
+1 💚 compile 19m 29s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 19m 29s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 1m 7s /results-checkstyle-hadoop-common-project_hadoop-common.txt hadoop-common-project/hadoop-common: The patch generated 1 new + 166 unchanged - 0 fixed = 167 total (was 166)
+1 💚 mvnsite 1m 35s the patch passed
+1 💚 javadoc 1m 10s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 1m 43s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 2m 35s the patch passed
+1 💚 shadedclient 22m 22s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 28m 2s /patch-unit-hadoop-common-project_hadoop-common.txt hadoop-common in the patch passed.
+1 💚 asflicense 1m 0s The patch does not generate ASF License warnings.
212m 43s
Reason Tests
Failed junit tests hadoop.ipc.TestIPC
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/2/artifact/out/Dockerfile
GITHUB PR #3891
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell
uname Linux 17239c87beb5 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 05f7c9e709329f2d928fbe57dcff35d324e6d9db
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/2/testReport/
Max. process+thread count 3160 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 52s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s 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.
_ trunk Compile Tests _
+1 💚 mvninstall 35m 44s trunk passed
+1 💚 compile 24m 7s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 compile 20m 43s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 1m 0s trunk passed
+1 💚 mvnsite 1m 35s trunk passed
+1 💚 javadoc 1m 8s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 1m 39s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 2m 28s trunk passed
+1 💚 shadedclient 24m 51s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 4s the patch passed
+1 💚 compile 23m 39s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javac 23m 39s the patch passed
+1 💚 compile 21m 58s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 21m 58s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 0s the patch passed
+1 💚 mvnsite 1m 42s the patch passed
+1 💚 javadoc 1m 9s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 1m 46s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 2m 58s the patch passed
+1 💚 shadedclient 25m 54s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 24m 18s hadoop-common in the patch passed.
+1 💚 asflicense 0m 48s The patch does not generate ASF License warnings.
219m 37s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/3/artifact/out/Dockerfile
GITHUB PR #3891
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell
uname Linux 789312d80f47 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 8554c43
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/3/testReport/
Max. process+thread count 2950 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@virajjasani
Copy link
Contributor

Latest change looks good. +1(non-binding)

@jianghuazhu
Copy link
Contributor Author

Thanks @virajjasani .

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 1s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s 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.
_ trunk Compile Tests _
+1 💚 mvninstall 36m 43s trunk passed
+1 💚 compile 26m 0s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 compile 22m 32s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 1m 1s trunk passed
+1 💚 mvnsite 1m 38s trunk passed
+1 💚 javadoc 1m 8s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 1m 39s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 2m 33s trunk passed
+1 💚 shadedclient 25m 56s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 3s the patch passed
+1 💚 compile 24m 27s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javac 24m 27s the patch passed
+1 💚 compile 21m 34s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 21m 34s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 59s the patch passed
+1 💚 mvnsite 1m 34s the patch passed
+1 💚 javadoc 1m 6s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 1m 38s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 2m 43s the patch passed
+1 💚 shadedclient 26m 25s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 30m 33s /patch-unit-hadoop-common-project_hadoop-common.txt hadoop-common in the patch passed.
+1 💚 asflicense 0m 49s The patch does not generate ASF License warnings.
232m 27s
Reason Tests
Failed junit tests hadoop.ipc.TestIPC
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/4/artifact/out/Dockerfile
GITHUB PR #3891
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell
uname Linux f0ccc6a61077 4.15.0-163-generic #171-Ubuntu SMP Fri Nov 5 11:55:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 8554c43
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/4/testReport/
Max. process+thread count 1246 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3891/4/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jianghuazhu
Copy link
Contributor Author

Thanks @ayushtkn .

@jianghuazhu
Copy link
Contributor Author

Hi @ayushtkn , can this pr be merged into trunk branch or other main branch?
If not for now, I will continue to work hard.
Thank you very much.

@ayushtkn ayushtkn merged commit 2025243 into apache:trunk Feb 16, 2022
@ayushtkn
Copy link
Member

Merged. Thanx Everyone!!!

asfgit pushed a commit that referenced this pull request Feb 28, 2022
…. Contributed by JiangHua Zhu."

Exposes a Race Condition. Which leads to test failures in YARN. (HADOOP-18143)

This reverts commit 2025243.
HarshitGupta11 pushed a commit to HarshitGupta11/hadoop that referenced this pull request Nov 28, 2022
HarshitGupta11 pushed a commit to HarshitGupta11/hadoop that referenced this pull request Nov 28, 2022
…he#3891). Contributed by JiangHua Zhu."

Exposes a Race Condition. Which leads to test failures in YARN. (HADOOP-18143)

This reverts commit 2025243.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants