Skip to content

ci: Upgrade ubuntu:25.04 for the PowerPC64LE test #990

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

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jul 24, 2025

Update the last remaining image.

For this to work, the QEMU_CPU=POWER8 configuration needed to be
dropped to avoid a new SIGILL. Doing some debugging locally, the crash
comes from an extswsli (per powerpc:common64 in gdb-multiarch) in
the ld64.so available with PowerPC, which qemu rejects when set to
power8. Testing a build with +crt-static hits the same issue at a
maddld in __libc_start_main_impl.

Rust isn't needed to reproduce this:

$ cat a.c
#include <stdio.h>

int main() {
        printf("Hello, world!\n");
}
$ powerpc64le-linux-gnu-gcc a.c
$ QEMU_CPU=power8 QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu/ ./a.out
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction

So the cross toolchain provided by Debian must have a power9 baseline
rather than rustc's power8. Alternatively, qemu may be incorrectly
rejecting these instructions (I can't find a source on whether or not
they should be available for power8). Testing instead with the -musl
toolchain and ppc linker from musl.cc works correctly.

In any case, things work with the default qemu config so it seems fine
to drop. The env was originally added in 5d164a4 ("fix the
powerpc64le target") but whatever the problem was there appears to no
longer be relevant.

@tgross35 tgross35 force-pushed the ppc-dockergs branch 3 times, most recently from 4ed10a5 to 33bc694 Compare July 24, 2025 10:51
Update the last remaining image.

For this to work, the `QEMU_CPU=POWER8` configuration needed to be
dropped to avoid a new SIGILL. Doing some debugging locally, the crash
comes from an `extswsli` (per `powerpc:common64` in gdb-multiarch) in
the `ld64.so` available with PowerPC, which qemu rejects when set to
power8. Testing a build with `+crt-static` hits the same issue at a
`maddld` in `__libc_start_main_impl`.

Rust isn't needed to reproduce this:

    $ cat a.c
    #include <stdio.h>

    int main() {
            printf("Hello, world!\n");
    }
    $ powerpc64le-linux-gnu-gcc a.c
    $ QEMU_CPU=power8 QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu/ ./a.out
    qemu: uncaught target signal 4 (Illegal instruction) - core dumped
    Illegal instruction

So the cross toolchain provided by Debian must have a power9 baseline
rather than rustc's power8. Alternatively, qemu may be incorrectly
rejecting these instructions (I can't find a source on whether or not
they should be available for power8). Testing instead with the `-musl`
toolchain and ppc linker from musl.cc works correctly.

In any case, things work with the default qemu config so it seems fine
to drop. The env was originally added in 5d164a4 ("fix the
powerpc64le target") but whatever the problem was there appears to no
longer be relevant.
@tgross35 tgross35 merged commit 3fa5a8c into rust-lang:master Jul 24, 2025
38 checks passed
@tgross35 tgross35 deleted the ppc-dockergs branch July 24, 2025 11:07
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 this pull request may close these issues.

1 participant