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

qemu_riscv32/qemu_virt_riscv32/smp sample.rust/bench.plain fail #86310

Open
fabiobaltieri opened this issue Feb 25, 2025 · 6 comments
Open

qemu_riscv32/qemu_virt_riscv32/smp sample.rust/bench.plain fail #86310

fabiobaltieri opened this issue Feb 25, 2025 · 6 comments
Assignees
Labels
area: Rust Issues affecting Rust support in Zephyr bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@fabiobaltieri
Copy link
Member

Describe the bug
Hi, bumped into a couple issue with bench.plain tests in CI on main: https://github.com/zephyrproject-rtos/zephyr/runs/37777088940

Then I tried to reproduce it locally but I hit one more issues and can't even build it at all

95    |                 zephyr_sys::k_str_out(self.buf.as_mut_ptr() as *mut i8, self.count);
      |                 --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut u8`, found `*mut i8`

confirmed by other users after updating the compiler.

@d3zd3z could you look into these?

To Reproduce
west build -p -b qemu_cortex_m3 ../modules/lang/rust/samples/bench

Expected behavior
build and run

Impact
CI is sad. Rust users are also sad I guess.

Environment (please complete the following information):
Linux, Zephyr SDK, a718b84

$ rustup --version
rustup 1.26.0 (2024-08-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.85.0 (4d91de4e4 2025-02-17)`
@fabiobaltieri fabiobaltieri added the bug The issue is a bug, or the PR is fixing a bug label Feb 25, 2025
@fabiobaltieri
Copy link
Member Author

cc @kartben @pdgendt

@fabiobaltieri fabiobaltieri added priority: high High impact/importance bug Release Blocker Use this label for justified release blockers area: Rust Issues affecting Rust support in Zephyr labels Feb 25, 2025
@kartben
Copy link
Collaborator

kartben commented Feb 25, 2025

It builds fine for me with rustc 1.84.0 but I can confirm the deadlock/timeout on the smp target, while the non-SMP variant seem to run the test just fine.

@pdgendt
Copy link
Collaborator

pdgendt commented Feb 25, 2025

I think it might be related to rust-lang/rust#132975 as mentioned in the 1.85.0 release notes:

Make core::ffi::c_char signedness more closely match that of the platform-default char

This changed c_char from an i8 to u8 or vice versa on many Tier 2 and 3 targets (mostly Arm and RISC-V embedded targets). The new definition may result in compilation failures but fixes compatibility issues with C.

The libc crate matches this change as of its 0.2.169 release.

@fabiobaltieri
Copy link
Member Author

I think it might be related to rust-lang/rust#132975 as mentioned in the 1.85.0 release notes:

How's that going to work in CI? I'd imagine that right now we are pinned to whatever version was there when the image was generated but then if it gets regenerated with the same config it would fall apart.

@pdgendt
Copy link
Collaborator

pdgendt commented Feb 25, 2025

How's that going to work in CI? I'd imagine that right now we are pinned to whatever version was there when the image was generated but then if it gets regenerated with the same config it would fall apart.

It depends on the rust version on the ubuntu image.

@fabiobaltieri fabiobaltieri added priority: medium Medium impact/importance bug and removed priority: high High impact/importance bug Release Blocker Use this label for justified release blockers labels Feb 25, 2025
@fabiobaltieri
Copy link
Member Author

@d3zd3z should this not run on the SMP targets? Sounds like that combination is not stable, probably a better idea to pick some explicit targets and that's it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Rust Issues affecting Rust support in Zephyr bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants