Skip to content

HBASE-28109 NPE for the region state: Failed to become active master (HMaster) - #5432

Merged
Apache9 merged 1 commit into
apache:masterfrom
hanke580:npe_rs
Oct 7, 2023
Merged

HBASE-28109 NPE for the region state: Failed to become active master (HMaster)#5432
Apache9 merged 1 commit into
apache:masterfrom
hanke580:npe_rs

Conversation

@hanke580

Copy link
Copy Markdown
Contributor

There's a chance for rs to be NULL when starting up the HMaster. Then we ran into NPE exception

2023-09-18 14:17:40,452 ERROR [master/hmaster:16000:becomeActiveMaster] master.HMaster: Failed to become active master
java.lang.NullPointerException
at org.apache.hadoop.hbase.master.HMaster.isRegionOnline(HMaster.java:1229)
at org.apache.hadoop.hbase.master.HMaster.waitForMetaOnline(HMaster.java:1218)
at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:968)
at org.apache.hadoop.hbase.master.HMaster.startActiveMasterManager(HMaster.java:2193)
at org.apache.hadoop.hbase.master.HMaster.lambda$run$0(HMaster.java:528)
at java.lang.Thread.run(Thread.java:750)

This PR add a simple check and make HMaster keep waiting instead of directly shutting down.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 32sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall2m 48smaster passed
+1 💚compile2m 27smaster passed
+1 💚checkstyle0m 38smaster passed
+1 💚spotless0m 44sbranch has no errors when running spotless:check.
+1 💚spotbugs1m 28smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 35sthe patch passed
+1 💚compile2m 24sthe patch passed
+1 💚javac2m 24sthe patch passed
+1 💚checkstyle0m 35sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck9m 9sPatch does not cause any errors with Hadoop 3.2.4 3.3.6.
+1 💚spotless0m 41spatch has no errors when running spotless:check.
+1 💚spotbugs1m 36sthe patch passed
_ Other Tests _
+1 💚asflicense0m 12sThe patch does not generate ASF License warnings.
31m 41s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5432/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5432
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux 38bccac8e995 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 05f5d5b
Default JavaEclipse Adoptium-11.0.17+8
Max. process+thread count79 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5432/1/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 32sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 12smaster passed
+1 💚compile0m 47smaster passed
+1 💚shadedjars5m 27sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 25smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 47sthe patch passed
+1 💚compile0m 44sthe patch passed
+1 💚javac0m 44sthe patch passed
+1 💚shadedjars5m 22spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 23sthe patch passed
_ Other Tests _
+1 💚unit212m 33shbase-server in the patch passed.
236m 3s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5432/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5432
Optional Testsjavac javadoc unit shadedjars compile
unameLinux b6e5fcaee43d 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 05f5d5b
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5432/1/testReport/
Max. process+thread count4686 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5432/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 26sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall2m 36smaster passed
+1 💚compile0m 37smaster passed
+1 💚shadedjars5m 12sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 24smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 11sthe patch passed
+1 💚compile0m 36sthe patch passed
+1 💚javac0m 36sthe patch passed
+1 💚shadedjars5m 11spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 21sthe patch passed
_ Other Tests _
-1 ❌unit219m 28shbase-server in the patch failed.
241m 13s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5432/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5432
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 763fbbf4ca85 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 05f5d5b
Default JavaTemurin-1.8.0_352-b08
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5432/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5432/1/testReport/
Max. process+thread count4672 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5432/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
Contributor

Is this a fresh new cluster? Otherwise I do not think the region state for meta could be null...

@hanke580

Copy link
Copy Markdown
ContributorAuthor

@Apache9 Yes, it a fresh cluster start up.

@Apache9Apache9 changed the title HBASE-28109 Avoid NPE when starting up HMasterHBASE-28109 NPE for the region state: Failed to become active master (HMaster)Oct 7, 2023
@Apache9
Apache9 merged commit 865a595 into apache:masterOct 7, 2023
Apache9 pushed a commit that referenced this pull request Oct 7, 2023
…(HMaster) (#5432)
The RegionState for meta region could be null for a fresh new cluster, we should also wait a bit to let it finish the initialization.
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 865a595)
Apache9 pushed a commit that referenced this pull request Oct 7, 2023
…(HMaster) (#5432)
The RegionState for meta region could be null for a fresh new cluster, we should also wait a bit to let it finish the initialization.
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 865a595)
Apache9 pushed a commit that referenced this pull request Oct 7, 2023
…(HMaster) (#5432)
The RegionState for meta region could be null for a fresh new cluster, we should also wait a bit to let it finish the initialization.
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 865a595)
Apache9 pushed a commit that referenced this pull request Oct 7, 2023
…(HMaster) (#5432)
The RegionState for meta region could be null for a fresh new cluster, we should also wait a bit to let it finish the initialization.
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 865a595)
wchevreuil pushed a commit to wchevreuil/hbase that referenced this pull request Nov 2, 2023
…(HMaster) (apache#5432)
The RegionState for meta region could be null for a fresh new cluster, we should also wait a bit to let it finish the initialization.
Signed-off-by: Duo Zhang <zhangduo@apache.org>
vinayakphegde pushed a commit to vinayakphegde/hbase that referenced this pull request Apr 4, 2024
…(HMaster) (apache#5432)
The RegionState for meta region could be null for a fresh new cluster, we should also wait a bit to let it finish the initialization.
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 865a595)
(cherry picked from commit 736595f)
Change-Id: Ic14da19443721859d5a403cd41d282dc58a39867
Sign up for freeto 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.

3 participants

@hanke580@Apache-HBase@Apache9