Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random segfault for QEMU builds in GitHub Actions #2257

Open
Rot127 opened this issue Jan 28, 2025 · 4 comments · Fixed by nextmv-io/nextroute#86
Open

Random segfault for QEMU builds in GitHub Actions #2257

Rot127 opened this issue Jan 28, 2025 · 4 comments · Fixed by nextmv-io/nextroute#86

Comments

@Rot127
Copy link

Rot127 commented Jan 28, 2025

Description

This is not so much an issue of cibuildwheel (I think), except you should be aware of it.

GCC builds segfault on the AArch64 musllinux 1.2, manylinux 2014 and manylinux 2.28.

I couldn't pin-point a possible GCC issue to it. But it is odd that it appears in a stable version.
Maybe: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118583
Haven't tested it yet though.

Feel free to close this if you see it as out of scope. But I wanted to drop it here in case people search for it in this context. Or others already found a solution.

Runs:

manylinux 2.28
https://github.com/capstone-engine/capstone/actions/runs/13012237284/job/36292511727?pr=2614

manylinux 2014
https://github.com/capstone-engine/capstone/actions/runs/13011576391/job/36290786445?pr=2614

musllinux 1.2
https://github.com/capstone-engine/capstone/actions/runs/13011576391/job/36290786852?pr=2614

Build log

No response

CI config

No response

@henryiii
Copy link
Contributor

It's a bug in emulation. You can either pin the QEMU version, or better yet, use ubuntu-24.04-arm or ubuntu-22.04-arm instead of emulation, which is ~10x faster too.

See #2256. I'll copy @joerick's answer here for posterity:

I believe you're hitting a bug around setup-qemu-action. I didn't see it myself but @mayeut just pushed this fix to our repo-

4538497

The referenced issues are docker/setup-qemu-action#188 and tonistiigi/binfmt#215. @mayeut's workaround is the following in a github workflow:

    - name: Set up QEMU
      if: runner.os == 'Linux'
      uses: docker/setup-qemu-action@v3
      with:
        # This should be temporary
        # xref https://github.com/docker/setup-qemu-action/issues/188
        # xref https://github.com/tonistiigi/binfmt/issues/215
        image: tonistiigi/binfmt:qemu-v8.1.5

@nightlark
Copy link

nightlark commented Jan 31, 2025

I missed it initially, but buried in the binfmt issue that was linked above there is discussion about the cause being related to building qemu with --disable-pie and aslr with the kernel the GHA runners ship (and qemu 8.1+ having a patch related to the segfault): tonistiigi/binfmt#215 (comment)

@e-dant
Copy link

e-dant commented Feb 2, 2025

Related? https://github.com/e-dant/watcher/actions/runs/13093964783/job/36534092020#step:4:511

Command ['which', 'python'] failed with code 139.

@mayeut
Copy link
Member

mayeut commented Feb 5, 2025

Related?

@e-dant, that's the same issue: random segfaults with QEMU.

@mayeut mayeut changed the title GCC segfault for AArch64 Linux builds Random segfault for QEMU builds in GitHub Actions Feb 5, 2025
bdraco added a commit to aio-libs/aiohttp that referenced this issue Feb 5, 2025
rogerbinns added a commit to rogerbinns/apsw that referenced this issue Feb 7, 2025
nosracd added a commit to nosracd/lcm that referenced this issue Feb 9, 2025
nosracd added a commit to nosracd/lcm that referenced this issue Feb 9, 2025
nosracd added a commit to lcm-proj/lcm that referenced this issue Feb 10, 2025
nedbat added a commit to nedbat/coveragepy that referenced this issue Feb 11, 2025
nedbat added a commit to nedbat/coveragepy that referenced this issue Feb 11, 2025
nedbat added a commit to nedbat/coveragepy that referenced this issue Feb 11, 2025
nedbat added a commit to nedbat/coveragepy that referenced this issue Feb 11, 2025
nedbat added a commit to nedbat/coveragepy that referenced this issue Feb 11, 2025
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 a pull request may close this issue.

5 participants