ITADN

otelcol-contrib fails on ARM runners

#3462ClosedVlaaaaaaad 创建于 2026-05-18
bug
V
Vlaaaaaaadcommented
**TL;DR**: `otelcol-contrib: command not found` error on ARM runners Hey, It looks like there's a small ARM gap that breaks Thoth on `ubuntu-24.04-arm` runners. On those runners `arch` returns `aarch64` but the OpenTelemetry Collector release assets use `arm64` in their filenames (e.g. `otelcol-contrib_0.152.0_linux_arm64.deb`). `actions/instrument/job/inject_and_init.sh` only normalises `x86_64 -> amd64`: ```bash grep "$(arch | sed 's/x86_64/amd64/g')" ``` Because `aarch64` is not mapped to `arm64`, the `grep` finds no matching asset. The pipeline still creates an empty file at `/var/cache/apt/archives/otelcol-contrib.deb` via `tee`, which then causes: ``` dpkg-deb: error: unexpected end of file in archive magic version number ``` `otelcol-contrib` is never installed, and the instrumentation eventually fails with: ``` line 6: otelcol-contrib: command not found ``` This is an **evil bug** as the action runs successfully but no telemetry data is sent! It took me a while to figure it out! ### LLM-proposed fix I temporarily moved my jobs to non-ARM runners but allegedly there's an easy fix: align the arch mapping in `inject_and_init.sh` with the mapping already used everywhere else in this repo (`INSTALL.sh`, `actions/instrument/shared/install.sh`, `.github/workflows/build.yml`, `.github/workflows/test_shell.yml`): ```bash grep "$(arch | sed s/x86_64/amd64/g | sed s/aarch64/arm64/g | sed 's/le$/el/g')" ``` I did not open a PR with the fix as I did not have the bandwidth to properly investigate and test the fix.
关闭于 2026-05-23 6 条评论