From 471e8159f0376d234a7089b536b7aa3c4950bb7e Mon Sep 17 00:00:00 2001 From: Xiaolin Ha Date: Wed, 9 Jun 2021 18:11:18 +0800 Subject: [PATCH] HBASE-25981 JVM crash when displaying RegionServer UI (#3364) Signed-off-by: Duo Zhang --- .../main/java/org/apache/hadoop/hbase/ipc/CallRunner.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java index 1232231423c..6e2c37e3a8c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java @@ -163,6 +163,7 @@ public class CallRunner { } span.end(); } + this.status.markComplete("To send response"); // return back the RPC request read BB we can do here. It is done by now. call.cleanup(); // Set the response @@ -170,8 +171,6 @@ public class CallRunner { CellScanner cells = resultPair != null ? resultPair.getSecond() : null; call.setResponse(param, cells, errorThrowable, error); call.sendResponseIfReady(); - this.status.markComplete("Sent response"); - this.status.pause("Waiting for a call"); } catch (OutOfMemoryError e) { if (this.rpcServer.getErrorHandler() != null) { if (this.rpcServer.getErrorHandler().checkOOME(e)) { @@ -195,6 +194,11 @@ public class CallRunner { if (!sucessful) { this.rpcServer.addCallSize(call.getSize() * -1); } + + if (this.status.isRPCRunning()) { + this.status.markComplete("Call error"); + } + this.status.pause("Waiting for a call"); cleanup(); } }