You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2025/06/19 15:30:01 UTC

[kudu-CR](branch-1.18.x) [arm64] Fix TestLeafNode unit test by ensuring proper node alignment

Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23053


Change subject: [arm64] Fix TestLeafNode unit test by ensuring proper node alignment
......................................................................

[arm64] Fix TestLeafNode unit test by ensuring proper node alignment

The following error occurs when running `bin/cbtree-test
--gtest_filter=TestCBTree.TestLeafNode` in an Rocky ARM environment.

*** Aborted at 1748486900 (unix time) try "date -d @1748486900" if you are using GNU date ***
PC: @                0x0 (unknown)
*** SIGBUS (@0xffffc794b2af) received by PID 32172 (TID 0xffff838a0040) from PID 18446744072762995375; stack trace: ***
    @     0xffff83f0e890 google::(anonymous namespace)::FailureSignalHandler()
    @     0xffff853b07a0 ([vdso]+0x79f)
    @           0x279efc kudu::tablet::btree::VersionField::Lock()
    @           0x2815e4 kudu::tablet::btree::NodeBase<>::Lock()
    @           0x2788a4 kudu::tablet::btree::TestCBTree::InsertInLeaf<>()
    @           0x269d18 kudu::tablet::btree::TestCBTree_TestLeafNode_Test::TestBody()
    @     0xffff83de0608 testing::internal::HandleExceptionsInMethodIfSupported<>()
    @     0xffff83dd2348 testing::Test::Run()
    @     0xffff83dd24e8 testing::TestInfo::Run()
    @     0xffff83dd2b90 testing::TestSuite::Run()
    @     0xffff83dd7274 testing::internal::UnitTestImpl::RunAllTests()
    @     0xffff83dd25f0 testing::UnitTest::Run()
    @     0xffff85335f84 (unknown)
    @     0xffff853353e4 (unknown)
    @     0xffff838e7280 __libc_start_call_main
    @     0xffff838e7358 __libc_start_main_alias_2
    @           0x2698b0 _start
Bus error

The TestLeafNode unit test was triggering SIGBUS crashes on ARM64
architectures due to unaligned access of atomic version fields.
This occurred because the test created LeafNode instances on the stack
without guaranteed alignment, while ARM64 strictly requires 8-byte
alignment for atomic uint64_t operations.

This test-specific fix complements the production code alignment
measures and ensures:
- Unit tests respect the same alignment requirements as production
- ARM64 environments don't trigger SIGBUS during test execution
- Test reliability across different architectures

Testing environment:
- ARM64 (Neoverse-N1) with Rocky Linux 9.5
- Docker container runtime
- Strict alignment enforcement causing SIGBUS on unaligned access

We extend our gratitude to Zoltan for his essential testing validation
and remediation recommendations in this fix.

Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Change-I: I6fea46308f942ded97d93d27ae466fd13a31b53
Reviewed-on: http://gerrit.cloudera.org:8080/23049
Reviewed-by: Zoltan Martonka <zm...@cloudera.com>
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Alexey Serbin <al...@apache.org>
(cherry picked from commit fd5d0225880ae36f2437c83fa46c3a65c86f8931)
---
M src/kudu/tablet/cbtree-test.cc
1 file changed, 17 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/53/23053/1
-- 
To view, visit http://gerrit.cloudera.org:8080/23053
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Gerrit-Change-Number: 23053
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: KeDeng <kd...@gmail.com>

[kudu-CR](branch-1.18.x) [arm64] Fix TestLeafNode unit test by ensuring proper node alignment

Posted by "KeDeng (Code Review)" <ge...@cloudera.org>.
KeDeng has posted comments on this change. ( http://gerrit.cloudera.org:8080/23053 )

Change subject: [arm64] Fix TestLeafNode unit test by ensuring proper node alignment
......................................................................


Patch Set 1: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/23053
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Gerrit-Change-Number: 23053
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: KeDeng <kd...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Fri, 20 Jun 2025 02:10:50 +0000
Gerrit-HasComments: No

[kudu-CR](branch-1.18.x) [arm64] Fix TestLeafNode unit test by ensuring proper node alignment

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23053 )

Change subject: [arm64] Fix TestLeafNode unit test by ensuring proper node alignment
......................................................................


Patch Set 1:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/1473/


-- 
To view, visit http://gerrit.cloudera.org:8080/23053
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Gerrit-Change-Number: 23053
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: KeDeng <kd...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 19 Jun 2025 15:30:07 +0000
Gerrit-HasComments: No

[kudu-CR](branch-1.18.x) [arm64] Fix TestLeafNode unit test by ensuring proper node alignment

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23053 )

Change subject: [arm64] Fix TestLeafNode unit test by ensuring proper node alignment
......................................................................


Patch Set 1: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/1473/ : FAILURE


-- 
To view, visit http://gerrit.cloudera.org:8080/23053
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Gerrit-Change-Number: 23053
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: KeDeng <kd...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Thu, 19 Jun 2025 16:54:59 +0000
Gerrit-HasComments: No

[kudu-CR](branch-1.18.x) [arm64] Fix TestLeafNode unit test by ensuring proper node alignment

Posted by "KeDeng (Code Review)" <ge...@cloudera.org>.
KeDeng has removed a vote on this change.

Change subject: [arm64] Fix TestLeafNode unit test by ensuring proper node alignment
......................................................................


Removed -Verified by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/23053
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Gerrit-Change-Number: 23053
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: KeDeng <kd...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>

