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 'specified instant was less than self' and BorrowMutError on aarch64-linux-unknown-gnu #56940

Closed
IntrepidPig opened this issue Dec 18, 2018 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@IntrepidPig
Copy link

IntrepidPig commented Dec 18, 2018

When compiling code on an aarch64 system (a pine a64) I get a compiler panic 'specified instant was less than self', which I'm guessing is because the accuracy of the timer given on this system isn't very reliable and the std::time::Instant guarantee that a new one won't be earlier than an old one isn't upheld. This problem occurs somewhat reliably. Usually several crates will compile successfully in a long compile job before a panic happens. This problem has been happening to me since around 1.26 nightly.

Here's a backtrace I get

thread 'main' panicked at 'specified instant was later than self', libstd/sys/unix/time.rs:292:17
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                                                                               
             at libstd/panicking.rs:410                                                                         
   7: std::sys::unix::time::inner::Instant::sub_instant::{{closure}}                                            
             at libstd/sys/unix/time.rs:292                                                                     
   8: std::time::Instant::elapsed                                                                               
             at libcore/result.rs:774                                                                           
             at libstd/sys/unix/time.rs:291                                                                     
             at libstd/time.rs:185                                                                              
             at libstd/time.rs:250                                                                              
             at libstd/time.rs:209                                                                              
   9: rustc::util::profiling::SelfProfiler::start_activity                                                      
  10: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::ensure_query               
  11: rustc::ty::util::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::calculate_dtor                        
  12: rustc_typeck::check::adt_destructor                                                                       
  13: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::adt_destructor<'tcx>>::compute
  14: rustc::dep_graph::graph::DepGraph::with_task_impl                                                         
  15: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start                                                
  16: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job       
  17: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query                  
  18: rustc_typeck::check::check_item_type                                                                      
  19: rustc::hir::Crate::visit_all_item_likes                                                                   
  20: rustc_typeck::check::check_item_types                                                                     
  21: rustc::util::common::time                                                                                 
  22: rustc_typeck::check_crate                                                                                 
  23: rustc::ty::context::tls::enter_context                                                                    
  24: <std::thread::local::LocalKey<T>>::with                                                                   
  25: rustc::ty::context::TyCtxt::create_and_enter                                                              
  26: rustc_driver::driver::compile_input                                                                       
  27: rustc_driver::run_compiler_with_pool                                                                      
  28: rustc_driver::driver::spawn_thread_pool                                                                   
  29: rustc_driver::run_compiler                                                                                
  30: <scoped_tls::ScopedKey<T>>::set                                                                           
  31: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once                           
  32: __rust_maybe_catch_panic                                                                                  
             at libpanic_unwind/lib.rs:102                                                                      
  33: rustc_driver::run                                                                                         
  34: rustc_driver::main                                                                                        
  35: std::rt::lang_start::{{closure}}                                                                          
  36: std::panicking::try::do_call                                                                              
             at libstd/rt.rs:59                                                                                 
             at libstd/panicking.rs:310                                                                         
  37: __rust_maybe_catch_panic                                                                                  
             at libpanic_unwind/lib.rs:102                                                                      
  38: std::rt::lang_start_internal                                                                              
             at libstd/panicking.rs:289                                                                         
             at libstd/panic.rs:392                                                                             
             at libstd/rt.rs:58                                                                                 
  39: main                                                                                                      
  40: __libc_start_main                                                                                         
query stack during panic:                                                                                       
#0 [adt_destructor] processing `de::impls::PathVisitor`                                                         
end of query stack

When I first tried compiling with -j 1 I instantly got the same panic plus a BorrowMutError, shown next:

