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

ICE from attempting to build cargo hello world on wsl filesystem but from windows #77327

Closed
lahwran opened this issue Sep 29, 2020 · 2 comments
Closed
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@lahwran
Copy link

lahwran commented Sep 29, 2020

Code

create a new cargo project in windows (I did this via jetbrains ui), then move it to //wsl$/... somewhere. try to run it with cargo run from windows. the windows rust compiler will likely crash with an internal error.

Meta

rustc --version --verbose:

C:\Windows>rustc --version --verbose
rustc 1.46.0 (04488afe3 2020-08-24)
binary: rustc
commit-hash: 04488afe34512aa4c33566eb16d8c912a3ae04f9
commit-date: 2020-08-24
host: x86_64-pc-windows-msvc
release: 1.46.0
LLVM version: 10.0

Error output

I did this with jetbrains clion. its run output:

C:/Users/Lauren/.cargo/bin/cargo.exe run --color=always --package milkrs-server --bin milkrs-server
   Compiling milkrs-server v0.1.0 (\\wsl$\Ubuntu-20.04\home\lahwran\milkshell2\milkrs-server)
error: incremental compilation: could not create session directory lock file: Incorrect function. (os error 1)

thread 'rustc' panicked at 'trying to get session directory from `IncrCompSession`: NotInitialized', src\librustc_session\session.rs:838:48
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: <std::io::IoSliceMut as core::fmt::Debug>::fmt
   3: std::panicking::take_hook
   4: std::panicking::take_hook
   5: rustc_driver::report_ice
   6: std::panicking::rust_panic_with_hook
   7: rust_begin_unwind
   8: std::panicking::begin_panic_fmt
   9: rustc_session::session::Session::incr_comp_session_dir
  10: rustc_incremental::persist::fs::garbage_collect_session_directories
  11: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::compile
  12: rustc_interface::queries::Queries::register_plugins
  13: <rustc_lint::BuiltinCombinedLateLintPass as rustc_lint::passes::LateLintPass>::check_stmt
  14: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
  15: <rustc_driver::DEFAULT_HOOK as core::ops::deref::Deref>::deref
  16: <&rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg> as rustc_middle::ty::query::keys::Key>::default_span
  17: std::sys::windows::thread::Thread::new
  18: BaseThreadInitThunk
  19: RtlUserThreadStart
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.46.0 (04488afe3 2020-08-24) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: aborting due to previous error

error: could not compile `milkrs-server`.

To learn more, run the command again with --verbose.

Process finished with exit code 101

@lahwran lahwran added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 29, 2020
@mati865
Copy link
Contributor

mati865 commented Sep 29, 2020

This looks like common issue with remote filesystems ($wsl is remote filesystem with WSL2) like NFS, SMB, ...

Does it work if you run cargo clean after the move?

@jonas-schievink
Copy link
Contributor

Duplicate of #66513

@jonas-schievink jonas-schievink marked this as a duplicate of #66513 Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants