This is an automated email from the ASF dual-hosted git repository.

hellostephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new e5bddd02f3c [Chore](build) set NDEBUG_SANITIZER on asan mode (#54028)
e5bddd02f3c is described below

commit e5bddd02f3c6fd4cf192819505f59356ce6b4cfc
Author: Pxl <[email protected]>
AuthorDate: Tue Jul 29 21:18:32 2025 +0800

    [Chore](build) set NDEBUG_SANITIZER on asan mode (#54028)
    
    ### What problem does this PR solve?
    set NDEBUG_SANITIZER on asan mode
    
    ```
      AddressSanitizer:DEADLYSIGNAL
    18:05:08   =================================================================
    18:05:08   ==17515==ERROR: AddressSanitizer: SEGV on unknown address (pc 
0x563cea4a925f bp 0x7ffedd655da0 sp 0x7ffedd655d90 T0)
    18:05:08   ==17515==The signal is caused by a READ memory access.
    18:05:08   ==17515==Hint: this fault was caused by a dereference of a high 
value address (see register values below).  Disassemble the provided pc to 
learn which register was used.
    18:05:17       #0 0x563cea4a925f in 
absl::lts_20250512::container_internal::btree_node<absl::lts_20250512::container_internal::map_params<S2CellId,
 S2ShapeIndexCell*, std::less<S2CellId>, std::allocator<std::pair<S2CellId 
const, S2ShapeIndexCell*>>, 256, false>>::parent() const 
/var/local/thirdparty/installed/include/absl/container/internal/btree.h:714:39
    18:05:17       #1 0x563cea4a9216 in 
absl::lts_20250512::container_internal::btree_node<absl::lts_20250512::container_internal::map_params<S2CellId,
 S2ShapeIndexCell*, std::less<S2CellId>, std::allocator<std::pair<S2CellId 
const, S2ShapeIndexCell*>>, 256, false>>::is_root() const 
/var/local/thirdparty/installed/include/absl/container/internal/btree.h:718:33
    18:05:17       #2 0x563cea4a9fae in 
absl::lts_20250512::container_internal::btree_node<absl::lts_20250512::container_internal::map_params<S2CellId,
 S2ShapeIndexCell*, std::less<S2CellId>, std::allocator<std::pair<S2CellId 
const, S2ShapeIndexCell*>>, 256, false>>::get_root_generation() const 
/var/local/thirdparty/installed/include/absl/container/internal/btree.h:729:19
    18:05:17       #3 0x563cea4a9b86 in 
absl::lts_20250512::container_internal::btree_node<absl::lts_20250512::container_internal::map_params<S2CellId,
 S2ShapeIndexCell*, std::less<S2CellId>, std::allocator<std::pair<S2CellId 
const, S2ShapeIndexCell*>>, 256, false>>::generation() const 
/var/local/thirdparty/installed/include/absl/container/internal/btree.h:735:41
    18:05:17       #4 0x563cea4a90bb in void 
absl::lts_20250512::container_internal::btree_iterator_generation_info_enabled::assert_valid_generation<absl::lts_20250512::container_internal::btree_node<absl::lts_20250512::container_internal::map_params<S2CellId,
 S2ShapeIndexCell*, std::less<S2CellId>, std::allocator<std::pair<S2CellId 
const, S2ShapeIndexCell*>>, 256, 
false>>>(absl::lts_20250512::container_internal::btree_node<absl::lts_20250512::container_internal::map_params<S2CellId,
 S2Sh [...]
    18:05:17       #5 0x563cea4b9771 in 
absl::lts_20250512::container_internal::btree_iterator<absl::lts_20250512::container_internal::btree_node<absl::lts_20250512::container_internal::map_params<S2CellId,
 S2ShapeIndexCell*, std::less<S2CellId>, std::allocator<std::pair<S2CellId 
const, S2ShapeIndexCell*>>, 256, false>> const, std::pair<S2CellId const, 
S2ShapeIndexCell*> const&, std::pair<S2CellId const, S2ShapeIndexCell*> 
const*>::increment() /var/local/thirdparty/installed/include/absl/ [...]
    18:05:17       #6 0x563cea4b94fa in 
absl::lts_20250512::container_internal::btree_iterator<absl::lts_20250512::container_internal::btree_node<absl::lts_20250512::container_internal::map_params<S2CellId,
 S2ShapeIndexCell*, std::less<S2CellId>, std::allocator<std::pair<S2CellId 
const, S2ShapeIndexCell*>>, 256, false>> const, std::pair<S2CellId const, 
S2ShapeIndexCell*> const&, std::pair<S2CellId const, S2ShapeIndexCell*> 
const*>::operator++() /var/local/thirdparty/installed/include/absl [...]
    18:05:17       #7 0x563cea4a7dbd in MutableS2ShapeIndex::Iterator::Next() 
/var/local/thirdparty/installed/include/s2/mutable_s2shape_index.h:720:3
    18:05:17       #8 0x563d0901dada  
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4b466ada)
    18:05:17       #9 0x563d0901eeac in 
s2shapeutil::FindSelfIntersection(S2ShapeIndex const&, S2Error*) 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4b467eac)
    18:05:17       #10 0x563d08fa4fbf in S2Loop::IsValid() const 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4b3edfbf)
    18:05:17       #11 0x563cea498899 in 
doris::to_s2loop(doris::GeoCoordinateList const&, std::unique_ptr<S2Loop, 
std::default_delete<S2Loop>>*) /root/doris/be/src/geo/geo_types.cpp:340:19
    18:05:17       #12 0x563cea4891cf in 
doris::to_s2polygon(doris::GeoCoordinateListList const&, 
std::unique_ptr<S2Polygon, std::default_delete<S2Polygon>>*) 
/root/doris/be/src/geo/geo_types.cpp:374:20
    18:05:17       #13 0x563cea488ee4 in 
doris::GeoPolygon::from_coords(doris::GeoCoordinateListList const&) 
/root/doris/be/src/geo/geo_types.cpp:786:12
    18:05:17       #14 0x563cea46d9be in wkt_parse(WktParseContext*) 
/root/doris/be/src/geo/wkt_yacc.y:130:38
    18:05:17       #15 0x563cea45fefc in doris::WktParse::parse_wkt(char 
const*, unsigned long, doris::GeoShape**) 
/root/doris/be/src/geo/wkt_parse.cpp:37:16
    18:05:17       #16 0x563cea4814c2 in doris::GeoShape::from_wkt(char const*, 
unsigned long, doris::GeoParseStatus*) 
/root/doris/be/src/geo/geo_types.cpp:407:15
    18:05:17       #17 0x563cda7df4ed in 
doris::GeoTypesTest_point_intersects_Test::TestBody() 
/root/doris/be/test/geo/geo_types_test.cpp:108:13
    18:05:17       #18 0x563d07bf5023 in void 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4a03e023)
    18:05:17       #19 0x563d07be4245 in void 
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4a02d245)
    18:05:17       #20 0x563d07bbed66 in testing::Test::Run() 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4a007d66)
    18:05:17       #21 0x563d07bbfa4c in testing::TestInfo::Run() 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4a008a4c)
    18:05:17       #22 0x563d07bc01df in testing::TestSuite::Run() 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4a0091df)
    18:05:17       #23 0x563d07bd199b in 
testing::internal::UnitTestImpl::RunAllTests() 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4a01a99b)
    18:05:17       #24 0x563d07bf6e53 in bool 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool>(testing::internal::UnitTestImpl*, bool 
(testing::internal::UnitTestImpl::*)(), char const*) 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4a03fe53)
    18:05:17       #25 0x563d07be6465 in bool 
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool>(testing::internal::UnitTestImpl*, bool 
(testing::internal::UnitTestImpl::*)(), char const*) 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4a02f465)
    18:05:17       #26 0x563d07bd152a in testing::UnitTest::Run() 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x4a01a52a)
    18:05:17       #27 0x563cdd9d3322 in RUN_ALL_TESTS() 
/var/local/thirdparty/installed/include/gtest/gtest.h:2490:46
    18:05:17       #28 0x563cdd9c689e in main 
/root/doris/be/test/testutil/run_all_tests.cpp:111:19
    18:05:17       #29 0x7f73ae7a4554 in __libc_start_main 
(/lib64/libc.so.6+0x22554) (BuildId: 1a8fb61bb4614a483833d5334202ab50edda2a25)
    18:05:17       #30 0x563cd9b0e029 in _start 
(/root/doris/be/ut_build_ASAN/test/doris_be_test+0x1bf57029)
    ```
---
 be/CMakeLists.txt               | 4 ++++
 cloud/src/common/CMakeLists.txt | 6 ------
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index a18784e6a09..41528b6626c 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -422,6 +422,9 @@ elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")
     set(CMAKE_CXX_FLAGS ${CXX_FLAGS_RELEASE})
 elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "ASAN")
     set(CMAKE_CXX_FLAGS "${CXX_FLAGS_ASAN}")
+    # 
https://github.com/abseil/abseil-cpp/commit/68ce303da1920522a27e5d8e2732b3e50d3aae57
+    # for disable some asan check of absl
+    add_definitions(-DNDEBUG_SANITIZER)
 elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "LSAN")
     set(CMAKE_CXX_FLAGS "${CXX_FLAGS_LSAN}")
 elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "UBSAN")
@@ -430,6 +433,7 @@ elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "TSAN")
     set(CMAKE_CXX_FLAGS "${CXX_FLAGS_TSAN}")
 elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "ASAN_UT")
     set(CMAKE_CXX_FLAGS "${CXX_FLAGS_ASAN_UT}")
+    add_definitions(-DNDEBUG_SANITIZER)
 else()
     message(FATAL_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE}")
 endif()
diff --git a/cloud/src/common/CMakeLists.txt b/cloud/src/common/CMakeLists.txt
index 429748909be..008e8906044 100644
--- a/cloud/src/common/CMakeLists.txt
+++ b/cloud/src/common/CMakeLists.txt
@@ -15,12 +15,6 @@ set(COMMON_FILES
     network_util.cpp
 )
 
-if (USE_JEMALLOC)
-    set(COMMON_FILES ${COMMON_FILES}
-        jemalloc_hook.cpp
-        )
-endif()
-
 add_library(Common STATIC
     ${COMMON_FILES}
     )


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to