Skip to content

qemu-aarch64 nondeterministic crashes #188

Closed

Description

@lts-rad

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

wanted to report that i recently switched a build pipeline running on ubuntu to the upstream ubuntu qemu-user-static. the upstream ubuntu qemu is further along on version number than this action btw, so that this saves people time.

we were witnessing a problem where qemu-aarch64 installed by this action would crash nondeterministically on github's x86-64 runners as well as on self-hosted runners using 12th gen and 13th gen intel systems. we dont have time to triage and diagnose the issue, because it's non deterministic its not clear what the underlying cause is.

Expected behaviour

qemu-aarch64 doesnt crash at random

Actual behaviour

qemu-aarch64 crashed at random

Repository URL

No response

Workflow run URL

No response

YAML workflow

n/a

Workflow logs

No response

BuildKit logs


Additional info

No response

Activity

  1. smoke commented on Jan 20, 2025

    @smoke

    We have a Ruby app depends on quite a bunch of "native" extensions packages - that are packages having to be built through gcc

    Targeting linux/amd64,linux/arm64

    we have consistent Gem::Ext::BuildError: ERROR: Failed to build gem native extension. caused by gcc: internal compiler error: Segmentation fault signal terminated program cc1
    but that will affect anything built by gcc or similar (nodejs packages, etc.).

    Similar thing happened with a Go project needed some stuff built with gcc.

    I was suspecting this issue, but it turned out another action int128/[email protected] is rogue, I am still puzzled how it could brake stuff in such way int128/create-ecr-repository-action@v1.342.0...v1.348.0

    UPDATE: Still investigating, no clarity ... Issue is happening sporadically, combined with caching it is really difficult to get a good grip on what is the cause and what is a fix.

  2. lts-rad commented on Jan 20, 2025

    @lts-rad
    Author

    the qemu that is shipped by this action seemed broken the last time i used it. i recommend trying to use your base images qemu instead.

  3. smoke commented on Jan 21, 2025

    @smoke

    Indeed there are some very strange and sporadic qemu@v7 issues in combination with some other unidentified changes / inconsistencies (buildx, gh-actions, runners or whatever).
    I have managed to reproduce locally.

    Qemu v7 used to work well for quite some time but not anymore, since ~1-2 weeks it started resulting in sporadic but stubborn segmentation faults in gcc and other executables.

    Having build cache lead this to be very difficult to identify and fix, so I am still not sure how stable the fix is, but
    what seems to fix it so far is using qemu@v8 through:

          uses: docker/[email protected]
          with:
            image: tonistiigi/binfmt:qemu-v8.1.5
            platforms: ${{ inputs.platforms }}
    
  4. crazy-max commented on Jan 21, 2025

    @crazy-max
    Member
  5. smoke commented on Jan 21, 2025

    @smoke

    there is related ticket already tonistiigi/binfmt#215

  6. mayeut commented on Jan 25, 2025

    @mayeut

    This does not only affect aarch64 running on x86_64 but also at least s390x & ppc64le.
    All repos I have seen using setup-qemu-action with ubuntu-latest/ubuntu-24.04 started failing with the update of the runner this week.

    @crazy-max, I understand the issue is upstream so not asking to re-open the issue but could it be at least pinned in order for users of the action to easily find the issue and workaround while waiting for a fix upstream ?

    For aarch64, another solution is to switch from emulated to native with the availability of ubuntu-24.04-arm runners: https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

  7. lts-rad commented on Jan 25, 2025

    @lts-rad
    Author

    @mayeut or anyone else would you have an example for how to use a runner to handle an architecture specific part of a docker bake?

  8. added a commit that references this issue on Jan 25, 2025
  9. 3 remaining items

  10. added a commit that references this issue on Feb 8, 2025
  11. bettio commented on Feb 10, 2025

    @bettio

    I'm sorry for this comment on a closed issue. QEMU v8.1.5 seem to not address the problem with arm64v8, at least for the run I did. It keeps segfaulting when running some commands.
    At the end reverting to ubuntu 22.04 fixed the issue, but it doesn't sound like a long term solution.

  12. added a commit that references this issue on Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions