podman icon indicating copy to clipboard operation
podman copied to clipboard

Flake: macOS arm64 lima setup fails with "retrieved architecture x86_64 does not match target architecture arm64"

Open shrevid03 opened this issue 3 months ago • 3 comments

Issue Description

markdown

Description

The sys local rootless fedora-current / lima CI job intermittently fails on macos-15-arm64 runners with an architecture mismatch error during Lima VM setup. The failure occurs before any Podman tests can run, causing the Total Success aggregator job to fail and requiring maintainers to trigger re-runs manually.

Filing this as a CI flake report rather than a local reproducer — no podman version / podman info output applies since the failure happens before Podman itself is invoked in the job.

Reproducer

Observed in CI run #31171540579, job sys local rootless fedora-current / lima, on PR #29417.

The failure was resolved on re-run — a strong indicator this is a flake rather than a code regression.

Failing Output

Fatal error: retrieved architecture x86_64 does not match target architecture arm64 Error: PANIC: retrieved architecture x86_64 does not match target architecture arm64

The failure occurs during Lima VM provisioning, before Podman itself is invoked.

Environment

  • Runner: macos-15-arm64
  • Provider: Lima (macOS VM manager)
  • Target OS: fedora-current
  • Job: sys local rootless fedora-current / lima

Impact

  • Every PR touching code paths that trigger the mac-lima matrix is at risk of hitting this
  • The Total Success aggregator fails when this job fails, blocking merge signals
  • Maintainer time is spent re-running jobs to distinguish this flake from real failures
  • No searchable issue or PR currently references this error string, suggesting the flake is present but has been treated as noise rather than reported

Hypothesis on Root Cause

The error message indicates that a downloaded or cached Fedora cloud image is x86_64 when the runner is arm64. Three candidate root causes worth investigating:

  1. Image URL / architecture selection bug — the code choosing which cloud image to download may default to x86_64 under some conditions instead of detecting the runner's arch
  2. Cache reuse across architectures — a previously cached x86_64 image may be reused when the runner requests arm64, without an architecture check on cache lookup
  3. Environment/config drift — GOARCH, Lima's config, or an environment variable is being set to x86_64 in a code path that should honor the host arch

Investigating which of these is the actual cause requires reproducing locally on an arm64 Mac and inspecting the Lima setup logs earlier in the job (before the fatal error).

Categorization

This fits a configuration/environment mismatch flake category rather than an infrastructure blip, race condition, or network timeout. Distinguishing signals:

  • The error string is deterministic and specific — not a generic timeout or connection error
  • The failure occurs at setup time, not during test execution — no test flakiness patterns (retries, timing sensitivity) apply
  • The failure resolves on re-run — indicating state (cached image, env var) rather than code being the difference between runs

For an automated triage pipeline, this class of failure is high-signal: the error string is unique enough that a simple pattern match could categorize it correctly, and the "resolves on re-run" pattern is a strong indicator that the underlying state (not the code) needs attention.

Suggested Next Steps

  • Confirm reproducibility by scanning historical CI runs for the same error string
  • Instrument the Lima setup path to log the arch-detection decision and any cache-hit metadata
  • If confirmed as caching-related, add an arch check on cache lookup and invalidate cross-arch entries

Happy to help investigate further or contribute a fix if pointed in the right direction.

Steps to reproduce the issue

Steps to reproduce the issue 1. 2. 3.

Describe the results you received

Describe the results you received

Describe the results you expected

Describe the results you expected

podman info output

If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

shrevid03 avatar Aug 08 '26 12:08 shrevid03

can u assign this issue to me i will work and resolve it asap!

badal-coder avatar Aug 09 '26 10:08 badal-coder

That report seems to confuse two different things.

A normal CI flake, you should not need to worry about this at all as contributor, maintainers will handle that.

The other thing has nothing to do with CI, lima tests run on linux and are x86 only in CI so your LLM made this up, please follow our policy: https://github.com/podman-container-tools/community/blob/main/LLM_POLICY.md

If you do not understand the output there is no reason to submit that as issue.

Luap99 avatar Aug 10 '26 10:08 Luap99

Thanks for the correction and the pointer to the policy, @Luap99. You're right — I misread the setup. I'll only file things I've actually reproduced from now on. Apologies for the noise.

shrevid03 avatar Aug 10 '26 10:08 shrevid03