DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.67k stars 562 forks source link

ci-riscv64 failing due to missing Debian packages #6399

Closed abhinav92003 closed 1 year ago

abhinav92003 commented 1 year ago

The RISCV64 CI workflow seems to be failing, since yesterday. E.g. https://github.com/DynamoRIO/dynamorio/actions/runs/6665059337/job/18117500635?pr=6398

The error:

E: Unable to locate package libunwind8:riscv64
E: Unable to locate package libunwind-dev:riscv64
E: Unable to locate package liblzma5:riscv64
E: Unable to locate package zlib1g:riscv64
E: Unable to locate package zlib1g-dev:riscv64
E: Unable to locate package libsnappy1v5:riscv64
E: Unable to locate package libsnappy-dev:riscv64
E: Unable to locate package liblz4-1:riscv64
E: Unable to locate package liblz4-dev:riscv64

This is blocking all recent PRs: #6398, #6395, #6381

abhinav92003 commented 1 year ago

I used tmate to ssh into a Github Actions runner. I think the root-cause is that

sudo add-apt-repository 'deb [trusted=yes arch=riscv64] http://deb.debian.org/debian-ports sid main'

is failing with

N: Skipping acquire of configured file 'main/binary-riscv/Packages' as repository 'http://deb.debian.org/debian-ports sid InRelease' doesn't support architecture 'riscv64'
abhinav92003 commented 1 year ago

I don't see riscv64 listed on https://www.ports.debian.org/archive at all. Since our CI was working fine till yesterday, I assume it must've been supported! But I do see risc-v at https://deb.debian.org/debian-ports/.

On a passing run from a few days ago1:

NEEDRESTART-KSTA: 1
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [142 B]
Hit:2 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:5 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:6 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
Get:7 http://deb.debian.org/debian-ports sid InRelease [93.6 kB]
Hit:8 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
Ign:7 http://deb.debian.org/debian-ports sid InRelease 
Get:9 http://deb.debian.org/debian-ports sid/main riscv64 Packages [16.1 MB]  // This is missing in runs now.
Fetched 16.2 MB in 5s (3118 kB/s)

I found the following on https://www.ports.debian.org/:

News
Thu, 26 Oct 2023 22:28:36 +0200
The riscv64 architecture has been [added to the official archive](https://lists.debian.org/debian-riscv/2023/07/msg00053.html) a few months ago. Given most of the packages have now been rebuilt, it has just been removed from the debian-ports archive.
abhinav92003 commented 1 year ago

Ok I got it working by modifying the repository in the add-apt-repository command in our risc-v CI config. Will send a PR.