kornelski / cavif-rs

AVIF image creator in pure Rust

Home Page:https://lib.rs/cavif

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building with Rust Nightly hangs forever

MatteoJoliveau opened this issue · comments

Hi! I don't know if this crate officially supports nightly as a build channel, but since I didn't see anything against in the README I figured I'd open an issue anyway.

I have a project using ravif through image-rs that fails to build in release mode. The build hangs forever as seen in the screenshot below, and will stay there indefinitely (I left my lust build running overnight and this morning it was still stuck in the same point).

image

I was able to reproduce it in this repo by:

  • cloning https://github.com/kornelski/cavif-rs
  • setting the following in rust-toolchain.toml
[toolchain]
channel = "nightly"
targets = [ "x86_64-unknown-linux-gnu" ]
  • running cd ravif && cargo build --release

Here's some versions as additional context:

  • OS: NixOS 23.05.20230820.475d5ae (Stoat) x86_64 (Linux 6.1.46)
  • Rust: rustc 1.74.0-nightly (65ea825f4 2023-09-18) cargo 1.74.0-nightly (b4ddf95ad 2023-09-18)
  • Git commit: a0a3652ce8a36d4aee9c5da2ab35b4e97cd20fea (HEAD at the time of writing)

Let me know if you need any more information. Thanks in advance for your help!

commented

It's stuck in LLVM:

194.55 Gc   96.5%	194.55 Gc	 	 llvm::DominatorTreeBase<llvm::BasicBlock, false>::updateDFSNumbers() const
194.35 Gc   96.4%	-	 	  llvm::IDFCalculatorBase<llvm::BasicBlock, false>::calculate(llvm::SmallVectorImpl<llvm::BasicBlock*>&)
194.35 Gc   96.4%	-	 	   llvm::MemorySSAUpdater::applyInsertUpdates(llvm::ArrayRef<llvm::cfg::Update<llvm::BasicBlock*>>, llvm::DominatorTree&, llvm::GraphDiff<llvm::BasicBlock*, false> const*)
194.35 Gc   96.4%	-	 	    llvm::MemorySSAUpdater::updateExitBlocksForClonedLoop(llvm::ArrayRef<llvm::BasicBlock*>, llvm::ArrayRef<std::__1::unique_ptr<llvm::ValueMap<llvm::Value const*, llvm::WeakTrackingVH, llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false>>>, std::__1::default_delete<llvm::ValueMap<llvm::Value const*, llvm::WeakTrackingVH, llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false>>>>>>, llvm::DominatorTree&)
194.35 Gc   96.4%	-	 	     unswitchNontrivialInvariants(llvm::Loop&, llvm::Instruction&, llvm::ArrayRef<llvm::Value*>, llvm::IVConditionInfo&, llvm::DominatorTree&, llvm::LoopInfo&, llvm::AssumptionCache&, llvm::function_ref<void (bool, bool, llvm::ArrayRef<llvm::Loop*>)>, llvm::ScalarEvolution*, llvm::MemorySSAUpdater*, llvm::function_ref<void (llvm::Loop&, llvm::StringRef)>, bool)
194.35 Gc   96.4%	-	 	      unswitchBestCondition(llvm::Loop&, llvm::DominatorTree&, llvm::LoopInfo&, llvm::AssumptionCache&, llvm::AAResults&, llvm::TargetTransformInfo&, llvm::function_ref<void (bool, bool, llvm::ArrayRef<llvm::Loop*>)>, llvm::ScalarEvolution*, llvm::MemorySSAUpdater*, llvm::function_ref<void (llvm::Loop&, llvm::StringRef)>)
194.35 Gc   96.4%	-	 	       unswitchLoop(llvm::Loop&, llvm::DominatorTree&, llvm::LoopInfo&, llvm::AssumptionCache&, llvm::AAResults&, llvm::TargetTransformInfo&, bool, bool, llvm::function_ref<void (bool, bool, llvm::ArrayRef<llvm::Loop*>)>, llvm::ScalarEvolution*, llvm::MemorySSAUpdater*, llvm::ProfileSummaryInfo*, llvm::BlockFrequencyInfo*, llvm::function_ref<void (llvm::Loop&, llvm::StringRef)>)
194.35 Gc   96.4%	-	 	        llvm::SimpleLoopUnswitchPass::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&)
194.35 Gc   96.4%	-	 	         std::__1::optional<llvm::PreservedAnalyses> llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::runSinglePass<llvm::Loop, std::__1::unique_ptr<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>, std::__1::default_delete<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>>>>(llvm::Loop&, std::__1::unique_ptr<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>, std::__1::default_delete<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>>>&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&, llvm::PassInstrumentation&)
194.35 Gc   96.4%	-	 	          llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::runWithoutLoopNestPasses(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&)
194.35 Gc   96.4%	-	 	           llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&)
194.35 Gc   96.4%	-	 	            llvm::FunctionToLoopPassAdaptor::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&)
194.35 Gc   96.4%	-	 	             llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&)
194.35 Gc   96.4%	-	 	              llvm::CGSCCToFunctionPassAdaptor::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
194.35 Gc   96.4%	-	 	               llvm::PassManager<llvm::LazyCallGraph::SCC, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
194.35 Gc   96.4%	-	 	                llvm::DevirtSCCRepeatedPass::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
194.35 Gc   96.4%	-	 	                 llvm::ModuleToPostOrderCGSCCPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)
194.35 Gc   96.4%	-	 	                  llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)
194.35 Gc   96.4%	-	 	                   llvm::ModuleInlinerWrapperPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)
194.35 Gc   96.4%	-	 	                    llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)
194.35 Gc   96.4%	-	 	                     LLVMRustOptimize
194.35 Gc   96.4%	-	 	                      _RNvNtNtCslVCRTO4GVQO_18rustc_codegen_llvm4back5write13llvm_optimize