Skip to content

Update the package lists before installing Valgrind - #102

Merged
Watson1978 merged 2 commits into
socketry:mainfrom
Watson1978:ci-update-apt-before-valgrind
Jul 31, 2026
Merged

Update the package lists before installing Valgrind#102
Watson1978 merged 2 commits into
socketry:mainfrom
Watson1978:ci-update-apt-before-valgrind

Conversation

@Watson1978

Copy link
Copy Markdown
Collaborator

The Memcheck workflow installs Valgrind without refreshing apt's package lists first, so libc6-dbg (a recommended dependency of valgrind) is resolved from the runner image's cached index. Once Ubuntu publishes a new point release of glibc, the cached version is no longer on the mirror and the step fails:

Ign:9 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libc6-dbg amd64 2.39-0ubuntu8.7
Err:9 mirror+file:/etc/apt/apt-mirrors.txt noble-updates/main amd64 libc6-dbg amd64 2.39-0ubuntu8.7
  404  Not Found
E: Failed to fetch .../libc6-dbg_2.39-0ubuntu8.7_amd64.deb  404  Not Found

This is currently breaking every job in the matrix, on any push or pull request — for example https://github.com/socketry/cool.io/actions/runs/30611416336.

Running apt-get update first makes the install resolve against what the mirror actually has. --no-install-recommends would also avoid the failure by skipping libc6-dbg and gdb entirely, but glibc's debug symbols are worth keeping for Valgrind's stack traces.

🤖 Generated with Claude Code

Watson1978 and others added 2 commits July 31, 2026 16:00
DNSResolver built every query with the constant transaction ID 2 and
authenticated the reply with nothing but `id == 2`, while on_readable read
the datagram off a never-connected UDPSocket with
`recvfrom_nonblock(...).first`, discarding the sender. Any host that could
land a UDP packet on the resolver's ephemeral port could therefore choose
the address a hostname resolved to, and Coolio::TCPSocket.connect would
open the application's session to it.

Give each query a random 16-bit transaction ID from SecureRandom, and
accept a datagram only when it carries that ID and arrives from port 53 of
an address this query was actually sent to. The check runs before the
response is parsed. A datagram that fails it is ignored rather than turned
into a failure, so a single spoofed packet can no longer deny the
resolution either; the existing TIMEOUT/RETRIES budget still bounds the
wait.

Nameservers may be given as hostnames, so send_request resolves the
nameserver to a numeric address and remembers it, caching only successful
lookups. The constructor keeps accepting whatever it accepted before, an
unresolvable nameserver still surfaces as SocketError from the same place,
and one that is only transiently unresolvable recovers on the next retry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Memcheck workflow installs Valgrind without refreshing apt's package
lists first, so it resolves libc6-dbg (a recommended dependency of
valgrind) from the runner image's cached index. When Ubuntu publishes a
new point release of glibc, the cached version is gone from the mirror and
every job in the matrix fails:

  Err:9 ... noble-updates/main amd64 libc6-dbg amd64 2.39-0ubuntu8.7
    404  Not Found
  E: Failed to fetch .../libc6-dbg_2.39-0ubuntu8.7_amd64.deb

Run apt-get update first so the install resolves against what the mirror
actually has.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Watson1978
Watson1978 merged commit fa7ba96 into socketry:main Jul 31, 2026
14 checks passed
@Watson1978
Watson1978 deleted the ci-update-apt-before-valgrind branch July 31, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant