[Enhancement] bump up breakpad to 2024.02.16 to fix crash in dump_syms (#60005)

we are using and older version of dump_syms that doesn’t understand the .relr.dyn section

Fixes #60004

update breakpad to version breakpad-2024.02.16

$ bash thirdparty/minidump/gen_minidump_symbols.sh
starrocks_be'size (2153mb) reduced to (556mb)
symbol file is at /home/ubuntu/starrocks/output/be/symbols/starrocks_be/AC7FAB7F8B5BF82100000000000000000

Signed-off-by: Rohit Satardekar <rohitrs1983@gmail.com>
This commit is contained in:
Rohit Satardekar 2025-06-22 05:18:33 +05:30 committed by GitHub
parent 5217b2441e
commit d96b52103a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 28 additions and 6 deletions

View File

@ -915,6 +915,7 @@ build_breakpad() {
cd $TP_SOURCE_DIR/$BREAK_PAD_SOURCE
mkdir -p src/third_party/lss
cp $TP_PATCH_DIR/linux_syscall_support.h src/third_party/lss
LDFLAGS="-L${TP_LIB_DIR}" \
CFLAGS= ./configure --prefix=$TP_INSTALL_DIR --enable-shared=no --disable-samples --disable-libevent-regress
make -j$PARALLEL
make install

View File

@ -596,6 +596,10 @@ if [[ -d $TP_SOURCE_DIR/$BREAK_PAD_SOURCE ]] ; then
patch -p1 < "$TP_PATCH_DIR/breakpad-2022.07.12.patch"
touch "$PATCHED_MARK"
fi
if [ ! -f "$PATCHED_MARK" ] && [[ $BREAK_PAD_SOURCE == "breakpad-2024.02.16" ]] ; then
patch -p1 < "$TP_PATCH_DIR/breakpad-2024.02.16.patch"
touch "$PATCHED_MARK"
fi
cd -
echo "Finished patching $BREAK_PAD_SOURCE"
fi

View File

@ -12,10 +12,10 @@ starrocks_home=$(dirname $(dirname $curdir))
# generate symbol's file in Breakpad's own format.
$(dirname $curdir)/installed/bin/dump_syms $starrocks_home/output/be/lib/starrocks_be > $starrocks_home/output/be/starrocks_be.sym
((starrocks_be_size_original=`ls -l output/be/lib/starrocks_be | awk '{print $5}'` / (1024*1024)))
((starrocks_be_size_original=`ls -l $starrocks_home/output/be/lib/starrocks_be | awk '{print $5}'` / (1024*1024)))
# remove debugging infos
strip $starrocks_home/output/be/lib/starrocks_be
((starrocks_be_size_simplify=`ls -l output/be/lib/starrocks_be | awk '{print $5}'` / (1024*1024)))
((starrocks_be_size_simplify=`ls -l $starrocks_home/output/be/lib/starrocks_be | awk '{print $5}'` / (1024*1024)))
# echo size reduction
echo "starrocks_be'size ("$starrocks_be_size_original"mb) reduced to ("$starrocks_be_size_simplify"mb)"

View File

@ -0,0 +1,17 @@
diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc
index b693fc9e..8686ee38 100644
--- a/src/common/linux/dump_symbols.cc
+++ b/src/common/linux/dump_symbols.cc
@@ -82,6 +82,12 @@
#endif
#include "common/using_std_string.h"
+#ifndef SHF_COMPRESSED
+#define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */
+#define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE algorithm. */
+#define EM_RISCV 243 /* RISC-V */
+#endif
+
// This namespace contains helper functions.
namespace {

8
thirdparty/vars.sh vendored
View File

@ -295,10 +295,10 @@ RYU_SOURCE="ryu-aa31ca9361d21b1a00ee054aac49c87d07e74abc"
RYU_MD5SUM="cb82b6da904d919470fe3f5a01ca30ff"
# breakpad
BREAK_PAD_DOWNLOAD="https://github.com/google/breakpad/archive/refs/tags/v2022.07.12.tar.gz"
BREAK_PAD_NAME="breakpad-2022.07.12.tar.gz"
BREAK_PAD_SOURCE="breakpad-2022.07.12"
BREAK_PAD_MD5SUM="d5bcfd3f7b361ef5bda96123c3abdd0a"
BREAK_PAD_DOWNLOAD="https://github.com/google/breakpad/archive/refs/tags/v2024.02.16.tar.gz"
BREAK_PAD_NAME="breakpad-2024.02.16.tar.gz"
BREAK_PAD_SOURCE="breakpad-2024.02.16"
BREAK_PAD_MD5SUM="ae8c55b23c157771922b5ddca3803055"
# RAGEL
# ragel-6.9+ is used by hyperscan, so we build it first