-
Notifications
You must be signed in to change notification settings - Fork 347
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
Cargo test miri fails on macos 10.15.4 intermittent IO error while iterating directory #1285
Comments
The problem may actually be in xargo, it appears that it works out dst in ./src/sysroot.rs, then attempts a cp_r from it's ./src/util.rs, but the issue is dst would only be |
Yeah the error definitely looks like it is on the xargo side. I have no idea what an "intermittent IO error" is... does this happen each time, or only sometimes? If it happens each time, do you have any idea why your system would be affected when things work fine on macOS otherwise? (For example, Miri CI runs on macOS, and I never saw this failure.) And what is that strange |
No idea - I have a clean install, and I had only just installed the miri + nightly toolchain. :( It's 100% reproducable for me. About the only thing I can think is that I'm on 10.15.4 so very latest macos.
TMPDIR is randomised on macos for security, so mine is for this session |
It already does, see here. It looks like for you, walkdir is already failing. That's really odd. And why does it list that temp dir as The issue here isn't that it is copying to a non-existing directory -- it is trying to copy from something non-existent... |
So looking at the code, the failing Strangely, your log output above does not show any indication that a build is actually happening! Is that the full output? Could you try |
So I ran with
So it looks like whatever xargo is attempting to build, isn't being built at all, so that's why the target dir is missing. Even as an initial suggestion, perhaps in ./src/bin/cargo-miri.rs, if miri is set to -v, then to not set -q to build in xargo (line 380 I think)? It might also be good if with -v that the command and env is displayed before it's run on line 390 too so that we can more easily reproduce the failure, or see environmental issues that could be part of the problem? Also worth pointing out, that the error message should be "failed to run xargo-check" not "failed to run xargo" at list 390/391? So from here I wanted to see why xargo-check was failing an to reproduce that environment, so I used the following shell script:
And ran
Both of the executed commands are "check" commands, not "build" commands, which is quite likely why the xargo command is failing to copy artifacts - there are none, we only did a check! Is this possibly a bug in xargo at this point?
|
You know what I realised it might be - I build into a ram disk, configured in my .cargo/config:
So I wonder if that's what's the problem, that target/ is landing outside of the project location because xargo/miri don't read the .cargo/config target-dir parameter perhaps? |
Ah yes, that would definitely be a problem. :D Could you open a xargo issue that xargo does not work when |
Checking also creates artifacts (it creates files with crate metadata and MIR). This is needed so that other crates depending on this one can be checked. Checking is what we do on all platforms for a few weeks already and it works fine on CI and for plenty of users (otherwise we would have heard about it ;). In fact, this was a crucial step towards #1198. So checking is not the problem. |
Done, xargo issue opened! Thanks for your patience! japaric/xargo#286 |
cargo test miri fails, it appears to be an issue with no creating the directories correctly in tmpdir during the build process? I've put as much detail as I have below. Thanks!
toolchain nightly-2020-03-29-x86_64-apple-darwin
The text was updated successfully, but these errors were encountered: