From 67637e526bdb275f0a1b6669cf7327a7a00ae7d1 Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Mon, 29 Jul 2019 14:45:11 +0200 Subject: [PATCH] Kill all apt-get processes before package update As they may be holding on to the `/var/lib/apt/lists/lock` file if there is currently a networking issue that is causing the spinup step to keep the update process alive. Ref: https://support.circleci.com/hc/en-us/articles/360021256633-Apt-Get-Update-Is-Slow-Or-Locked --- .circleci/config.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0bbb1ff91..291efdabe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,8 +21,15 @@ jobs: mkdir -p "$HOME/go/bin" go version - run: - name: Update packages and Start Memcached + name: Update packages and start Memcached + no_output_timeout: 10m command: | + # Kill any apt-get processes that may be hanging due to + # networking related issues, and thus holding on to + # `/var/lib/apt/lists/lock`. + # https://support.circleci.com/hc/en-us/articles/360021256633-Apt-Get-Update-Is-Slow-Or-Locked + sudo killall apt-get + sudo apt-get update sudo apt-get install -y git rng-tools memcached git version