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

Rust bootstrap hangs forever while compiling stage1 librustc_mir with >1 CGU units #47500

Closed
petrochenkov opened this issue Jan 16, 2018 · 8 comments
Labels
A-codegen Area: Code generation

Comments

@petrochenkov
Copy link
Contributor

Reproduces on x86_64-pc-windows-gnu with default config.toml, doesn't happen if codegen-units = 1 are added.

Building stage1 compiler artifacts (x86_64-pc-windows-gnu -> x86_64-pc-windows-gnu)
   ...
   Compiling rustc_mir v0.0.0 (file:///C:/msys64/home/we/rust/src/librustc_mir)

Stack trace:

Attaching to process 1780
[New Thread 1780.0x1b7c]
[New Thread 1780.0xb1c]
[New Thread 1780.0x1d60]
[New Thread 1780.0x19c4]
[New Thread 1780.0x444]
[New Thread 1780.0x1bd8]
Reading symbols from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc.exe...done.
0x00007ff8d2642281 in ntdll!DbgBreakPoint ()
   from C:\Windows\SYSTEM32\ntdll.dll
(gdb) info thread
  Id   Target Id         Frame
* 6    Thread 1780.0x1bd8 0x00007ff8d2642281 in ntdll!DbgBreakPoint ()
   from C:\Windows\SYSTEM32\ntdll.dll
  5    Thread 1780.0x444 0x00000000038933e9 in llvm::DominatorTree::dominates(llvm::Instruction const*, llvm::Instruction const*) const ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
  4    Thread 1780.0x19c4 0x00007ff8d264221a in ntdll!ZwWaitForAlertByThreadId
    () from C:\Windows\SYSTEM32\ntdll.dll
  3    Thread 1780.0x1d60 0x00007ff8d264221a in ntdll!ZwWaitForAlertByThreadId
    () from C:\Windows\SYSTEM32\ntdll.dll
  2    Thread 1780.0xb1c 0x00007ff8d264221a in ntdll!ZwWaitForAlertByThreadId
    () from C:\Windows\SYSTEM32\ntdll.dll
  1    Thread 1780.0x1b7c 0x00007ff8d264079a in ntdll!ZwWaitForSingleObject ()
   from C:\Windows\SYSTEM32\ntdll.dll
(gdb) thread 5
[Switching to thread 5 (Thread 1780.0x444)]
#0  0x00000000038933e9 in llvm::DominatorTree::dominates(llvm::Instruction const*, llvm::Instruction const*) const ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
(gdb) where
#0  0x00000000038933e9 in llvm::DominatorTree::dominates(llvm::Instruction const*, llvm::Instruction const*) const ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#1  0x000000000324db30 in llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(llvm::Loop const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#2  0x000000000324160b in llvm::ScalarEvolution::getZeroExtendExpr(llvm::SCEV const*, llvm::Type*) ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#3  0x00000000033bd10f in llvm::simplifyUsersOfIV(llvm::PHINode*, llvm::ScalarEvolution*, llvm::DominatorTree*, llvm::LoopInfo*, llvm::SmallVectorImpl<llvm::WeakVH>&, llvm::IVVisitor*) ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#4  0x0000000002bf86ff in (anonymous namespace)::IndVarSimplify::simplifyAndExtend(llvm::Loop*, llvm::SCEVExpander&, llvm::LoopInfo*) [clone .constprop.438]
    ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#5  0x0000000002bfe3e9 in (anonymous namespace)::IndVarSimplify::run(llvm::Loop*) [clone .part.422] ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#6  0x0000000002e05c56 in (anonymous namespace)::IndVarSimplifyLegacyPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) [clone .part.423] ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#7  0x000000000310563f in llvm::LPPassManager::runOnFunction(llvm::Function&)
    ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#8  0x00000000030f830f in llvm::FPPassManager::runOnFunction(llvm::Function&)
    ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#9  0x0000000002bb74b2 in (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#10 0x00000000036760a6 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#11 0x00000000027d3239 in LLVMRunPassManager ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_llvm-893cdac51017c26f.dll
#12 0x000000006a2ff765 in rustc_trans::back::lto::run_pass_manager::ha9ac3996c7d0c27d ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_trans-9dbf48abd39e3863.dll
#13 0x000000006a2fc473 in rustc_trans::back::lto::LtoModuleTranslation::optimize::h719e586b1cc5ebba ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_trans-9dbf48abd39e3863.dll
#14 0x000000006a3e65a9 in rustc_trans::back::write::execute_work_item::h5b3d73b59b481809 ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_trans-9dbf48abd39e3863.dll
#15 0x000000006a3af743 in std::sys_common::backtrace::__rust_begin_short_backtrace::h612d8b59f6a133dd ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_trans-9dbf48abd39e3863.dll
#16 0x000000006a3cb509 in std::panicking::try::do_call::hc93086c132a5a3ea ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_trans-9dbf48abd39e3863.dll
#17 0x000000006ec4c4a9 in __rust_maybe_catch_panic ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\std-b1b09a5d7798628b.dll
#18 0x000000006a3d7fb9 in _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h30ec2bcae50c9446 ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\rustc_trans-9dbf48abd39e3863.dll
#19 0x000000006ec140f0 in std::sys_common::thread::start_thread::h55c7159741396635 ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\std-b1b09a5d7798628b.dll
#20 0x000000006ec40769 in std::sys::windows::thread::Thread::new::thread_start::hecbc47bdd027efcc ()
   from C:\msys64\home\we\rust\build\x86_64-pc-windows-gnu\stage1\bin\std-b1b09a5d7798628b.dll
#21 0x00007ff8d1b413d2 in KERNEL32!BaseThreadInitThunk ()
   from C:\Windows\system32\kernel32.dll
#22 0x00007ff8d25c54f4 in ntdll!RtlUserThreadStart ()
   from C:\Windows\SYSTEM32\ntdll.dll
#23 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
@petrochenkov petrochenkov added the A-codegen Area: Code generation label Jan 16, 2018
@petrochenkov
Copy link
Contributor Author

cc @alexcrichton @michaelwoerister

@petrochenkov
Copy link
Contributor Author

This is a regression from maybe couple of weeks or so.

@alexcrichton
Copy link
Member

Is this perhaps related to #46449 where #47220 isn't included in beta yet?

@michaelwoerister
Copy link
Member

Looks like it.

@michaelwoerister
Copy link
Member

@nagisa, do you have time to do a backport of #47220?

@alexcrichton
Copy link
Member

@petrochenkov is this still an issue?

@petrochenkov
Copy link
Contributor Author

@alexcrichton
Yes, this is still an issue.

@petrochenkov
Copy link
Contributor Author

This was fixed somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation
Projects
None yet
Development

No branches or pull requests

3 participants