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

Path canonicalization warnings and errors when running cargo commands in a RAM disk on Windows #74327

Closed
MoodyMoon opened this issue Jul 14, 2020 · 4 comments
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-windows Operating system: Windows

Comments

@MoodyMoon
Copy link

How to reproduce:

  1. Install ImDisk Virtual Disk Driver from http://www.ltr-data.se/opencode.html/
  2. Create a disk backed by physical memory.
  3. Change the working directory to its root.
  4. Run cargo.exe new test1

Sample output:

warning: could not canonicalize path: 'Z:\'
warning: could not canonicalize path: 'Z:\'
     Created binary (application) `test1` package
  1. Change the working directory to test1
  2. Run cargo.exe run

Sample output:

warning: could not canonicalize path: 'Z:\test1'
warning: could not canonicalize path: 'Z:\test1'
warning: could not canonicalize path: 'Z:\'
   Compiling test1 v0.1.0 (Z:\test1)
error: incremental compilation: error canonicalizing path `Z:\test1\target\debug\incremental\test1-17ruhvudqlj17`: Incorrect function. (os error 1)

thread 'rustc' panicked at 'trying to get session directory from `IncrCompSession`: NotInitialized', src\librustc_session\session.rs:690: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::passes::BoxedResolver::to_resolver_outputs
  13: rustc_interface::queries::Queries::register_plugins
  14: rustc_driver::pretty::print_after_hir_lowering
  15: <rustc_middle::ty::instance::InstanceDef as rustc_middle::ty::query::keys::Key>::query_crate
  16: <rustc_middle::ty::instance::InstanceDef as rustc_middle::ty::query::keys::Key>::query_crate
  17: rustc_errors::snippet::MultilineAnnotation::increase_depth
  18: rustc_driver::pretty::print_after_hir_lowering
  19: std::sys::windows::thread::Thread::new
  20: BaseThreadInitThunk
  21: 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.44.1 (c7087fe00 2020-06-17) running on x86_64-pc-windows-msvc

note: compiler flags: -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 `test1`.

To learn more, run the command again with --verbose.
@retep998
Copy link
Member

Just another case of #59117 being unsolved still.

@Alexendoo Alexendoo added C-bug Category: This is a bug. O-windows Operating system: Windows labels Jul 15, 2020
@insomnimus
Copy link

I have the same exact issue.

@ArtifyCZ
Copy link

I have the same problem.
But CLion let me create a project and load it, ..., just not compile it.

@workingjubilee workingjubilee added the A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` label Mar 19, 2023
@jyn514 jyn514 added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jul 4, 2023
@Enselic
Copy link
Member

Enselic commented Aug 21, 2023

Triage: This is about problems canonicalizing paths on RAM drives. So is #48249, so closing as duplicate.

@Enselic Enselic closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

8 participants