KeDeng has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22977 )

Change subject: [arm64] Fix SIGBUS errors for atomic operations
......................................................................


Patch Set 2:

(1 comment)

Thanks for your suggestion. I switched to GCC 11 for compilation, and the 
previously consistent crash no longer occurs. It seems related to the compiler 
choice.

[----------] Global test environment tear-down
[==========] 17 tests from 1 test suite ran. (730 ms total)
[  PASSED  ] 16 tests.
[  SKIPPED ] 1 test, listed below:
[  SKIPPED ] TestCBTree.ConcurrentReadWriteBenchmark
[root@ef56ace18cec debug]# readelf -p .comment ./bin/cbtree-test

String dump of section '.comment':
  [     1]  GCC: (GNU) 11.5.0 20240719 (Red Hat 11.5.0-2)
  [    2f]  GCC: (GNU) 11.5.0 20240719 (Red Hat 11.5.0-5)

http://gerrit.cloudera.org:8080/#/c/22977/1/src/kudu/tablet/concurrent_btree.h
File src/kudu/tablet/concurrent_btree.h:

http://gerrit.cloudera.org:8080/#/c/22977/1/src/kudu/tablet/concurrent_btree.h@461
PS1, Line 461:   alignas(8) AtomicVersionValue versionPlaceholder_;
> I agree with Zoltan: we need to fix this, for sure.  To be able to put toge
Thank you for your reply. I used GDB to capture the stack information of a core 
in debug mode, as shown below.
(gdb) r
Starting program: /data/code/kudu/build/debug/bin/cbtree-test
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[==========] Running 17 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 17 tests from TestCBTree
[ RUN      ] TestCBTree.TestNodeSizes
[       OK ] TestCBTree.TestNodeSizes (3 ms)
[ RUN      ] TestCBTree.TestLeafNode

Program received signal SIGBUS, Bus error.
0x0000000000279efc in std::__atomic_base<unsigned long>::load 
(this=0xffffcdefd95f, __m=std::memory_order_acquire) at 
/opt/rh/gcc-toolset-13/root/usr/lib/gcc/aarch64-redhat-linux/13/../../../../include/c++/13/bits/atomic_base.h:505
505             return __atomic_load_n(&_M_i, int(__m));
Missing separate debuginfos, use: dnf debuginfo-install 
glibc-2.34-125.el9_5.1.aarch64 libgcc-11.5.0-5.el9_5.aarch64 
libstdc++-11.5.0-5.el9_5.aarch64 openssl-libs-3.2.2-6.el9_5.1.aarch64
(gdb) bt
#0  0x0000000000279efc in std::__atomic_base<unsigned long>::load 
(this=0xffffcdefd95f, __m=std::memory_order_acquire) at 
/opt/rh/gcc-toolset-13/root/usr/lib/gcc/aarch64-redhat-linux/13/../../../../include/c++/13/bits/atomic_base.h:505
#1  kudu::tablet::btree::VersionField::Lock (version=0xffffcdefd95f) at 
/data/code/kudu/src/kudu/tablet/concurrent_btree.h:143
#2  0x0000000000281608 in 
kudu::tablet::btree::NodeBase<kudu::tablet::btree::BTreeTraits>::Lock 
(this=0xffffcdefd95f) at /data/code/kudu/src/kudu/tablet/concurrent_btree.h:397
#3  0x00000000002788a4 in 
kudu::tablet::btree::TestCBTree::InsertInLeaf<kudu::tablet::btree::BTreeTraits> 
(this=0x37533f40, l=0xffffcdefd95f, arena=0xffffcdefd8e0, k=..., v=...) at 
/data/code/kudu/src/kudu/tablet/cbtree-test.cc:82
#4  0x0000000000269d18 in 
kudu::tablet::btree::TestCBTree_TestLeafNode_Test::TestBody (this=0x37533f40) 
at /data/code/kudu/src/kudu/tablet/cbtree-test.cc:131
#5  0x0000ffffa9570608 in 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> 
(location=0xffffa9573900 "the test body", method=<optimized out>, 
object=0x37533f40)
    at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:2599
#6  testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> 
(object=object@entry=0x37533f40, method=<optimized out>, 
location=location@entry=0xffffa9573900 "the test body")
    at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:2635
#7  0x0000ffffa9562348 in testing::Test::Run (this=0x37533f40) at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:2674
#8  testing::Test::Run (this=0x37533f40) at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:2664
#9  0x0000ffffa95624e8 in testing::TestInfo::Run (this=0x37630120) at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:2853
#10 0x0000ffffa9562b90 in testing::TestSuite::Run (this=0x37630240) at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:3012
#11 testing::TestSuite::Run (this=0x37630240) at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:2985
#12 0x0000ffffa9567274 in testing::internal::UnitTestImpl::RunAllTests 
(this=this@entry=0x37640280) at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:5870
#13 0x0000ffffa95625f0 in 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool> (location=0xffffa9573980 "auxiliary test code (environments or event 
listeners)", method=<optimized out>, object=0x37640280)
    at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:2580
#14 
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool> (location=0xffffa9573980 "auxiliary test code (environments or event 
listeners)", method=<optimized out>, object=0x37640280)
    at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:2635
#15 testing::UnitTest::Run (this=0xffffa95a1090 
<testing::UnitTest::GetInstance()::instance>) at 
/data/code/kudu/thirdparty/src/googletest-release-1.12.1/googletest/src/gtest.cc:5444
#16 0x0000ffffaaac5f84 in RUN_ALL_TESTS () at 
/data/code/kudu/thirdparty/installed/uninstrumented/include/gtest/gtest.h:2293
#17 0x0000ffffaaac53e4 in main (argc=1, argv=0xffffcdefdf88) at 
/data/code/kudu/src/kudu/util/test_main.cc:109
#18 0x0000ffffa9077280 in __libc_start_call_main () from /lib64/libc.so.6
#19 0x0000ffffa9077358 in __libc_start_main_impl () from /lib64/libc.so.6
#20 0x00000000002698b0 in _start ()
(gdb)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6f8ea46308f942ded97d93d27ae466fd13a31b53
Gerrit-Change-Number: 22977
Gerrit-PatchSet: 2
Gerrit-Owner: KeDeng <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: KeDeng <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Martonka <[email protected]>
Gerrit-Comment-Date: Fri, 13 Jun 2025 07:11:01 +0000
Gerrit-HasComments: Yes

Reply via email to