Uh oh!
There was an error while loading. Please reload this page.
HBASE-29802 NPE when shutting down mini cluster cause tests hang - #7604
Conversation
Apache9
commented
Jan 7, 2026
Let's see whether there are other side effects. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Apache9
commented
Jan 8, 2026
Seems the file system was still closed by someone... Added a debug log to see if we can get the root cause, and convert the PR to draft. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Apache9
commented
Jan 9, 2026
OK, after fixing the MiniMRCluster issue, TestExportSnapshot passed. Let me check what is the problem for TestAcid... |
Apache9
commented
Jan 9, 2026
At least TestAcid is not related to NPE in shutdown. So let's get this merged first. Filed HBASE-29817 for fixing the log flooding issue in TestAcid first. |
This comment has been minimized.
This comment has been minimized.
Remove the 'shutdownHook' in SingleProcessHBaseCluster where we close the FileSystem instance of a region server. Set DistributedFileSystem cache to false when creating MiniMRCluster so when shutting down MiniMRCluster it will not close the shared FileSystem instance. Also re-enable TestExportSnapshot.
ndimiduk
left a comment
There was a problem hiding this comment.
Really nice find! This issue has plagued us for years. I hope you've got it 🤞
This comment has been minimized.
This comment has been minimized.
Apache-HBase
commented
Jan 9, 2026
🎊 +1 overall
This message was automatically generated. |
Apache9
commented
Jan 9, 2026
@ndimiduk This is the failure message for TestNettyTlsIPC... Seems something related to the initialization of OpenTelemetry? |
ndimiduk
commented
Jan 9, 2026
A bug in the lifecycle of the otel junit extension? or how we're configured it, at least? |
ndimiduk
commented
Jan 9, 2026
The Rule is non-static, so should be fresh for each method, https://github.com/apache/hbase/blob/master/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java#L135-L136 |
Apache9
commented
Jan 9, 2026
I think there could be race that, after you reset globalOpenTelemetry but before you set it again, another thread calls get and set globalOpenTelemetry to non null... Maybe we should do some retries here? |
ndimiduk
commented
Jan 9, 2026
I think it's the test Rule that managed the global instance. Are parallel test executions stepping on each other's static state? |
Apache9
commented
Jan 9, 2026
GlobalOpenTelemetry.getPropagators() may lead to a GlobalOpenTelemetry.set call, see the above stacktrace There could be other threads which are still running after a test is marked as finished, these threads may have race with the main test thread. I guess this is the problem? |
Apache-HBase
commented
Jan 9, 2026
🎊 +1 overall
This message was automatically generated. |
Uh oh!
There was an error while loading. Please reload this page.
Remove the 'shutdownHook' in SingleProcessHBaseCluster where we close the FileSystem instance of a region server. Set DistributedFileSystem cache to false when creating MiniMRCluster so when shutting down MiniMRCluster it will not close the shared FileSystem instance. Also re-enable TestExportSnapshot. Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> (cherry picked from commit d11ee6a)
…che#7604) Remove the 'shutdownHook' in SingleProcessHBaseCluster where we close the FileSystem instance of a region server. Set DistributedFileSystem cache to false when creating MiniMRCluster so when shutting down MiniMRCluster it will not close the shared FileSystem instance. Also re-enable TestExportSnapshot. Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> (cherry picked from commit d11ee6a)
…che#7604) Remove the 'shutdownHook' in SingleProcessHBaseCluster where we close the FileSystem instance of a region server. Set DistributedFileSystem cache to false when creating MiniMRCluster so when shutting down MiniMRCluster it will not close the shared FileSystem instance. Also re-enable TestExportSnapshot. Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> (cherry picked from commit d11ee6a)
…) (#7612) Remove the 'shutdownHook' in SingleProcessHBaseCluster where we close the FileSystem instance of a region server. Set DistributedFileSystem cache to false when creating MiniMRCluster so when shutting down MiniMRCluster it will not close the shared FileSystem instance. Also re-enable TestExportSnapshot. (cherry picked from commit d11ee6a) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…) (#7612) Remove the 'shutdownHook' in SingleProcessHBaseCluster where we close the FileSystem instance of a region server. Set DistributedFileSystem cache to false when creating MiniMRCluster so when shutting down MiniMRCluster it will not close the shared FileSystem instance. Also re-enable TestExportSnapshot. (cherry picked from commit d11ee6a) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> (cherry picked from commit 8841deb)
…) (#7612) Remove the 'shutdownHook' in SingleProcessHBaseCluster where we close the FileSystem instance of a region server. Set DistributedFileSystem cache to false when creating MiniMRCluster so when shutting down MiniMRCluster it will not close the shared FileSystem instance. Also re-enable TestExportSnapshot. (cherry picked from commit d11ee6a) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> (cherry picked from commit 8841deb)
Remove the 'shutdownHook' in SingleProcessHBaseCluster where we close the FileSystem instance of a region server.
Also re-enable TestExportSnapshot.