[kudu-CR](branch-1.18.x) [arm64] Fix TestLeafNode unit test by ensuring proper node alignment

Posted by "KeDeng (Code Review)" <ge...@cloudera.org>.
KeDeng has posted comments on this change. ( http://gerrit.cloudera.org:8080/23053 )

Change subject: [arm64] Fix TestLeafNode unit test by ensuring proper node alignment
......................................................................


Patch Set 1: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/23053
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Gerrit-Change-Number: 23053
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: KeDeng <kd...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Fri, 20 Jun 2025 02:10:36 +0000
Gerrit-HasComments: No

[kudu-CR](branch-1.18.x) [arm64] Fix TestLeafNode unit test by ensuring proper node alignment

Posted by "KeDeng (Code Review)" <ge...@cloudera.org>.
KeDeng has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23053 )

Change subject: [arm64] Fix TestLeafNode unit test by ensuring proper node alignment
......................................................................

[arm64] Fix TestLeafNode unit test by ensuring proper node alignment

The following error occurs when running `bin/cbtree-test
--gtest_filter=TestCBTree.TestLeafNode` in an Rocky ARM environment.

*** Aborted at 1748486900 (unix time) try "date -d @1748486900" if you are using GNU date ***
PC: @                0x0 (unknown)
*** SIGBUS (@0xffffc794b2af) received by PID 32172 (TID 0xffff838a0040) from PID 18446744072762995375; stack trace: ***
    @     0xffff83f0e890 google::(anonymous namespace)::FailureSignalHandler()
    @     0xffff853b07a0 ([vdso]+0x79f)
    @           0x279efc kudu::tablet::btree::VersionField::Lock()
    @           0x2815e4 kudu::tablet::btree::NodeBase<>::Lock()
    @           0x2788a4 kudu::tablet::btree::TestCBTree::InsertInLeaf<>()
    @           0x269d18 kudu::tablet::btree::TestCBTree_TestLeafNode_Test::TestBody()
    @     0xffff83de0608 testing::internal::HandleExceptionsInMethodIfSupported<>()
    @     0xffff83dd2348 testing::Test::Run()
    @     0xffff83dd24e8 testing::TestInfo::Run()
    @     0xffff83dd2b90 testing::TestSuite::Run()
    @     0xffff83dd7274 testing::internal::UnitTestImpl::RunAllTests()
    @     0xffff83dd25f0 testing::UnitTest::Run()
    @     0xffff85335f84 (unknown)
    @     0xffff853353e4 (unknown)
    @     0xffff838e7280 __libc_start_call_main
    @     0xffff838e7358 __libc_start_main_alias_2
    @           0x2698b0 _start
Bus error

The TestLeafNode unit test was triggering SIGBUS crashes on ARM64
architectures due to unaligned access of atomic version fields.
This occurred because the test created LeafNode instances on the stack
without guaranteed alignment, while ARM64 strictly requires 8-byte
alignment for atomic uint64_t operations.

This test-specific fix complements the production code alignment
measures and ensures:
- Unit tests respect the same alignment requirements as production
- ARM64 environments don't trigger SIGBUS during test execution
- Test reliability across different architectures

Testing environment:
- ARM64 (Neoverse-N1) with Rocky Linux 9.5
- Docker container runtime
- Strict alignment enforcement causing SIGBUS on unaligned access

We extend our gratitude to Zoltan for his essential testing validation
and remediation recommendations in this fix.

Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Change-I: I6fea46308f942ded97d93d27ae466fd13a31b53
Reviewed-on: http://gerrit.cloudera.org:8080/23049
Reviewed-by: Zoltan Martonka <zm...@cloudera.com>
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Alexey Serbin <al...@apache.org>
(cherry picked from commit fd5d0225880ae36f2437c83fa46c3a65c86f8931)
Reviewed-on: http://gerrit.cloudera.org:8080/23053
Reviewed-by: KeDeng <kd...@gmail.com>
Tested-by: KeDeng <kd...@gmail.com>
---
M src/kudu/tablet/cbtree-test.cc
1 file changed, 17 insertions(+), 5 deletions(-)

Approvals:
  KeDeng: Looks good to me, approved; Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/23053
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Gerrit-Change-Number: 23053
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: KeDeng <kd...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>

[kudu-CR](branch-1.18.x) [arm64] Fix TestLeafNode unit test by ensuring proper node alignment

Posted by "KeDeng (Code Review)" <ge...@cloudera.org>.
KeDeng has removed a vote on this change.

Change subject: [arm64] Fix TestLeafNode unit test by ensuring proper node alignment
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/23053
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Gerrit-Change-Number: 23053
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: KeDeng <kd...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>

[kudu-CR](branch-1.18.x) [arm64] Fix TestLeafNode unit test by ensuring proper node alignment

Posted by "KeDeng (Code Review)" <ge...@cloudera.org>.
KeDeng has posted comments on this change. ( http://gerrit.cloudera.org:8080/23053 )

Change subject: [arm64] Fix TestLeafNode unit test by ensuring proper node alignment
......................................................................


Patch Set 1:

Unreleated test failures org.apache.kudu.client.TestSecurity


-- 
To view, visit http://gerrit.cloudera.org:8080/23053
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib838699ce3f966b2e7c371d5c74701f2f8d21a55
Gerrit-Change-Number: 23053
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: KeDeng <kd...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Fri, 20 Jun 2025 02:12:08 +0000
Gerrit-HasComments: No