Skip to content

cargo run encounters ICE on filesystems without flock #56976

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

Closed
niallobroin opened this issue Dec 19, 2018 · 3 comments
Closed

cargo run encounters ICE on filesystems without flock #56976

niallobroin opened this issue Dec 19, 2018 · 3 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-linux Operating system: Linux T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@niallobroin
Copy link

niallobroin commented Dec 19, 2018

I tried this code:
$cargo new hello-rust (OK)
$cargo run

Failed with below error.
I tried rustc main.rs and it compiled OK.

Meta

rustc --version --verbose:

rustc 1.31.0 (abe02cefd 2018-12-04)
binary: rustc
commit-hash: abe02cefd6cd1916df62ad7dc80161bea50b72e8
commit-date: 2018-12-04
host: x86_64-unknown-linux-gnu
release: 1.31.0
LLVM version: 8.0

Backtrace:

[user@login3 hello-rust]$ RUST_BACKTRACE=1 cargo run --verbose
   Compiling hello-rust v0.1.0 (/ichec/home/users/nobyrnes/hello-rust)                                                                                                                                    
     Running `rustc --edition=2018 --crate-name hello_rust src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=3968ac709c662110 -C extra-filename=-3968ac709c662110 --out-dir /ichec/home/users/nobyrnes/hello-rust/target/debug/deps -C incremental=/ichec/home/users/nobyrnes/hello-rust/target/debug/incremental -L dependency=/ichec/home/users/nobyrnes/hello-rust/target/debug/deps`
error: incremental compilation: could not create session directory lock file: Function not implemented (os error 38)                                                                                      
                                                                                                                                                                                                          
thread 'main' panicked at 'librustc/session/mod.rs:803: Trying to get session directory from IncrCompSession `NotInitialized`', librustc/util/bug.rs:47:26                                                
stack backtrace:                                                                                                                                                                                          
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace                                                                                                                                           
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49                                                                                                                                             
   1: std::sys_common::backtrace::print                                                                                                                                                                   
             at libstd/sys_common/backtrace.rs:71                                                                                                                                                         
             at libstd/sys_common/backtrace.rs:59                                                                                                                                                         
   2: std::panicking::default_hook::{{closure}}                                                                                                                                                           
             at libstd/panicking.rs:211                                                                                                                                                                   
   3: std::panicking::default_hook                                                                                                                                                                        
             at libstd/panicking.rs:227                                                                                                                                                                   
   4: rustc::util::common::panic_hook                                                                                                                                                                     
   5: std::panicking::rust_panic_with_hook                                                                                                                                                                
             at libstd/panicking.rs:480                                                                                                                                                                   
   6: std::panicking::begin_panic                                                                                                                                                                         
   7: rustc::util::bug::opt_span_bug_fmt::{{closure}}                                                                                                                                                     
   8: rustc::ty::context::tls::with_opt::{{closure}}                                                                                                                                                      
   9: rustc::ty::context::tls::with_context_opt                                                                                                                                                           
  10: rustc::ty::context::tls::with_opt                                                                                                                                                                   
  11: rustc::util::bug::opt_span_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::driver::phase_2_configure_and_expand_inner::{{closure}}                                                                                                                               
  16: rustc::util::common::time                                                                                                                                                                           
  17: rustc_driver::driver::phase_2_configure_and_expand                                                                                                                                                  
  18: rustc_driver::driver::compile_input                                                                                                                                                                 
  19: rustc_driver::run_compiler_with_pool                                                                                                                                                                
  20: rustc_driver::driver::spawn_thread_pool                                                                                                                                                             
  21: rustc_driver::run_compiler                                                                                                                                                                          
  22: <scoped_tls::ScopedKey<T>>::set                                                                                                                                                                     
  23: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once                                                                                                                     
  24: __rust_maybe_catch_panic                                                                                                                                                                            
             at libpanic_unwind/lib.rs:102                                                                                                                                                                
  25: rustc_driver::run                                                                                                                                                                                   
  26: rustc_driver::main                                                                                                                                                                                  
  27: std::rt::lang_start::{{closure}}                                                                                                                                                                    
  28: std::panicking::try::do_call                                                                                                                                                                        
             at libstd/rt.rs:59                                                                                                                                                                           
             at libstd/panicking.rs:310                                                                                                                                                                   
  29: __rust_maybe_catch_panic                                                                                                                                                                            
             at libpanic_unwind/lib.rs:102                                                                                                                                                                
  30: std::rt::lang_start_internal                                                                                                                                                                        
             at libstd/panicking.rs:289                                                                                                                                                                   
             at libstd/panic.rs:392                                                                                                                                                                       
             at libstd/rt.rs:58                                                                                                                                                                           
  31: main                                                                                                                                                                                                
  32: __libc_start_main                                                                                                                                                                                   
  33: <unknown>                                                                                                                                                                                           
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.31.0 (abe02cefd 2018-12-04) running on x86_64-unknown-linux-gnu                                                                                                                             
                                                                                                                                                                                                          
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-rust`.                                                                                                                                                                    

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name hello_rust src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=3968ac709c662110 -C extra-filename=-3968ac709c662110 --out-dir /ichec/home/users/nobyrnes/hello-rust/target/debug/deps -C incremental=/ichec/home/users/nobyrnes/hello-rust/target/debug/incremental -L dependency=/ichec/home/users/nobyrnes/hello-rust/target/debug/deps` (exit code: 101)
@jonas-schievink
Copy link
Contributor

What file system are you using for the project directory?

@estebank estebank added O-linux Operating system: Linux I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-incr-comp Area: Incremental compilation labels Dec 19, 2018
@niallobroin
Copy link
Author

“Flock” was not active on a lustre filesystem.

@jonas-schievink jonas-schievink added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Aug 6, 2019
@saethlin saethlin changed the title cargo run fails on hello-rust cargo run encounters ICE on filesystems without flock Jul 26, 2023
@Enselic
Copy link
Member

Enselic commented Aug 22, 2023

Triage: In #49773 it is discussed to make rustc more resilient towards lack of support for file locks on some file systems. Closing this as a duplicate of #49773.

@Enselic Enselic closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-linux Operating system: Linux 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

4 participants