thread 'main' panicked at 'specified instant was later than self', libstd/sys/unix/time.rs:292:17               
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                                                                               
             at libstd/panicking.rs:410                                                                         
   7: std::sys::unix::time::inner::Instant::sub_instant::{{closure}}                                            
             at libstd/sys/unix/time.rs:292                                                                     
   8: std::time::Instant::elapsed                                                                               
             at libcore/result.rs:774                                                                           
             at libstd/sys/unix/time.rs:291                                                                     
             at libstd/time.rs:185                                                                              
             at libstd/time.rs:250                                                                              
             at libstd/time.rs:209                                                                              
   9: rustc::util::profiling::SelfProfiler::start_activity                                                      
  10: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job       
  11: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query                  
  12: rustc::traits::specialize::specialization_graph::Children::insert_blindly                                 
  13: rustc::traits::specialize::specialization_graph_provider                                                  
  14: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::specialization_graph_of<'tcx>>::compute
  15: rustc::dep_graph::graph::DepGraph::with_task_impl                                                         
  16: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start                                                
  17: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job       
  18: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query                  
  19: rustc::traits::specialize::find_associated_item                                                           
  20: rustc::ty::instance::Instance::resolve                                                                    
  21: rustc_mir::monomorphize::collector::visit_fn_use                                                          
  22: <rustc_mir::monomorphize::collector::MirNeighborCollector<'a, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_terminator_kind
  23: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  24: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  25: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  26: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  27: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  28: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  29: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  30: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  31: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  32: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  33: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  34: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  35: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  36: rustc_mir::monomorphize::collector::collect_items_rec                                                     
  37: rustc_mir::monomorphize::collector::collect_crate_mono_items::{{closure}}                                 
  38: rustc_mir::monomorphize::collector::collect_crate_mono_items                                              
  39: rustc::util::common::time                                                                                 
  40: rustc_codegen_llvm::base::collect_and_partition_mono_items                                                
  41: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::collect_and_partition_mono_items<'tcx>>::compute
  42: rustc::dep_graph::graph::DepGraph::with_task_impl                                                         
  43: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start                                                
  44: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job       
  45: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query                  
  46: rustc_codegen_llvm::back::symbol_export::exported_symbols_provider_local                                  
  47: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::exported_symbols<'tcx>>::compute
  48: rustc::dep_graph::graph::DepGraph::with_task_impl                                                         
  49: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start                                                
  50: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job       
  51: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query                  
  52: rustc_metadata::encoder::encode_metadata                                                                  
  53: rustc_codegen_llvm::base::write_metadata                                                                  
  54: rustc::util::common::time                                                                                 
  55: rustc_codegen_llvm::base::codegen_crate                                                                   
  56: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
  57: rustc::util::common::time                                                                                 
  58: rustc_driver::driver::phase_4_codegen                                                                     
  59: rustc_driver::driver::compile_input::{{closure}}                                                          
  60: rustc::ty::context::tls::enter_context                                                                    
  61: <std::thread::local::LocalKey<T>>::with                                                                   
  62: rustc::ty::context::TyCtxt::create_and_enter                                                              
  63: rustc_driver::driver::compile_input                                                                       
  64: rustc_driver::run_compiler_with_pool                                                                      
  65: rustc_driver::driver::spawn_thread_pool                                                                   
  66: rustc_driver::run_compiler                                                                                
  67: <scoped_tls::ScopedKey<T>>::set                                                                           
  68: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once                           
  69: __rust_maybe_catch_panic                                                                                  
             at libpanic_unwind/lib.rs:102                                                                      
  70: rustc_driver::run                                                                                         
  71: rustc_driver::main                                                                                        
  72: std::rt::lang_start::{{closure}}                                                                          
  73: std::panicking::try::do_call                                                                              
             at libstd/rt.rs:59                                                                                 
             at libstd/panicking.rs:310                                                                         
  74: __rust_maybe_catch_panic                                                                                  
             at libpanic_unwind/lib.rs:102                                                                      
  75: std::rt::lang_start_internal                                                                              
             at libstd/panicking.rs:289                                                                         
             at libstd/panic.rs:392                                                                             
             at libstd/rt.rs:58                                                                                 
  76: main                                                                                                      
  77: __libc_start_main                                                                                         
