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

Locally flaky cargo-kani tests: found possibly newer version of crate std #1719

Closed
tedinski opened this issue Sep 26, 2022 · 4 comments
Closed
Labels
[C] Bug This is a bug. Something isn't working.

Comments

@tedinski
Copy link
Contributor

Errors out like below. I say "locally flaky" because this will never plague CI: it depends on having old files laying around in build. Also easy to fix: just remove build and try again.

But we should make our dev experience better and fix this so it never happens.

failures:

---- [cargo-kani] cargo-kani/cargo-tests-dir/expected stdout ----

error: test failed: expected output to contain the line(s):
VERIFICATION:- SUCCESSFUL
status: exit status: 1
command: "cargo" "kani" "--target-dir" "/home/ubuntu/rmc/build/tests/cargo-kani/cargo-tests-dir/expected/target"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
   Compiling cargo-tests-dir v0.1.0 (/home/ubuntu/rmc/tests/cargo-kani/cargo-tests-dir)
error[E0460]: found possibly newer version of crate `std` which `cargo_tests_dir` depends on
 --> tests/integ.rs:9:5
  |
9 | use cargo_tests_dir::ONE; // trigger dependency resolution
  |     ^^^^^^^^^^^^^^^
  |
  = note: perhaps that crate needs to be recompiled?
  = note: the following crate versions were found:
          crate `std`: /home/ubuntu/.rustup/toolchains/nightly-2022-08-30-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4393e7d07259b8a4.rlib
          crate `std`: /home/ubuntu/.rustup/toolchains/nightly-2022-08-30-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4393e7d07259b8a4.so
          crate `std`: /home/ubuntu/rmc/target/debug/build/kani-compiler-9051aa422addda57/out/lib/libstd.rlib
          crate `cargo_tests_dir`: /home/ubuntu/rmc/build/tests/cargo-kani/cargo-tests-dir/expected/target/x86_64-unknown-linux-gnu/debug/deps/libcargo_tests_dir-1c70e32e14b4684a.rlib

Error: "Failed to compile crate."
error: could not compile `cargo-tests-dir` due to previous error
Error: cargo exited with status exit status: 101

------------------------------------------


---- [cargo-kani] cargo-kani/dev-depends/expected stdout ----

error: test failed: expected output to contain the line(s):
VERIFICATION:- SUCCESSFUL
status: exit status: 1
command: "cargo" "kani" "--target-dir" "/home/ubuntu/rmc/build/tests/cargo-kani/dev-depends/expected/target"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
   Compiling dev-depends v0.1.0 (/home/ubuntu/rmc/tests/cargo-kani/dev-depends)
error[E0460]: found possibly newer version of crate `std` which `anyhow` depends on
  --> src/lib.rs:12:9
   |
12 |     use anyhow; // trigger dependency resolution
   |         ^^^^^^
   |
   = note: perhaps that crate needs to be recompiled?
   = note: the following crate versions were found:
           crate `std`: /home/ubuntu/.rustup/toolchains/nightly-2022-08-30-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4393e7d07259b8a4.rlib
           crate `std`: /home/ubuntu/.rustup/toolchains/nightly-2022-08-30-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4393e7d07259b8a4.so
           crate `std`: /home/ubuntu/rmc/target/debug/build/kani-compiler-9051aa422addda57/out/lib/libstd.rlib
           crate `anyhow`: /home/ubuntu/rmc/build/tests/cargo-kani/dev-depends/expected/target/x86_64-unknown-linux-gnu/debug/deps/libanyhow-3218f02836493f47.rlib

Error: "Failed to compile crate."
error: could not compile `dev-depends` due to previous error
Error: cargo exited with status exit status: 101

------------------------------------------


---- [cargo-kani] cargo-kani/ws-crate-type-bin/expected stdout ----

error: test failed: expected output to contain the line(s):
2 successfully verified harnesses
status: exit status: 1
command: "cargo" "kani" "--target-dir" "/home/ubuntu/rmc/build/tests/cargo-kani/ws-crate-type-bin/expected/target"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
    Finished dev [unoptimized + debuginfo] target(s) in 0.27s
   Compiling bincrate v0.1.0 (/home/ubuntu/rmc/tests/cargo-kani/ws-crate-type-bin/bincrate)
error[E0460]: found possibly newer version of crate `std` which `libcrate` depends on
  --> bincrate/src/main.rs:12:5
   |
12 | use libcrate; // critical to trigger bug
   |     ^^^^^^^^
   |
   = note: perhaps that crate needs to be recompiled?
   = note: the following crate versions were found:
           crate `std`: /home/ubuntu/.rustup/toolchains/nightly-2022-08-30-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4393e7d07259b8a4.rlib
           crate `std`: /home/ubuntu/.rustup/toolchains/nightly-2022-08-30-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4393e7d07259b8a4.so
           crate `std`: /home/ubuntu/rmc/target/debug/build/kani-compiler-9051aa422addda57/out/lib/libstd.rlib
           crate `libcrate`: /home/ubuntu/rmc/build/tests/cargo-kani/ws-crate-type-bin/expected/target/x86_64-unknown-linux-gnu/debug/deps/liblibcrate-90fa99d5897ef3de.rlib

Error: "Failed to compile crate."
error: could not compile `bincrate` due to previous error
Error: cargo exited with status exit status: 101

------------------------------------------



failures:
    [cargo-kani] cargo-kani/cargo-tests-dir/expected
    [cargo-kani] cargo-kani/dev-depends/expected
    [cargo-kani] cargo-kani/ws-crate-type-bin/expected

test result: FAILED. 38 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 52.09s

Some tests failed in compiletest suite=cargo-kani mode=cargo-kani host=(none) target=(none)
@tedinski tedinski added the [C] Bug This is a bug. Something isn't working. label Sep 26, 2022
@celinval
Copy link
Contributor

@tedinski Have you seen this issue after #1717?

@celinval
Copy link
Contributor

Actually, the error just changed for me. Now I get conflicting harnesses, since we keep the old artifacts around and we link them all together.

@tedinski
Copy link
Contributor Author

Probably not, but I was never sure exactly how to reproduce it.

@tedinski
Copy link
Contributor Author

Closing this as possibly fixed already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C] Bug This is a bug. Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants