You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by ti...@apache.org on 2022/11/03 09:29:30 UTC
[incubator-kvrocks] branch unstable updated: Dump stacktrace for crashed instance started by go test in CI (#1065)
This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 7105ba15 Dump stacktrace for crashed instance started by go test in CI (#1065)
7105ba15 is described below
commit 7105ba15e0dab132761527715c5110ec54806017
Author: Twice <tw...@gmail.com>
AuthorDate: Thu Nov 3 17:29:25 2022 +0800
Dump stacktrace for crashed instance started by go test in CI (#1065)
---
.github/workflows/kvrocks.yaml | 34 +++++++++++++++++++++++++++++++---
1 file changed, 31 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/kvrocks.yaml b/.github/workflows/kvrocks.yaml
index 40a52b76..4a883b6a 100644
--- a/.github/workflows/kvrocks.yaml
+++ b/.github/workflows/kvrocks.yaml
@@ -196,14 +196,22 @@ jobs:
run: |
./x.py build -j$NPROC --unittest --compiler ${{ matrix.compiler }} ${{ matrix.without_jemalloc }} ${{ matrix.with_luajit }} \
${{ matrix.with_ninja }} ${{ matrix.with_sanitizer }} ${{ matrix.with_openssl }} ${{ env.CMAKE_EXTRA_DEFS }}
+
+ - name: Setup Coredump
+ if: ${{ startsWith(matrix.os, 'ubuntu') }}
+ run: |
+ echo "$(pwd)/coredumps/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern
+ mkdir coredumps
- name: Run Unit Test
run: |
+ ulimit -c unlimited
export ${{ matrix.runtime_env_vars }}
./x.py test cpp
- name: Run Go Integration Cases
run: |
+ ulimit -c unlimited
export ${{ matrix.runtime_env_vars }}
export PATH=$PATH:$HOME/local/bin/
GOCASE_RUN_ARGS=""
@@ -217,15 +225,35 @@ jobs:
GOCASE_RUN_ARGS="-tlsEnable"
fi
./x.py test go build $GOCASE_RUN_ARGS
+
+ - name: Find reports and crashes
+ if: always()
+ run: |
SANITIZER_OUTPUT=$(grep "Sanitizer:" tests/gocase/workspace -r || true)
if [[ $SANITIZER_OUTPUT ]]; then
+ echo "found sanitizer reports:"
echo "$SANITIZER_OUTPUT"
- echo "\ndetail reports:\n"
- cat $(find tests/gocase/workspace -iname stderr)
- echo "sanitizer error was reported, exiting..."
+ echo "detail log:"
+ cat $(echo "$SANITIZER_OUTPUT" | awk -F ':' '{print $1}')
+ exit 1
+ fi
+ CRASHES=$(grep "Ooops!" tests/gocase/workspace -r || true)
+ if [[ $CRASHES ]]; then
+ echo "found crashes:"
+ echo "$CRASHES"
+ echo "detail log:"
+ cat $(echo "$CRASHES" | awk -F ':' '{print $1}')
exit 1
fi
+ - uses: actions/upload-artifact@v2
+ if: ${{ failure() && startsWith(matrix.os, 'ubuntu') }}
+ with:
+ name: kvrocks-coredumps-${{ matrix.name }}
+ path: |
+ ./build/kvrocks
+ ./coredumps/*
+
required:
if: always()
name: Required