query stack during panic:                                                                                       
thread 'main' panicked at 'already borrowed: BorrowMutError', libcore/result.rs:1009:5                          
stack backtrace:                                                                                                
   0:       0x7fa19be11b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h4d215aadcaa52ebe         
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49                                 
   1:       0x7fa19a7737 - std::sys_common::backtrace::print::h82720234d7357f67                                 
                               at libstd/sys_common/backtrace.rs:71                                             
                               at libstd/sys_common/backtrace.rs:59                                             
   2:       0x7fa1999c1f - std::panicking::default_hook::{{closure}}::h1cc6e7f2777dc182                         
                               at libstd/panicking.rs:211                                                       
   3:       0x7fa19999d7 - std::panicking::default_hook::hcfca097092607890                                      
                               at libstd/panicking.rs:227                                                       
   4:       0x7fa040ec77 - rustc::util::common::panic_hook::h306b1084c22d63a7                                   
   5:       0x7fa199a34b - std::panicking::rust_panic_with_hook::hb4c40b3721cfbfb0                              
                               at libstd/panicking.rs:480                                                       
   6:       0x7fa1999f57 - std::panicking::continue_panic_fmt::h7e84a0a182ce9c2d                                
                               at libstd/panicking.rs:390                                                       
   7:       0x7fa1999e63 - rust_begin_unwind                                                                    
                               at libstd/panicking.rs:325                                                       
   8:       0x7fa19da90b - core::panicking::panic_fmt::h0c93626b89c38af6                                        
                               at libcore/panicking.rs:77                                                       
   9:       0x7fa039f93f - core::result::unwrap_failed::h0f2804ccdceb1057                                       
  10:       0x7fa028eb93 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query::haa28e0723665833b
  11:       0x7fa01b7cd7 - rustc::ty::item_path::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::push_item_path::hf208625ff68cfb69
  12:       0x7fa04ed63b - <M as rustc::ty::query::config::QueryDescription<'tcx>>::describe::h89c6f088ab3a41ca 
  13:       0x7fa041bb27 - rustc::ty::query::Query::describe::h329b8f02606e812d                                 
  14:       0x7fa012152f - rustc::ty::context::tls::with_context_opt::h2126d91cee343ea8                         
  15:       0x7fa040ed03 - rustc::util::common::panic_hook::h306b1084c22d63a7                                   
  16:       0x7fa199a34b - std::panicking::rust_panic_with_hook::hb4c40b3721cfbfb0                              
                               at libstd/panicking.rs:480                                                       
  17:       0x7fa199a163 - std::panicking::begin_panic::h795f8aed5d383695                                       
                               at libstd/panicking.rs:410                                                       
  18:       0x7fa199337b - std::sys::unix::time::inner::Instant::sub_instant::{{closure}}::h18563395bbed46b0    
                               at libstd/sys/unix/time.rs:292                                                   
  19:       0x7fa19a6ebb - std::time::Instant::elapsed::h5d7a80e72662292b                                       
                               at libcore/result.rs:774                                                         
                               at libstd/sys/unix/time.rs:291                                                   
                               at libstd/time.rs:185                                                            
                               at libstd/time.rs:250                                                            
                               at libstd/time.rs:209                                                            
  20:       0x7f9ffe1677 - rustc::util::profiling::SelfProfiler::start_activity::h986ad6359f81d55a              
  21:       0x7fa01d6cb7 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job::hc4af5870698c60ab
  22:       0x7fa0269933 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query::h6f683a66c5cd04fc
  23:       0x7f9ff82c1b - rustc::traits::specialize::specialization_graph::Children::insert_blindly::ha890e94c48b0285e
  24:       0x7f9ffcec8f - rustc::traits::specialize::specialization_graph_provider::hd7f0b5a2ff57c920          
  25:       0x7fa01a34e7 - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::specialization_graph_of<'tcx>>::compute::h55791f060255075c
  26:       0x7f9ff4f86b - rustc::dep_graph::graph::DepGraph::with_task_impl::h992bebda7ff9cd47                 
  27:       0x7fa00e3753 - <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start::h7d7a156d9f36ae7c        
  28:       0x7fa01c226b - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job::h47db5b7f6268c68d
  29:       0x7fa0248b1f - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query::h460854c56198ad02
  30:       0x7f9ffcd8f3 - rustc::traits::specialize::find_associated_item::hdcb76f43f4e084c9                   
  31:       0x7f9ffdfeaf - rustc::ty::instance::Instance::resolve::hcf7331f6719090cf                            
  32:       0x7fa0a29e93 - rustc_mir::monomorphize::collector::visit_fn_use::h0b7ff6013ac91264                  
  33:       0x7fa0a29a47 - <rustc_mir::monomorphize::collector::MirNeighborCollector<'a, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_terminator_kind::h273825cee5b9efef
  34:       0x7fa0a28733 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  35:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  36:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  37:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  38:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  39:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  40:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  41:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  42:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  43:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  44:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  45:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  46:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  47:       0x7fa0a28bf3 - rustc_mir::monomorphize::collector::collect_items_rec::h3640dedea6ef9cd7             
  48:       0x7fa0a27beb - rustc_mir::monomorphize::collector::collect_crate_mono_items::{{closure}}::ha18316921a9b2907
  49:       0x7fa0a27027 - rustc_mir::monomorphize::collector::collect_crate_mono_items::h4032ae4d8b75f166      
  50:       0x7f9c8a8cbb - rustc::util::common::time::h8666e011e51fe9e5                                         
  51:       0x7f9c92d283 - rustc_codegen_llvm::base::collect_and_partition_mono_items::h89d01ebc8f4a3923        
  52:       0x7fa01a3f2b - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::collect_and_partition_mono_items<'tcx>>::compute::heb56783bba3b818d
  53:       0x7f9ff5aa2b - rustc::dep_graph::graph::DepGraph::with_task_impl::hc7a605db5928df4b                 
  54:       0x7fa00cb96b - <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start::h3aca894fac9418e0        
  55:       0x7fa01bfb87 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job::h2ef87316503525e3
  56:       0x7fa02685d3 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query::h6ef566902fcecd63
  57:       0x7f9c975fbf - rustc_codegen_llvm::back::symbol_export::exported_symbols_provider_local::h303bba7f92d3a4af
  58:       0x7fa01a3f07 - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::exported_symbols<'tcx>>::compute::h022e11021971ef4b
  59:       0x7f9ff6a563 - rustc::dep_graph::graph::DepGraph::with_task_impl::hfd5ef0a8a156fdd0                 
  60:       0x7fa00ff177 - <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start::hcc8cf0c3a9318e29        
  61:       0x7fa01cf38f - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job::h8fb67b1f85c56b70
  62:       0x7fa02458c3 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query::h3ea93f0537b81797
  63:       0x7fa0fcd827 - rustc_metadata::encoder::encode_metadata::h3974ec048e66b56c                          
  64:       0x7f9c92aeb7 - rustc_codegen_llvm::base::write_metadata::ha006227f86f20551                          
  65:       0x7f9c8a883f - rustc::util::common::time::h46b0a789d4fd44de                                         
  66:       0x7f9c92b57b - rustc_codegen_llvm::base::codegen_crate::h4f47006aaff274ca                           
  67:       0x7f9c97b50f - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate::h1b5e0a36777f0f8c
  68:       0x7fa1b064a3 - rustc::util::common::time::ha03eb7179adf5641                                         
  69:       0x7fa1afa8a7 - rustc_driver::driver::phase_4_codegen::h986e03d93b5cf4ce                             
  70:       0x7fa1ad1adf - rustc_driver::driver::compile_input::{{closure}}::hf98165e0c1a4801e                  
  71:       0x7fa1abb253 - rustc::ty::context::tls::enter_context::hf5a4819238d513a2                            
  72:       0x7fa1b3c2b3 - <std::thread::local::LocalKey<T>>::with::h93386544071cc3f1                           
  73:       0x7fa1b80e43 - rustc::ty::context::TyCtxt::create_and_enter::h93142bd23c49dd05                      
  74:       0x7fa1af4b8b - rustc_driver::driver::compile_input::hca1fa21f74ba205b                               
  75:       0x7fa1b9afef - rustc_driver::run_compiler_with_pool::ha0c892e478210d0a                              
  76:       0x7fa1af31c7 - rustc_driver::driver::spawn_thread_pool::hbbcb33985c15d20b                           
  77:       0x7fa1b9a3c3 - rustc_driver::run_compiler::hdb819c346db8c5be                                        
  78:       0x7fa1adff9b - <scoped_tls::ScopedKey<T>>::set::h6fcbf427d45c73d6                                   
  79:       0x7fa1ad4d57 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hf3c2e500cf26088e
  80:       0x7fa19cd4db - __rust_maybe_catch_panic                                                             
                               at libpanic_unwind/lib.rs:102                                                    
  81:       0x7fa1b98d2f - rustc_driver::run::ha33a97a6629d40ce                                                 
  82:       0x7fa1ba364f - rustc_driver::main::hf36dd058a5421ad9                                                
  83:       0x558499bc27 - std::rt::lang_start::{{closure}}::h2c591498ace73137                                  
  84:       0x7fa1999dc7 - std::panicking::try::do_call::he4712eb84191fb3b                                      
                               at libstd/rt.rs:59                                                               
                               at libstd/panicking.rs:310                                                       
  85:       0x7fa19cd4db - __rust_maybe_catch_panic                                                             
                               at libpanic_unwind/lib.rs:102                                                    
  86:       0x7fa198fd07 - std::rt::lang_start_internal::h76f990c2b2c74932                                      
                               at libstd/panicking.rs:289                                                       
                               at libstd/panic.rs:392                                                           
                               at libstd/rt.rs:58                                                               
  87:       0x558499bc83 - main                                                                                 
  88:       0x7fa180ed87 - __libc_start_main                                                                    
