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