Skip to content

ICE when building from Windows Powershell in a WSL2 source directory #79574

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
sgrif opened this issue Nov 30, 2020 · 1 comment
Closed

ICE when building from Windows Powershell in a WSL2 source directory #79574

sgrif opened this issue Nov 30, 2020 · 1 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.

Comments

@sgrif
Copy link
Contributor

sgrif commented Nov 30, 2020

rustc will ICE when compiling any code from Windows inside of a WSL2 directory.

To reproduce:

(in a WSL shell): cargo new foo
(in Powershell): cd \\wsl$\Ubuntu\home\user\foo; cargo build

Code

fn main() {
    println!("Hello, world!");
}

Meta

rustc --version --verbose:

rustc 1.48.0 (7eac88abb 2020-11-16)
binary: rustc
commit-hash: 7eac88abb2e57e752f3302f02be5f3ce3d7adfb4
commit-date: 2020-11-16
host: x86_64-pc-windows-msvc
release: 1.48.0
LLVM version: 11.0

Error output

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', compiler\rustc_session\src\session.rs:874:48
Backtrace

   0:     0x7ffbca95a4a9 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hba5f685a77e920dc
   1:     0x7ffbca98748b - core::fmt::write::h7e2938de326daa9d
   2:     0x7ffbca94b998 - <std::io::IoSlice as core::fmt::Debug>::fmt::h6db1280adf9c872d
   3:     0x7ffbca95f8d4 - std::panicking::take_hook::hfb0d507d25fcd861
   4:     0x7ffbca95f4b8 - std::panicking::take_hook::hfb0d507d25fcd861
   7:     0x7ffbca95fe65 - rust_begin_unwind
   8:     0x7ffbca95ad8f - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hba5f685a77e920dc
   9:     0x7ffbca95fe19 - rust_begin_unwind
  10:     0x7ffbca95fdcc - std::panicking::begin_panic_fmt::h8d7269719d1216e5
  11:     0x7ffbc4921bbf - rustc_session::session::Session::incr_comp_session_dir::h8db9f92fa41e9a15
  12:     0x7ffbc3854de9 - rustc_incremental::persist::fs::garbage_collect_session_directories::h18d3b2a4b0d024ab
  13:     0x7ffbc04ba517 - <rls_span::OneIndexed as core::fmt::Debug>::fmt::hc2e3aeb3277dd105
  14:     0x7ffbc04f300d - rustc_interface::passes::BoxedResolver::to_resolver_outputs::h1b94841bf28bc104
  15:     0x7ffbc0531d60 - rustc_interface::queries::Queries::register_plugins::h1c1e0c6957679454
  16:     0x7ffbc030198b - <rustc_expand::mbe::macro_parser::MatcherPosHandle as core::ops::deref::DerefMut>::deref_mut::h5acc804ee7cddfed
  17:     0x7ffbc02da6dc - rustc_span::MultiSpan::primary_spans::h1017427bb4c1e209
  18:     0x7ffbc02fd0b4 - <rustc_expand::mbe::macro_parser::MatcherPosHandle as core::ops::deref::DerefMut>::deref_mut::h5acc804ee7cddfed
  19:     0x7ffbc0305d53 - <rustc_expand::mbe::macro_parser::MatcherPosHandle as core::ops::deref::DerefMut>::deref_mut::h5acc804ee7cddfed
  20:     0x7ffbc0288b53 - chalk_engine::TimeStamp::increment::h4493be1e979912d6
  21:     0x7ffbca970207 - std::sys::windows::thread::Thread::new::hb28370ce7bd0d890
  22:     0x7ffc2c3a7034 - BaseThreadInitThunk
  23:     0x7ffc2c73cec1 - RtlUserThreadStart

@sgrif sgrif 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 Nov 30, 2020
@sgrif
Copy link
Contributor Author

sgrif commented Nov 30, 2020

Duplicate of #66513

@sgrif sgrif closed this as completed Nov 30, 2020
# for free to join this conversation on GitHub. Already have an account? # 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

1 participant