Skip to content

Commit

Permalink
Add timeout for dpkg frontend lock (dotnet#100653)
Browse files Browse the repository at this point in the history
* Add wait for the bpkg lock to be unlocked, up to 2 minutes.
* Add a printout for the file that is holding the dpkg lock-frontend so we can further investigate in the future.
* Adding a printout that prints that we are still waiting to make when we continued more clear.
  • Loading branch information
LoopedBard3 authored and matouskozak committed Apr 30, 2024
1 parent 1132f38 commit 31ff73e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eng/pipelines/coreclr/templates/run-performance-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ jobs:
export ORIGPYPATH=$PYTHONPATH
export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;
echo "** Installing prerequistes **";
echo "** Waiting for dpkg to unlock (up to 2 minutes) **" &&
timeout 2m bash -c 'while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do if [ -z "$printed" ]; then echo "Waiting for dpkg lock to be released... Lock is held by: $(ps -o cmd= -p $(sudo fuser /var/lib/dpkg/lock-frontend))"; printed=1; fi; echo "Waiting 5 seconds to check again"; sleep 5; done;' &&
sudo apt-get -y install python3-pip &&
python3 -m pip install --user -U pip &&
sudo apt-get -y install python3-venv &&
Expand Down

0 comments on commit 31ff73e

Please sign in to comment.