Skip to content

Commit 9088f60

Browse files
committed
Add full-run probe with gdb watchdog to capture hang stack
All subset probes (Driver+Translation+Reconstruct at 400 tests, Metadata+Translation+Reconstruct, PDO_API+Translation+Reconstruct) complete with testReconstructTable passing. Only the full main run with Translation_Tests unskipped triggers the 10-min hang. Add a reproduction probe that runs the main filter with Translation unskipped, with a watchdog that attaches gdb at 150s (before the 180s timeout) to dump thread backtraces of the hanging PHP process.
1 parent 9eee5c4 commit 9088f60

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/phpunit-tests-turso.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,43 @@ jobs:
968968
--filter '^(WP_PDO_MySQL_On_SQLite_PDO_API_Tests|WP_SQLite_Driver_Translation_Tests|WP_SQLite_Information_Schema_Reconstructor_Tests::testReconstructTable$)'
969969
echo "PDO_API+Translation+reconstruct exit: $?"
970970
971+
- name: Probe full main run with Translation unskipped + gdb watchdog
972+
continue-on-error: true
973+
env:
974+
LD_PRELOAD: ${{ steps.preload.outputs.value }}
975+
working-directory: packages/mysql-on-sqlite
976+
# Reproduce the 4c4f491 main-run state (Translation_Tests unskipped).
977+
# Previous runs hang here at testReconstructTable for 10 min; install a
978+
# watchdog that snapshots the PHP process with gdb before killing it.
979+
run: |
980+
set +e
981+
skip_regex='^(?!WP_MySQL_Server_Suite_).+'
982+
983+
# Watchdog: after 150s, grab a backtrace of the hanging PHP.
984+
(
985+
sleep 150
986+
PHP_PID=$(pgrep -f 'phpunit.*--filter' | head -1)
987+
if [ -n "$PHP_PID" ]; then
988+
echo "=== watchdog: attaching gdb to php pid $PHP_PID ==="
989+
sudo gdb -p "$PHP_PID" -batch \
990+
-ex 'set pagination off' \
991+
-ex 'info threads' \
992+
-ex 'thread apply all bt 40' \
993+
2>&1 | head -400
994+
echo "=== watchdog: done ==="
995+
else
996+
echo "=== watchdog: no php pid found ==="
997+
fi
998+
) &
999+
WATCHDOG=$!
1000+
1001+
timeout --kill-after=10 180 \
1002+
php ./vendor/bin/phpunit -c ./phpunit.xml.dist --debug \
1003+
--filter "$skip_regex" 2>&1 | tail -80
1004+
echo "full-main+Translation exit: $?"
1005+
1006+
wait "$WATCHDOG" 2>/dev/null
1007+
9711008
- name: Run PHPUnit tests against Turso DB
9721009
env:
9731010
LD_PRELOAD: ${{ steps.preload.outputs.value }}

0 commit comments

Comments
 (0)