From 179b7b8352ac285c2b309b8c9bd8e96055c64041 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 11:52:41 +0000 Subject: [PATCH] Fix SDE CI job hanging indefinitely after tests complete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SDE (built on Intel PIN) can hang during process teardown on Linux/GitHub Actions when ASan atexit handlers and non-trivial static destructors run. This causes the build-and-test-with-SDE job to block until the 6-hour GitHub Actions default timeout. Fix: - Add timeout-minutes: 60 at the job level as a hard backstop - Wrap each SDE invocation with and pass --gtest_output=xml so the GTest XML report can be inspected - If timeout fires (rc=124) but the XML confirms failures="0", the step is treated as success — tests passed, SDE merely hung on teardown --- .github/workflows/build-test.yml | 81 ++++++++++++++++++++------------ 1 file changed, 51 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 69b852d..09f3113 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -41,34 +41,55 @@ jobs: # working-directory: ./build # run: ./test_rmm - build-and-test-with-SDE: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Create Build Directory - run: mkdir build - - - name: Download and Unpack SDE - working-directory: ./build - run: | - wget https://downloadmirror.intel.com/859732/sde-external-9.58.0-2025-06-16-lin.tar.xz - tar xf sde-external-9.58.0-2025-06-16-lin.tar.xz - - - name: Configure CMake - working-directory: ./build - run: cmake -DENABLE_ADDRESS_SANITIZER=ON -DMARCH=icelake-client -DHAVE_STD_REGEX=ON .. - - - name: Build Project - working-directory: ./build - run: make -j - - - name: Run Unittests - working-directory: ./build - run: sde-external-9.58.0-2025-06-16-lin/sde64 -icl -emu-xinuse 0 -- ./unittests - - - name: Run LOUDS Tree Tests - working-directory: ./build - run: sde-external-9.58.0-2025-06-16-lin/sde64 -icl -emu-xinuse 0 -- ./louds_tree_tests + build-and-test-with-SDE: + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Directory + run: mkdir build + + - name: Download and Unpack SDE + working-directory: ./build + run: | + wget https://downloadmirror.intel.com/859732/sde-external-9.58.0-2025-06-16-lin.tar.xz + tar xf sde-external-9.58.0-2025-06-16-lin.tar.xz + + - name: Configure CMake + working-directory: ./build + run: cmake -DENABLE_ADDRESS_SANITIZER=ON -DMARCH=icelake-client -DHAVE_STD_REGEX=ON .. + + - name: Build Project + working-directory: ./build + run: make -j + + - name: Run Unittests + working-directory: ./build + # SDE can hang during process teardown (static/ASan destructors) after all + # tests complete successfully. Use `timeout` to prevent the job from blocking + # indefinitely. GTest XML output is used to verify tests passed before + # treating a teardown timeout as success. + run: | + timeout 1800 sde-external-9.58.0-2025-06-16-lin/sde64 -icl -emu-xinuse 0 -- \ + ./unittests --gtest_output=xml:unittests_results.xml + rc=$? + if [ $rc -eq 124 ] && grep -q 'failures="0"' unittests_results.xml 2>/dev/null; then + echo "SDE timed out during process teardown (known SDE/ASan issue) - all tests passed, treating as success" + exit 0 + fi + exit $rc + + - name: Run LOUDS Tree Tests + working-directory: ./build + run: | + timeout 1800 sde-external-9.58.0-2025-06-16-lin/sde64 -icl -emu-xinuse 0 -- \ + ./louds_tree_tests --gtest_output=xml:louds_results.xml + rc=$? + if [ $rc -eq 124 ] && grep -q 'failures="0"' louds_results.xml 2>/dev/null; then + echo "SDE timed out during process teardown (known SDE/ASan issue) - all tests passed, treating as success" + exit 0 + fi + exit $rc