Skip to content

Commit

Permalink
Add core dump debugging for build workflow
Browse files Browse the repository at this point in the history
The build workflow has been updated with the ability to generate and handle core dumps for debugging purposes. 'gdb' was added to the build tools, the system was configured to enable core dumps, and a step was added to check for and report on any core dumps that occur during the build process. These updates will provide valuable debugging information in the event of a build failure.
  • Loading branch information
koriym committed Jul 4, 2024
1 parent 959503f commit 3c6dc81
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ jobs:
extensions: mbstring, intl

- name: Install build tools
run: sudo apt-get update && sudo apt-get install -y autoconf automake libtool bison re2c
run: sudo apt-get update && sudo apt-get install -y autoconf automake libtool bison re2c gdb

- name: Enable core dumps
run: |
ulimit -c unlimited
echo '/tmp/core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern
- name: Prepare build
run: |
Expand All @@ -39,3 +44,15 @@ jobs:
run: |
php -dextension=./modules/rayaop.so -i | grep rayaop
timeout 60s php -dextension=./modules/rayaop.so -dmemory_limit=128M -dreport_memleaks=1 -dzend.assertions=1 -dassert.exception=1 smoke.php
- name: Check for core dump
if: failure()
run: |
if ls /tmp/core.* 1> /dev/null 2>&1; then
for corefile in /tmp/core.*; do
echo "Core dump found: $corefile"
gdb -batch -ex "bt full" -ex "quit" -c $corefile $(which php)
done
else
echo "No core dump found"
fi

0 comments on commit 3c6dc81

Please sign in to comment.