query stack during panic:                                                                                       
thread panicked while processing panic. aborting.                                                               
error: Could not compile `semver-parser`.

Strangely though, the next time I tried compiling with -j 1, it compiled fine. I'm pretty confused about this, and I guess I should really be cross compiling but it was much easier to just compile on the target than figure out how to cross compile openssl and stuff.

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

@wesleywiser
Copy link
Member

Some related issues:

#56612 - Panic on Windows (possibly in a VM)
#49281 - Panic on Linux arm64 (mention of panic on s390x as well)
#48514 - Panic on OpenBSD
#56560 - Panic on Windows (AWS)
#51648 - Panic on Windows

This was fixed in #56170 and can probably be marked a duplicate of that.

@IntrepidPig
Copy link
Author

IntrepidPig commented Dec 18, 2018

It looks like the fix in that PR only applies to Windows, right? Also I'm a little unsure about that PRs validity even on Windows. I left a comment reviewing #56170 with more details, here.

@wesleywiser
Copy link
Member

The fix in the PR applies to all platforms by disabling the profiler unless it's specifically requested rather than always running it.

@Centril Centril added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Dec 20, 2018
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 7, 2019
This commit is an attempt to force `Instant::now` to be monotonic
through any means possible. We tried relying on OS/hardware/clock
implementations, but those seem buggy enough that we can't rely on them
in practice. This commit implements the same hammer Firefox recently
implemented (noted in rust-lang#56612) which is to just keep whatever the lastest
`Instant::now()` return value was in memory, returning that instead of
the OS looks like it's moving backwards.

Closes rust-lang#48514
Closes rust-lang#49281
cc rust-lang#51648
cc rust-lang#56560
Closes rust-lang#56612
Closes rust-lang#56940
bors added a commit that referenced this issue Jan 8, 2019
std: Force `Instant::now()` to be monotonic

This commit is an attempt to force `Instant::now` to be monotonic
through any means possible. We tried relying on OS/hardware/clock
implementations, but those seem buggy enough that we can't rely on them
in practice. This commit implements the same hammer Firefox recently
implemented (noted in #56612) which is to just keep whatever the lastest
`Instant::now()` return value was in memory, returning that instead of
the OS looks like it's moving backwards.

Closes #48514
Closes #49281
cc #51648
cc #56560
Closes #56612
Closes #56940
bors added a commit that referenced this issue Jan 8, 2019
std: Force `Instant::now()` to be monotonic

This commit is an attempt to force `Instant::now` to be monotonic
through any means possible. We tried relying on OS/hardware/clock
implementations, but those seem buggy enough that we can't rely on them
in practice. This commit implements the same hammer Firefox recently
implemented (noted in #56612) which is to just keep whatever the lastest
`Instant::now()` return value was in memory, returning that instead of
the OS looks like it's moving backwards.

Closes #48514
Closes #49281
cc #51648
cc #56560
Closes #56612
Closes #56940
AGSaidi added a commit to AGSaidi/rust that referenced this issue Sep 4, 2021
While issues have been seen on arm64 platforms the Arm architecture requires
that the counter monotonically increases and that it must provide a uniform
view of system time (e.g. it must not be possible for a core to receive a
message from another core with a time stamp and observe time going backwards
(ARM DDI 0487G.b D11.1.2). While there have been a few 64bit SoCs that have
bugs (rust-lang#49281, rust-lang#56940) which cause time to not monotonically increase, these have
been fixed in the Linux kernel and we shouldn't penalize all Arm SoCs for those
who refuse to update their kernels:
SUN50I_ERRATUM_UNKNOWN1 - Allwinner A64 / Pine A64 - fixed in 5.1
FSL_ERRATUM_A008585 - Freescale LS2080A/LS1043A - fixed in 4.10
HISILICON_ERRATUM_161010101 - Hisilicon 1610 - fixed in 4.11
ARM64_ERRATUM_858921 - Cortex A73 - fixed in 4.12

255a3f3 std: Force `Instant::now()` to be monotonic added a mutex to work around
this problem and a small test program using glommio shows the majority of time spent
acquiring and releasing this Mutex. 3914a7b tries to improve this, but actually
makes it worse on big systems as for 128b atomics a ldxp/stxp pair (and
successful loop) is required which is expensive as a lock and because of how
the load/store-exclusives scale on large Arm systems is both unfair to threads
and tends to go backwards in performance.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Oct 16, 2021
…ually-monotonic, r=yaahc

linux/aarch64 Now() should be actually_monotonic()

While issues have been seen on arm64 platforms the Arm architecture requires
that the counter monotonically increases and that it must provide a uniform
view of system time (e.g. it must not be possible for a core to receive a
message from another core with a time stamp and observe time going backwards
(ARM DDI 0487G.b D11.1.2). While there have been a few 64bit SoCs that have
bugs (rust-lang#49281, rust-lang#56940) which cause time to not monotonically increase, these have
been fixed in the Linux kernel and we shouldn't penalize all Arm SoCs for those
who refuse to update their kernels:
SUN50I_ERRATUM_UNKNOWN1 - Allwinner A64 / Pine A64 - fixed in 5.1
FSL_ERRATUM_A008585 - Freescale LS2080A/LS1043A - fixed in 4.10
HISILICON_ERRATUM_161010101 - Hisilicon 1610 - fixed in 4.11
ARM64_ERRATUM_858921 - Cortex A73 - fixed in 4.12

255a3f3 std: Force `Instant::now()` to be monotonic added a Mutex to work around
this problem and a small test program using glommio shows the majority of time spent
acquiring and releasing this Mutex. 3914a7b tries to improve this, but actually
makes it worse on big systems as for 128b atomics a ldxp/stxp pair (and successful loop)
for v8.4 systems that don't support FEAT_LSE2 is required which is expensive as a lock
and because of how the load/store-exclusives scale on large Arm systems is both unfair
to threads and tends to go backwards in performance.

A small sample program using glommio improves by 70x on a 32 core Graviton2
system with this change.
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 17, 2021
…lly-monotonic, r=yaahc

linux/aarch64 Now() should be actually_monotonic()

While issues have been seen on arm64 platforms the Arm architecture requires
that the counter monotonically increases and that it must provide a uniform
view of system time (e.g. it must not be possible for a core to receive a
message from another core with a time stamp and observe time going backwards
(ARM DDI 0487G.b D11.1.2). While there have been a few 64bit SoCs that have
bugs (rust-lang#49281, rust-lang#56940) which cause time to not monotonically increase, these have
been fixed in the Linux kernel and we shouldn't penalize all Arm SoCs for those
who refuse to update their kernels:
SUN50I_ERRATUM_UNKNOWN1 - Allwinner A64 / Pine A64 - fixed in 5.1
FSL_ERRATUM_A008585 - Freescale LS2080A/LS1043A - fixed in 4.10
HISILICON_ERRATUM_161010101 - Hisilicon 1610 - fixed in 4.11
ARM64_ERRATUM_858921 - Cortex A73 - fixed in 4.12

255a3f3 std: Force `Instant::now()` to be monotonic added a Mutex to work around
this problem and a small test program using glommio shows the majority of time spent
acquiring and releasing this Mutex. 3914a7b tries to improve this, but actually
makes it worse on big systems as for 128b atomics a ldxp/stxp pair (and successful loop)
for v8.4 systems that don't support FEAT_LSE2 is required which is expensive as a lock
and because of how the load/store-exclusives scale on large Arm systems is both unfair
to threads and tends to go backwards in performance.

A small sample program using glommio improves by 70x on a 32 core Graviton2
system with this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants