-
Notifications
You must be signed in to change notification settings - Fork 386
Miri unhelpfully fails to run Xargo on MacOS since nightly-2021-12-05 #1941
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
Comments
As of 2021-12-05, miri fails to build core if 2021-12-04 is not installed with the following error: error: could not compile `core`
Caused by:
process didn't exit successfully: `/Users/ksbilodeau/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/cargo-miri --crate-name core --edition=2018 /Users/ksbilodeau/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,future-incompat --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=ace66a2df2cc3ca8 -C extra-filename=-ace66a2df2cc3ca8 --out-dir /var/folders/gq/4ccrkb_120dg91cptjyljz740000gn/T/xargo.z6aDGQc5PMmh/target/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -L dependency=/var/folders/gq/4ccrkb_120dg91cptjyljz740000gn/T/xargo.z6aDGQc5PMmh/target/x86_64-apple-darwin/release/deps -L dependency=/var/folders/gq/4ccrkb_120dg91cptjyljz740000gn/T/xargo.z6aDGQc5PMmh/target/release/deps -Cdebug-assertions=off -Coverflow-checks=on --sysroot /Users/ksbilodeau/Library/Caches/org.rust-lang.miri/HOST -Z force-unstable-if-unmarked` (exit status: 255)
warning: build failed, waiting for other jobs to finish...
error: build failed
error: `"/Users/ksbilodeau/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/cargo" "check" "--release" "--manifest-path" "/var/folders/gq/4ccrkb_120dg91cptjyljz740000gn/T/xargo.z6aDGQc5PMmh/Cargo.toml" "--target" "x86_64-apple-darwin" "-p" "std"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
fatal error: failed to run xargo if 2021-12-04 is installed and 2021-12-05+ is used, then proc_macro fails to compile with core compiling: error: could not compile `proc_macro`
Caused by:
process didn't exit successfully: `/Users/ksbilodeau/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/cargo-miri --crate-name proc_macro --edition=2018 /Users/ksbilodeau/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/proc_macro/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,future-incompat --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=d54c47827132156a -C extra-filename=-d54c47827132156a --out-dir /var/folders/gq/4ccrkb_120dg91cptjyljz740000gn/T/xargo.96UdjaQCav71/target/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -L dependency=/var/folders/gq/4ccrkb_120dg91cptjyljz740000gn/T/xargo.96UdjaQCav71/target/x86_64-apple-darwin/release/deps -L dependency=/var/folders/gq/4ccrkb_120dg91cptjyljz740000gn/T/xargo.96UdjaQCav71/target/release/deps --extern std=/var/folders/gq/4ccrkb_120dg91cptjyljz740000gn/T/xargo.96UdjaQCav71/target/x86_64-apple-darwin/release/deps/libstd-ffb98edf9742841a.rmeta -Cdebug-assertions=off -Coverflow-checks=on --sysroot /Users/ksbilodeau/Library/Caches/org.rust-lang.miri/HOST -Z force-unstable-if-unmarked` (exit status: 255)
warning: build failed, waiting for other jobs to finish...
error: build failed
error: `"/Users/ksbilodeau/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/cargo" "check" "--release" "--manifest-path" "/var/folders/gq/4ccrkb_120dg91cptjyljz740000gn/T/xargo.96UdjaQCav71/Cargo.toml" "--target" "x86_64-apple-darwin" "-p" "test"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
fatal error: failed to run xargo |
That is odd, since CI is still working (including on macOS) with later versions of rustc. And at least on Linux, later versions from rustup also definitely work. cargo-miri should forward xargo stdout and stderr (otherwise you wouldn't even see things like "Compiling std v0.0.0").
Yeah, mixing different versions will not work. |
Does it work for you to clone the Miri source, Which are the rustc commits associated with the 2021-12-04 and 2021-12-05 nightlies? |
That would be 532d2b14c and efec54529. That's this commit range. On first sight I cannot really see anything here that could explain a regression. |
This seems to be reproducible on the miri-test-libstd CI if I switch it to macOS. But I can't really investigate the problem that way so I hope someone with access to a macOS machine can take a closer look. |
@RalfJung What information could I get for you that would be useful? I'm a casual MacOS user at best. I tried to |
If I just |
@RalfJung I have some very important news. Using the Mac console, I was able to capture the miri crashes and determine the root cause of the crash.
However, this seems to not be localized to miri. Today I also discovered that Clippy fails to run, and the crash log reports the same error
Hence, I am afraid this issue may be much widespread than first anticipated. Would you like the full crash logs? |
Wow, what the heck...
Oh, it's a segfault? I am doubting more and more that this is caused by anything Miri does. In particular since you are seeing the same problem with clippy. So this is probably a rustc issue. It would be good to get a backtrace from the crash, but I don't know how to do that on macOS. |
Does this by chance contain what you need? |
Yes! Looks like this happens during the thread join. I remember a recent macos codegen bug around threads. I am on mobile right now, but check the rustc issues for recent macos crashes |
I can't find any such issue. The closest I got is rust-lang/rust#91124 but it does not mention thread joining. |
@RalfJung having provided the logs to the rust repo as well, I believe this issue may be related to rust-lang/rust#92173 at least the part in which miri fails to run even after it compiles core and proc_macro. Still have no idea what is causing the first issue unfortunately. |
Looks like this is now being tracked at rust-lang/rust#92185, but I'll keep this open so that Miri users can find it more easily. |
This seems to have stopped It's not entirely clear to me if there was a fix or Apple made some unrelated change that stopped this from happening. But in any case, this isn't a problem at the moment. |
This seems to have stopped working since Command Line Tools for Xcode 13.3
Stopped working or stopped breaking?
|
Stopped breaking. 😂 I'll edit. |
Totally fresh setup and a recent MacOS. I'm reporting this because I'm currently having a conversation with a user on the community Discord, and I bisected to a working nightly (on my system at leasts) for them.
The last working nightly I could find by bisecting is 2021-12-04.
It would be very nice to have a better error message. Is
cargo-miri
swallowing an error fromxargo
?The text was updated successfully, but these errors were encountered: