Repository navigation
Windows incremental compilation error: Data Area Passed to a System Call Is Too Small #55812
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-windowsOperating system: WindowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Problem
Steps
- cargo new hello
- cargo run --
output
Compiling hello v0.1.0 (Z:\hello)
error: incremental compilation: error canonicalizing path `Z:\hello\target\debug\incremental\hello-cevblbahc1gh`: Data Area Passed to a System Call Is Too Small。 (os error 122)
thread 'main' panicked at 'librustc\session\mod.rs:802: Trying to get session directory from IncrCompSession `NotInitialized`', librustc\util\bug.rs:47:26
stack backtrace:
0: <std::sys::windows::args::Args as core::ops::drop::Drop>::drop
1: <std::ffi::os_str::OsString as std::sys_common::IntoInner<std::sys::windows::os_str::Buf>>::into_inner
2: std::panicking::take_hook
3: std::panicking::take_hook
4: <rustc::ty::sty::Binder<rustc::ty::ProjectionPredicate<'tcx>> as rustc::ty::ToPredicate<'tcx>>::to_predicate
5: std::panicking::rust_panic_with_hook
6: <usize as rustc::session::config::dep_tracking::DepTrackingHash>::hash
7: rustc::util::bug::bug_fmt
8: rustc::ty::context::tls::track_diagnostic
9: rustc::ty::context::tls::track_diagnostic
10: rustc::ty::context::tls::track_diagnostic
11: rustc::util::bug::bug_fmt
12: rustc::util::bug::bug_fmt
13: rustc::session::Session::incr_comp_session_dir
14: rustc_incremental::persist::fs::garbage_collect_session_directories
15: rustc_driver::target_features::add_configuration
16: rustc_driver::driver::count_nodes
17: rustc_driver::driver::compile_input
18: rustc_driver::run_compiler
19: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
20: rustc_driver::run_compiler
21: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
22: _rust_maybe_catch_panic
23: rustc_driver::profile::dump
24: rustc_driver::main
25: <unknown>
26: std::panicking::update_panic_count
27: _rust_maybe_catch_panic
28: std::rt::lang_start_internal
29: <unknown>
30: <unknown>
31: BaseThreadInitThunk
32: RtlUserThreadStart
query stack during panic:
end of query stack
error: aborting due to previous error
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.30.1 (1433507eb 2018-11-07) 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
error: Could not compile `hello`.
To learn more, run the command again with --verbose.
if i run with release mode ,there is no error code
cargo run --release --
that is running ok
i used virtual disk on ram file system on z:
i run in windows 7 sp1
Possible Solution(s)
Notes
Output of cargo version:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-windowsOperating system: WindowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Activity
[-]call cargo run error[/-][+]Windows incremental compilation error: Data Area Passed to a System Call Is Too Small[/+]alexcrichton commentedon Nov 9, 2018
Thanks for the report! I've transferred this to the rust-lang/rust repo as this looks like a bug activated by incremental compilation. The error here looks quite scary!
The implementation of
canonicalizefor Windows is here and comes from this location.What I don't understand is that we should handle
ERROR_INSUFFICIENT_BUFFERhere (what exit code 122 is) and resize the buffer..Curious! Do you perhaps have instructions for how to set up a ram filesystem to reproduce this? I wonder if perhaps there's a driver in play that's acting oddly?
retep998 commentedon Nov 10, 2018
There are already multiple existing issues open of Rust having issues with canonicalization on RAM drives.
Elinvynia commentedon May 10, 2020
Could this be a duplicate of #48249 ?
Rollup merge of rust-lang#161951 - ChrisDenton:canonicalize-boogaloo,…
Rollup merge of rust-lang#161951 - ChrisDenton:canonicalize-boogaloo,…
Rollup merge of rust-lang#161951 - ChrisDenton:canonicalize-boogaloo,…
Rollup merge of rust-lang#161951 - ChrisDenton:canonicalize-boogaloo,…
Unrolled build for #161951 in rollup 162254