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

[NO-TICKET] Fix stale apt cache in memory leaks CI test #3868

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Aug 27, 2024

What does this PR do?

This PR adds an extra apt update step before trying to install valgrind on the memory leaks CI test.

Motivation:

I noticed
this CI run was failing with

Run sudo apt install -y valgrind && valgrind --version

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  gdb libbabeltrace1 libc6-dbg libdebuginfod-common libdebuginfod1t64 libipt2
  libsource-highlight-common libsource-highlight4t64
Suggested packages:
  gdb-doc gdbserver valgrind-dbg valgrind-mpi kcachegrind alleyoop valkyrie
The following NEW packages will be installed:
  gdb libbabeltrace1 libc6-dbg libdebuginfod-common libdebuginfod1t64 libipt2
  libsource-highlight-common libsource-highlight4t64 valgrind
0 upgraded, 9 newly installed, 0 to remove and 13 not upgraded.
Need to get 26.9 MB of archives.
After this operation, 105 MB of additional disk space will be used.
Get:1 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libdebuginfod-common all 0.190-1.1build4 [14.2 kB]
Get:2 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libbabeltrace1 amd64 1.5.11-3build3 [164 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libdebuginfod1t64 amd64 0.190-1.1build4 [17.1 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libipt2 amd64 2.0.6-1build1 [45.7 kB]
Get:5 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libsource-highlight-common all 3.1.9-4.3build1 [64.2 kB]
Get:6 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libsource-highlight4t64 amd64 3.1.9-4.3build1 [258 kB]
Get:7 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 gdb amd64 15.0.50.20240403-0ubuntu1 [4010 kB]
Ign:8 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libc6-dbg amd64 2.39-0ubuntu8.2
Get:9 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 valgrind amd64 1:3.22.0-0ubuntu3 [14.9 MB]
Err:8 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libc6-dbg amd64 2.39-0ubuntu8.2
  404  Not Found [IP: 20.106.104.242 80]
Fetched 19.5 MB in 2s (10.5 MB/s)
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-dbg_2.39-0ubuntu8.2_amd64.deb  404  Not Found [IP: 20.106.104.242 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I suspect what happened here is that there's a newer version of this package on the mirror, and the old one was removed.

Additional Notes:

N/A

How to test the change?

Validate that CI passes again.

**What does this PR do?**

This PR adds an extra `apt update` step before trying to install
valgrind on the memory leaks CI test.

**Motivation:**

I noticed
[this](https://github.com/DataDog/dd-trace-rb/actions/runs/10579363384/job/29321151830)
CI run was failing with

```
Run sudo apt install -y valgrind && valgrind --version

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  gdb libbabeltrace1 libc6-dbg libdebuginfod-common libdebuginfod1t64 libipt2
  libsource-highlight-common libsource-highlight4t64
Suggested packages:
  gdb-doc gdbserver valgrind-dbg valgrind-mpi kcachegrind alleyoop valkyrie
The following NEW packages will be installed:
  gdb libbabeltrace1 libc6-dbg libdebuginfod-common libdebuginfod1t64 libipt2
  libsource-highlight-common libsource-highlight4t64 valgrind
0 upgraded, 9 newly installed, 0 to remove and 13 not upgraded.
Need to get 26.9 MB of archives.
After this operation, 105 MB of additional disk space will be used.
Get:1 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libdebuginfod-common all 0.190-1.1build4 [14.2 kB]
Get:2 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libbabeltrace1 amd64 1.5.11-3build3 [164 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libdebuginfod1t64 amd64 0.190-1.1build4 [17.1 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libipt2 amd64 2.0.6-1build1 [45.7 kB]
Get:5 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libsource-highlight-common all 3.1.9-4.3build1 [64.2 kB]
Get:6 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 libsource-highlight4t64 amd64 3.1.9-4.3build1 [258 kB]
Get:7 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 gdb amd64 15.0.50.20240403-0ubuntu1 [4010 kB]
Ign:8 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libc6-dbg amd64 2.39-0ubuntu8.2
Get:9 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 valgrind amd64 1:3.22.0-0ubuntu3 [14.9 MB]
Err:8 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libc6-dbg amd64 2.39-0ubuntu8.2
  404  Not Found [IP: 20.106.104.242 80]
Fetched 19.5 MB in 2s (10.5 MB/s)
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-dbg_2.39-0ubuntu8.2_amd64.deb  404  Not Found [IP: 20.106.104.242 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
```

I suspect what happened here is that there's a newer version of this
package on the mirror, and the old one was removed.

**Additional Notes:**

N/A

**How to test the change?**

Validate that CI passes again.
@ivoanjo ivoanjo requested a review from a team as a code owner August 27, 2024 16:36
@ivoanjo ivoanjo added the dev/ci Involves CircleCI, GitHub Actions, or GitLab label Aug 27, 2024
@github-actions github-actions bot added dev/github Github repository maintenance and automation and removed dev/ci Involves CircleCI, GitHub Actions, or GitLab labels Aug 27, 2024
@ivoanjo ivoanjo added dev/ci Involves CircleCI, GitHub Actions, or GitLab profiling Involves Datadog profiling labels Aug 27, 2024
@ivoanjo ivoanjo enabled auto-merge August 27, 2024 16:38
@ivoanjo ivoanjo merged commit 0c87de3 into master Aug 27, 2024
184 of 185 checks passed
@ivoanjo ivoanjo deleted the ivoanjo/fix-valgrind-install branch August 27, 2024 17:00
@github-actions github-actions bot added this to the 2.4.0 milestone Aug 27, 2024
@ivoanjo ivoanjo added dev/internal Other internal work that does not need to be included in the changelog dev/testing Involves testing processes (e.g. RSpec) and removed dev/internal Other internal work that does not need to be included in the changelog labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/ci Involves CircleCI, GitHub Actions, or GitLab dev/github Github repository maintenance and automation dev/testing Involves testing processes (e.g. RSpec) profiling Involves Datadog profiling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants