nix-rust / nix

Rust friendly bindings to *nix APIs
MIT License
2.57k stars 650 forks source link

ptctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, addr, len, invalid_name) returns EFAULT rather than EINVAL under QEMU #2418

Open SteveLauC opened 1 month ago

SteveLauC commented 1 month ago

When I bump the CI Linux runner from Ubuntu 20.04 to 22.04, this test fails under QEMU for some architectures, it failed in this line:

failures:

---- test_prctl::test_set_vma_anon_name stdout ----
thread 'test_prctl::test_set_vma_anon_name' panicked at 'assertion failed: `(left == right)`
  left: `EFAULT`,
 right: `EINVAL`', test/sys/test_prctl.rs:149:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failures:
    test_prctl::test_set_vma_anon_name
asomers commented 1 month ago

@devnexen do you know why this test fails on Ubuntu 22.04, or can you figure out?

devnexen commented 1 month ago

After trying, I can t make much sense of why it fails just because of a container update. Maybe update all but the cross-compiling part ?

SteveLauC commented 1 month ago

Maybe update all but the cross-compiling part ?

Ubuntu 20.04 will be eof in 2025, so we have to migrate to a new version:(

devnexen commented 1 month ago

would you consider trying a more advanced version just to see ? e.g. 23.04

SteveLauC commented 1 month ago

would you consider trying a more advanced version just to see ? e.g. 23.04

23.04 is not available, we have 24.04, though it is still in beta. Yeah, we can give it a try

devnexen commented 1 month ago

I barely see something else than that or ignoring the test on qemu.

SteveLauC commented 1 month ago

Yeah, we can give it a try

Tried it in this commit https://github.com/nix-rust/nix/pull/2417/commits/3ea403eda9ec6db0539f446a2f9efe085f38845a, no luck, looks like we have to ignore the test?

SteveLauC commented 1 month ago

Yeah, we can give it a try

Tried it in this commit 3ea403e, no luck, looks like we have to ignore the test?

Copy my comment to here:

I think we should still use Ubuntu 20.04 for that cross test as it won't harm anything until 20.04 is no longer available.

When 20.04 becomes deprecated, if this issue still exists, we will ignore it, or we can happily migrate to newer versions.