This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new e83901a277d branch-3.1: [opt](cloud) add Sanitizer options #52883
(#52979)
e83901a277d is described below
commit e83901a277db7e7a0bb30dc892c1ef2ff9e65967
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jul 9 16:58:41 2025 +0800
branch-3.1: [opt](cloud) add Sanitizer options #52883 (#52979)
Cherry-picked from #52883
Co-authored-by: Dongyang Li <[email protected]>
---
cloud/CMakeLists.txt | 3 +++
cloud/conf/{lsan_suppression.conf => asan_suppr.conf} | 3 ---
cloud/conf/{lsan_suppression.conf => lsan_suppr.conf} | 1 +
cloud/conf/{lsan_suppression.conf => ubsan_suppr.conf} | 3 ---
cloud/script/run_all_tests.sh | 2 +-
cloud/script/start.sh | 10 ++++++++++
cloud/test/CMakeLists.txt | 2 +-
7 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/cloud/CMakeLists.txt b/cloud/CMakeLists.txt
index 59f77c4927e..575e55f297f 100644
--- a/cloud/CMakeLists.txt
+++ b/cloud/CMakeLists.txt
@@ -532,6 +532,9 @@ install(FILES
install(FILES
${BASE_DIR}/conf/doris_cloud.conf
+ ${BASE_DIR}/conf/asan_suppr.conf
+ ${BASE_DIR}/conf/lsan_suppr.conf
+ ${BASE_DIR}/conf/ubsan_suppr.conf
DESTINATION ${OUTPUT_DIR}/conf)
install(FILES
diff --git a/cloud/conf/lsan_suppression.conf b/cloud/conf/asan_suppr.conf
similarity index 91%
copy from cloud/conf/lsan_suppression.conf
copy to cloud/conf/asan_suppr.conf
index 4b6fc3127a9..245692337bc 100644
--- a/cloud/conf/lsan_suppression.conf
+++ b/cloud/conf/asan_suppr.conf
@@ -15,6 +15,3 @@
# specific language governing permissions and limitations
# under the License.
-# This is a known leak.
-leak:libfdb_c.so
-leak:brpc::Server::StartInternal
diff --git a/cloud/conf/lsan_suppression.conf b/cloud/conf/lsan_suppr.conf
similarity index 96%
copy from cloud/conf/lsan_suppression.conf
copy to cloud/conf/lsan_suppr.conf
index 4b6fc3127a9..6b9ee40e23f 100644
--- a/cloud/conf/lsan_suppression.conf
+++ b/cloud/conf/lsan_suppr.conf
@@ -18,3 +18,4 @@
# This is a known leak.
leak:libfdb_c.so
leak:brpc::Server::StartInternal
+leak:aws_mqtt_library_init
diff --git a/cloud/conf/lsan_suppression.conf b/cloud/conf/ubsan_suppr.conf
similarity index 91%
rename from cloud/conf/lsan_suppression.conf
rename to cloud/conf/ubsan_suppr.conf
index 4b6fc3127a9..245692337bc 100644
--- a/cloud/conf/lsan_suppression.conf
+++ b/cloud/conf/ubsan_suppr.conf
@@ -15,6 +15,3 @@
# specific language governing permissions and limitations
# under the License.
-# This is a known leak.
-leak:libfdb_c.so
-leak:brpc::Server::StartInternal
diff --git a/cloud/script/run_all_tests.sh b/cloud/script/run_all_tests.sh
index f2b5f4dd9b0..003510f91d4 100644
--- a/cloud/script/run_all_tests.sh
+++ b/cloud/script/run_all_tests.sh
@@ -127,7 +127,7 @@ function report_coverage() {
${binary_objects_options[*]}
}
-export LSAN_OPTIONS=suppressions=./lsan_suppression.conf
+export LSAN_OPTIONS=suppressions=./lsan_suppr.conf
unittest_files=()
for i in *_test; do
[[ -e "${i}" ]] || break
diff --git a/cloud/script/start.sh b/cloud/script/start.sh
index abb944f2412..506a279ad78 100644
--- a/cloud/script/start.sh
+++ b/cloud/script/start.sh
@@ -126,6 +126,16 @@ export CLASSPATH="${DORIS_CLASSPATH}"
export LD_LIBRARY_PATH="${JAVA_HOME}/lib/server:${LD_LIBRARY_PATH}"
+# filter known leak
+export LSAN_OPTIONS=suppressions=${DORIS_HOME}/conf/lsan_suppr.conf
+export ASAN_OPTIONS=suppressions=${DORIS_HOME}/conf/asan_suppr.conf
+export UBSAN_OPTIONS=suppressions=${DORIS_HOME}/conf/ubsan_suppr.conf
+
+## set asan and ubsan env to generate core file
+## detect_container_overflow=0, https://github.com/google/sanitizers/issues/193
+export
ASAN_OPTIONS=symbolize=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1:detect_container_overflow=0:check_malloc_usable_size=0:${ASAN_OPTIONS}
+export UBSAN_OPTIONS=print_stacktrace=1:${UBSAN_OPTIONS}
+
## set libhdfs3 conf
if [[ -f "${DORIS_HOME}/conf/hdfs-site.xml" ]]; then
export LIBHDFS3_CONF="${DORIS_HOME}/conf/hdfs-site.xml"
diff --git a/cloud/test/CMakeLists.txt b/cloud/test/CMakeLists.txt
index 49e2178ac8e..d7bed4ad311 100644
--- a/cloud/test/CMakeLists.txt
+++ b/cloud/test/CMakeLists.txt
@@ -135,7 +135,7 @@ install(FILES
${BASE_DIR}/script/run_all_tests.sh
${BASE_DIR}/conf/fdb.cluster
${BASE_DIR}/conf/doris_cloud.conf
- ${BASE_DIR}/conf/lsan_suppression.conf
+ ${BASE_DIR}/conf/lsan_suppr.conf
${BASE_DIR}/test/fdb_metric_example.json
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_WRITE GROUP_EXECUTE
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]