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

With Rust 1.73.0, some unit tests started to fail for mips-unknown-linux-musl target #333

Open
tatsuya6502 opened this issue Oct 11, 2023 · 7 comments
Labels
blocked Blocked by something

Comments

@tatsuya6502
Copy link
Member

Rust 1.73.0 has been released and some unit tests started to fail for 32-bit mips-unknown-linux-musl target.

Note that the CI is using QEMU's user space emulator, so emulation may not be accurate. However, as long as I can remember, these tests never failed with older versions of Rust.

https://github.com/moka-rs/moka/actions/runs/6436542687/job/17587394644

failures:

---- common::timer_wheel::tests::test_advance stdout ----
thread 'common::timer_wheel::tests::test_advance' panicked at src/common/timer_wheel.rs:667:22:
Expected an expired entry. Got Rescheduled(EntryInfo { key_hash: KeyHash { key: 1, hash: 1 }, is_admitted: false, is_dirty: true, last_accessed: AtomicInstant { instant: RwLock { data: Some(Instant(Instant { tv_sec: 434, tv_nsec: 814957001 })) } }, last_modified: AtomicInstant { instant: RwLock { data: Some(Instant(Instant { tv_sec: 434, tv_nsec: 814957001 })) } }, expiration_time: AtomicInstant { instant: RwLock { data: Some(Instant(Instant { tv_sec: 439, tv_nsec: 814957001 })) } }, policy_weight: 0 })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- common::timer_wheel::tests::test_bucket_indices stdout ----
thread 'common::timer_wheel::tests::test_bucket_indices' panicked at src/common/timer_wheel.rs:586:9:
assertion `left == right` failed
  left: (0, 3)
 right: (0, 63)

---- sync::cache::tests::time_to_idle_by_expiry_type stdout ----
thread 'sync::cache::tests::time_to_idle_by_expiry_type' panicked at src/sync/cache.rs:2625:9:
assertion `left == right` failed
  left: 2
 right: 1


failures:
    common::timer_wheel::tests::test_advance
    common::timer_wheel::tests::test_bucket_indices
    sync::cache::tests::time_to_idle_by_expiry_type

test result: FAILED. 83 passed; 3 failed; 3 ignored; 0 measured; 0 filtered out; finished in 30.27s
@tatsuya6502
Copy link
Member Author

@tatsuya6502
Copy link
Member Author

tatsuya6502 commented Oct 14, 2023

Update the Linux cross compiler tests:

main branch (for v0.12.x):

v0.11.x branch:

  • Disable the fail-fast strategy. (357f767)
  • Downgrade Rust to 1.72.1. (fa48f1c)

v0.10.x branch:

  • Disable the fail-fast strategy. (73da63c)
  • Downgrade Rust to 1.72.1. (86660b8)

v0.9.x branch:

  • Disable the fail-fast strategy. (39c90c3)
  • Downgrade Rust to 1.72.1. (3d8e0c5)

@tatsuya6502
Copy link
Member Author

rust-lang >> t-compiler/help >> mipsel-unknown-linux-musl appears sad between 1.72.1/1.73.0 (near/396569490)

Both MIPS and MIPS64 are affected by a shift bug rust-lang/rust#116177 that happens when the size of the integer is twice as large as a register, and the two are getting swapped for some reason

@tatsuya6502
Copy link
Member Author

Updated the Linux cross compiler tests:

main branch (for v0.12.x):

  • Downgrade Rust to 1.72.1. (3c4e920)

@tatsuya6502
Copy link
Member Author

Summary:

@tatsuya6502
Copy link
Member Author

tatsuya6502 commented Nov 14, 2023

The above issues have been resolved for Rust 1.76.0: rust-lang/rust#117907.

1.76.0 is currently Nightly and will be stable on February 8, 2024.

@tatsuya6502
Copy link
Member Author

After upgrading Rust toolchain in my local environment to 1.75.0, I noticed rustup cannot install prebuilt std for the MIPS targets. This is because the MIPS targets have been demoted from tier 2 to tier 3. So the binary releases for these targets are no longer provided by the Rust project.

Our CI is currently using Rust 1.72.1 for the MIPS targets, so it will continue running.

The above issues have been resolved for Rust 1.76.0: rust-lang/rust#117907.

1.76.0 is currently Nightly and will be stable on February 8, 2024.

When 1.76.0 is released, we will update our CI to use the latest stable for the MIPS targets again, by enabling build-std = true in the cross.toml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by something
Projects
None yet
Development

No branches or pull requests

1 participant