You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
chore(ci): Better coredumps handling
This commit is contained in:
committed by
Aleksei Bukhalov
parent
17687917ee
commit
9a305a7296
@ -11,10 +11,10 @@ source "$SCRIPT_LOCATION"/utils.sh
|
|||||||
echo "Arguments received: $@"
|
echo "Arguments received: $@"
|
||||||
|
|
||||||
optparse.define short=c long=container-name desc="Name of the Docker container to run tests in" variable=CONTAINER_NAME
|
optparse.define short=c long=container-name desc="Name of the Docker container to run tests in" variable=CONTAINER_NAME
|
||||||
optparse.define short=i long=docker-image desc="Docker image name to start container from" variable=DOCKER_IMAGE
|
optparse.define short=i long=docker-image desc="Docker image name to start container from" variable=DOCKER_IMAGE
|
||||||
optparse.define short=r long=result-path desc="Name suffix used in core dump file path" variable=RESULT
|
optparse.define short=r long=result-path desc="Name suffix used in core dump file path" variable=RESULT
|
||||||
optparse.define short=s long=do-setup desc="Run setup-repo.sh inside the container" variable=DO_SETUP
|
optparse.define short=s long=do-setup desc="Run setup-repo.sh inside the container" variable=DO_SETUP
|
||||||
optparse.define short=u long=packages-url desc="Packages url" variable=PACKAGES_URL
|
optparse.define short=u long=packages-url desc="Packages url" variable=PACKAGES_URL
|
||||||
source $(optparse.build)
|
source $(optparse.build)
|
||||||
|
|
||||||
if [[ "$EUID" -ne 0 ]]; then
|
if [[ "$EUID" -ne 0 ]]; then
|
||||||
@ -104,10 +104,10 @@ fi
|
|||||||
|
|
||||||
# install deps
|
# install deps
|
||||||
if [[ "$RESULT" == *rocky* ]]; then
|
if [[ "$RESULT" == *rocky* ]]; then
|
||||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'yum update -y && yum install -y cracklib-dicts diffutils elfutils epel-release findutils iproute gawk gcc-c++ gdb hostname lz4 patch perl procps-ng rsyslog sudo tar wget which'
|
execInnerDockerWithRetry "$CONTAINER_NAME" 'yum update -y && yum install -y cracklib-dicts diffutils elfutils epel-release expect findutils iproute gawk gcc-c++ gdb hostname lz4 patch perl procps-ng rsyslog sudo tar wget which'
|
||||||
else
|
else
|
||||||
change_ubuntu_mirror_in_docker "$CONTAINER_NAME" "us"
|
change_ubuntu_mirror_in_docker "$CONTAINER_NAME" "us"
|
||||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'apt update -y && apt install -y elfutils findutils iproute2 g++ gawk gdb hostname liblz4-tool patch procps rsyslog sudo tar wget'
|
execInnerDockerWithRetry "$CONTAINER_NAME" 'apt update -y && apt install -y elfutils expect findutils iproute2 g++ gawk gdb hostname liblz4-tool patch procps rsyslog sudo tar wget'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Configure core dump naming pattern
|
# Configure core dump naming pattern
|
||||||
|
@ -9,25 +9,24 @@ SCRIPT_LOCATION=$(dirname "$0")
|
|||||||
DUMPNAME=$4
|
DUMPNAME=$4
|
||||||
STEP_NAME=$5
|
STEP_NAME=$5
|
||||||
|
|
||||||
save_ansi_to_html ()
|
save_ansi_to_html() {
|
||||||
{
|
|
||||||
echo "<b> $1 </b>" >> "${FILENAME}";
|
echo "<h2> $1 </h2>" >>"${FILENAME}"
|
||||||
cat "$DUMPNAME" | bash "${SCRIPT_LOCATION}"/ansi2html.sh --palette=solarized >> "${FILENAME}"
|
cat "$DUMPNAME" | bash "${SCRIPT_LOCATION}"/ansi2html.sh --palette=solarized >>"${FILENAME}"
|
||||||
|
}
|
||||||
|
invoke_gdb_command() {
|
||||||
|
unbuffer gdb -x "${SCRIPT_LOCATION}"/gdbinit -q ${BINARY} --core ${COREDUMP} -ex "$1" -ex quit >>"$DUMPNAME"
|
||||||
}
|
}
|
||||||
|
|
||||||
invoke_gdb_command ()
|
echo "<h1> Step: ${STEP_NAME}<br> Binary name: ${BINARY}<br> </h1>" >>"${FILENAME}"
|
||||||
{
|
|
||||||
echo "gdb -q ${BINARY} --core ${COREDUMP} -ex '$1' -ex quit"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
invoke_gdb_command 'bt full'
|
||||||
gdb -q "${BINARY}" --core ${COREDUMP} -ex 'bt' -ex quit >> "$DUMPNAME"
|
|
||||||
gdb -q "${BINARY}" --core ${COREDUMP} -ex 'info args' -ex quit >> "$DUMPNAME"
|
|
||||||
gdb -q "${BINARY}" --core ${COREDUMP} -ex 'info locals' -ex quit >> "$DUMPNAME"
|
|
||||||
|
|
||||||
echo "<b> Step: ${STEP_NAME}<br> Binary name: ${BINARY}<br> </b>" >> "${FILENAME}";
|
|
||||||
save_ansi_to_html "Backtrace"
|
save_ansi_to_html "Backtrace"
|
||||||
|
|
||||||
|
invoke_gdb_command "info args"
|
||||||
save_ansi_to_html "Arguments"
|
save_ansi_to_html "Arguments"
|
||||||
|
|
||||||
|
invoke_gdb_command "info locals"
|
||||||
save_ansi_to_html "Locals"
|
save_ansi_to_html "Locals"
|
||||||
|
|
||||||
gzip -5 "${COREDUMP}"
|
gzip -5 "${COREDUMP}"
|
||||||
|
3829
core_dumps/gdbinit
Normal file
3829
core_dumps/gdbinit
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user