From 6ba4ad5560c8ade34038a1fc059e4c19f8b06293 Mon Sep 17 00:00:00 2001 From: Gustavo Trott Date: Fri, 25 Oct 2024 17:29:00 -0300 Subject: [PATCH] print running processes in apt and dpkg --- .github/workflows/automated-tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index 247444db73..028799c8ec 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -296,6 +296,10 @@ jobs: fi echo "Stop any ongoing processes related to apt-get or dpkg that might be stuck" # Use -q to suppress "no process found" messages + # Kill any apt-get or dpkg processes that might be hanging + for process in apt-get dpkg; do + pkill -9 "$process" 2>/dev/null || true + done killall -q apt-get || true killall -q dpkg || true @@ -313,6 +317,9 @@ jobs: apt-get clean apt-get autoremove + echo "Identify if there is some process still locking" + ps aux | grep -E 'dpkg|apt' + RETRY_COUNT=$((RETRY_COUNT + 1)) done