Skip to content

Commit

Permalink
Print gdb stack traces from core dumps on failures
Browse files Browse the repository at this point in the history
Because:
- Although we upload core dump artifacts, it's hard to debug core dumps
  on another system than the one that generated them.

- Using the original system to just print the stack traces from any core
  dumps found can help a lot to figure out what's going on.
  • Loading branch information
lunkwill42 committed Jul 30, 2021
1 parent 60e3de3 commit 882a6b6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ jobs:
path: |
/tmp/core-*
- name: Print stack traces of core dumps (${{ matrix.python-version }})
if: failure()
run: |
sudo apt-get install -y gdb
set -x
for core in /tmp/core-*; do
echo "===== CORE: $core ====="
file "$core"
program=$(gdb -ex quit -c "$core" | grep -o "generated by.*" | awk '{print $3}' | tr -d '`')
gdb -ex bt "$program" "$core"
echo
done
publish-test-results:
name: "Publish test results"
needs: build-and-test
Expand Down

0 comments on commit 882a6b6

Please sign in to comment.