Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sudo apt-get update stuck #11382

Closed
2 of 16 tasks
adamgyulavari opened this issue Jan 14, 2025 · 2 comments
Closed
2 of 16 tasks

sudo apt-get update stuck #11382

adamgyulavari opened this issue Jan 14, 2025 · 2 comments

Comments

@adamgyulavari
Copy link

adamgyulavari commented Jan 14, 2025

Description

Sometimes sudo apt-get update hangs and hence any workflow using it will run forever.
(Since we're using it in composite actions as well, we cannot just put a timeout-minutes on the step as that is not supported in actions)

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Image version and build link

Image: ubuntu-22.04
Version: 20250105.1.0
Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20250105.1/images/ubuntu/Ubuntu2204-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20250105.1

Is it regression?

It has been happening before, but cannot pinpoint a single version

Expected behavior

sudo apt-get update should run on the runners.

Actual behavior

It gets stuck:

Run sudo apt-get update
  sudo apt-get update
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.11.9/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib
    pip_cache_directory: /home/runner/.cache/pip
    pip_version: 24.3.1
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [142 B]
Hit:6 https://packages.microsoft.com/repos/azure-cli jammy InRelease
Get:7 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease [3632 B]
Get:8 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main arm64 Packages [41.8 kB]
Get:9 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main armhf Packages [16.4 kB]
Get:10 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages [[17](https://github.com/polygence/boshi/actions/runs/12746487392/job/35523197988#step:6:18)4 kB]
Ign:2 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Ign:3 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:4 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:5 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease
Ign:2 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Ign:3 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:4 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:5 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease
Ign:2 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Ign:3 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:4 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:5 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease
Ign:2 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Ign:3 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:4 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:5 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Ign:11 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
Ign:12 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en
Ign:13 http://azure.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages
Ign:14 http://azure.archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en
Ign:15 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
Ign:16 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [1[27](https://github.com/polygence/boshi/actions/runs/12746487392/job/35523197988#step:6:28) kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-security InRelease [129 kB]

Repro steps

Since it is not happening all the time, not exactly sure how to reproduce. I have successful runs on the same image version:

  Image: ubuntu-22.04
  Version: 20250105.1.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20250105.1/images/ubuntu/Ubuntu2204-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20250105.1

composite action: .github/actions/postgres-client/action.yml

name: Install postgres-client
description: Install postgres-client

inputs:
  POSTGRES_VERSION:
    description: POSTGRES_VERSION
    default: 16

runs:
  using: composite
  steps:
    - run: sudo apt-get update
      shell: bash
      continue-on-error: true
    - run: sudo apt install -y postgresql-common
      shell: bash
      # there are more steps, but the action gets stuck at the first step

Using it in workflow:

name: Run tests
on:
  workflow_dispatch:

jobs:

  build:
    runs-on: ubuntu-latest-large
    services:
      postgres:
        image: pgvector/pgvector:0.7.2-pg16
        env:
          POSTGRES_DB: 'development'
          POSTGRES_USER: 'admin'
          POSTGRES_PASSWORD: 'admin'
        options: >-
          --mount type=tmpfs,destination=/var/lib/postgresql/data
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 5432:5432
    steps:
      - uses: actions/checkout@v4
      - uses: ./.github/actions/postgres-client
@Prabhatkumar59
Copy link
Contributor

Hi @adamgyulavari - Thank you for bringing this issue to our attention. We will look into this issue and will update you after investigating.

@kishorekumar-anchala
Copy link
Contributor

Duplicate of #11347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants