From 8afc25b19cc57210f9f1c275e877646d5ace4278 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 10 Mar 2026 12:35:28 +0100 Subject: [PATCH 1/4] Attempt to get crash info on Linux Test failure due to segmentation fault --- .github/data/bt.sh | 16 ++++++++++++++++ .github/workflows/tests.yml | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .github/data/bt.sh diff --git a/.github/data/bt.sh b/.github/data/bt.sh new file mode 100644 index 000000000..72328d856 --- /dev/null +++ b/.github/data/bt.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# https://gist.github.com/ongardie/aa15f1f0d0e6b59890a9 +gdb -q --batch \ + -ex 'handle SIGHUP nostop pass' \ + -ex 'handle SIGQUIT nostop pass' \ + -ex 'handle SIGPIPE nostop pass' \ + -ex 'handle SIGALRM nostop pass' \ + -ex 'handle SIGTERM nostop pass' \ + -ex 'handle SIGUSR1 nostop pass' \ + -ex 'handle SIGUSR2 nostop pass' \ + -ex 'handle SIGCHLD nostop pass' \ + -ex 'set print thread-events off' \ + -ex 'run' \ + -ex 'thread apply all bt' \ + --tty=/dev/stdout \ + --args $* diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 374522ae4..2d79fc597 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,6 +30,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev + chmox +x .github/data/bt.sh - name: Build run: | ./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8 @@ -38,7 +39,7 @@ jobs: dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo - name: Test run: | - ${GITHUB_WORKSPACE}/Binaries/Editor/Linux/Development/FlaxTests -headless + ${GITHUB_WORKSPACE}/.github/data/bt.sh ./Binaries/Editor/Linux/Development/FlaxTests -headless dotnet test -f net8.0 Binaries/Tests/Flax.Build.Tests.dll cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.dll Binaries/Tests cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.runtimeconfig.json Binaries/Tests From 7fe7a8dd0ed9fa56a32aa3fc00aa4ae68f6689e4 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 10 Mar 2026 12:41:35 +0100 Subject: [PATCH 2/4] Typo --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2d79fc597..e23d7d7e6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev - chmox +x .github/data/bt.sh + chmod +x .github/data/bt.sh - name: Build run: | ./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8 From e90de5d815f4b5e45b8a9cb7987e922887c767a1 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 10 Mar 2026 13:00:03 +0100 Subject: [PATCH 3/4] Add `gdb` package --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e23d7d7e6..6b9168f11 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,7 +29,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev + sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev gdb chmod +x .github/data/bt.sh - name: Build run: | From ee38f8856229595aee6a1d79020c479605dfa66b Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 10 Mar 2026 13:23:51 +0100 Subject: [PATCH 4/4] Ensure to fail Github Action test on Linux when `gdb` detects the crash --- .github/data/bt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/data/bt.sh b/.github/data/bt.sh index 72328d856..f636b0ffa 100644 --- a/.github/data/bt.sh +++ b/.github/data/bt.sh @@ -10,6 +10,7 @@ gdb -q --batch \ -ex 'handle SIGUSR2 nostop pass' \ -ex 'handle SIGCHLD nostop pass' \ -ex 'set print thread-events off' \ + -return-child-result \ -ex 'run' \ -ex 'thread apply all bt' \ --tty=/dev/stdout \