Skip to content

Commit f31c36b

Browse files
committed
aggressively debug inconsistent segfault
1 parent a6b6c32 commit f31c36b

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.github/workflows/zhook.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@ on:
1717

1818
jobs:
1919
mattermost-ziti-webhook:
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-24.04
2121
name: POST Webhook
2222
steps:
2323
- name: Debug
2424
uses: hmarr/debug-action@v3
2525

26+
- name: Install Valgrind
27+
shell: bash
28+
run: sudo apt-get install --yes valgrind gdb
29+
2630
- name: Checkout
2731
uses: actions/checkout@v4
2832

@@ -43,9 +47,10 @@ jobs:
4347
run: |
4448
set -o pipefail
4549
set -o xtrace
46-
pip install --user --upgrade requests openziti
47-
echo "DEBUG: PYTHONPATH=${PYTHONPATH:-}"
48-
python ./zhook.py
50+
pip install --user --upgrade --requirement ./requirements.txt
51+
sudo sysctl -w kernel.core_pattern='/tmp/core.%e.%p.%t'
52+
ulimit -c unlimited
53+
valgrind --verbose --log-file=/tmp/zook.py-valgrind-%p-%n.log --leak-check=full python ./zhook.py
4954
5055
- uses: ./
5156
name: Run as a GH Action from the Local Checkout
@@ -58,3 +63,19 @@ jobs:
5863
webhookUrl: ${{ secrets.ZHOOK_URL_DEV_NOTIFICATIONS }}
5964
eventJson: ${{ toJson(github.event) }}
6065
senderUsername: GitHubZ
66+
67+
- name: Print Debug Info
68+
if: always()
69+
shell: bash
70+
run: |
71+
set -o pipefail
72+
set -o xtrace
73+
echo "DEBUG: PYTHONPATH=${PYTHONPATH:-}"
74+
echo "DEBUG: PATH=${PATH:-}"
75+
echo "DEBUG: LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}"
76+
find $(python -c "import site; print(site.USER_SITE)") -path "*/openziti*" -name "*.so*" -type f -print0 | xargs -0r ldd
77+
cat /tmp/zook.py-valgrind-*.log
78+
if [ -s /tmp/core.python.* ]; then
79+
echo "DEBUG: Core dump found"
80+
gdb -q $(realpath $(which python)) -c /tmp/core.python.* --ex bt --ex exit
81+
fi

0 commit comments

Comments
 (0)