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
Error while compile firefox - crash backtrace for analysis #87894
Comments
Could you please try 18 or |
Yes, sure just need compile bunch of packages. Will report asap |
Hi, thanks for the report. Compiler saves 2 files - sh script and the preprocessed source code file, which cause the crass (the names are reported in the end of the crash report). Could you, please, copy them and attach them to this bug report? It will help to investigate the crash and will save lots of time. |
@alexey-bataev What are those files? |
By searching in Gentoo bugs, I've found https://bugs.gentoo.org/925101 |
Can you try to invoke the compiler manually and add -Wl,-plugin-opt=-print-on-crash -mllvm -print-module-scope -Wl,-plugin-opt=-print-on-crash-path=repro.ll?
It should produce repro.ll file, that causes the crash |
Yes, it will take a while. |
Sure, let's see if this one works |
Here:
|
With
In fact, seeing
So, maybe the key of the problem is this |
@alexey-bataev should we switch to #84062 ? This issue is closed. |
I reopened it, we can continue discussion here. Will check your info on Monday. |
My system is musl based and don't support multilib. Since the workaround disables gpu acceleration when pgo, this bug may be related to the crashed process writing incorrect pgo profile files |
Sorry, provided a bit incorrect flags. Here is the right one:
Need to use |
|
Check if there is a file repro.ll |
@alexey-bataev Sorry, I haven't added, but no repro.ll. |
So, maybe it crashes on another linking command. Need to rebuild the firefox with the correct flags (-Wl,-plugin-opt=) |
Unfortunately, I don't have enough knowledge to do this. I've never touched firefox build system. |
No, I don't ask you to do it. Can you reproduce a crash manually? |
What exactly should I run? |
I'm just asking if you can reproduce the crash manually. If you run |
We do a lot of nose. Maybe it will better to switch in PM? |
Ok, where do you want to discuss it? |
Status update on our experimentations with Alex. After a little investigation, we found the problematic command (each option is on its own line for visibility):
Alex proposed to add these options to the command:
The crash was reproduced, but unfortunately, the
Next, Alex proposed to use other options instead of
The crash was reproduced, but it wasn't enough to analyze the source of the problem. |
I can confirm the same (or very similar) issue when compiling Firefox 125.x with PGO and LTO. It happens both with clang17 and clang18 running an up-to-date Arch Linux installation. The error seems to happen when compiling (not linking) the Firefox source file I tried passing I haven't tried yet passing these parameters to the whole build and currently I do not have access to my build machine, so for the moment I can't provide the exact info. My CFLAGS are the default Arch CFLAGS [2] except for [1] https://hg.mozilla.org/releases/mozilla-release/file/tip/dom/canvas/DrawTargetWebgl.cpp |
If the compiler crashes at source file, it should save the shell script and the preprocessed source file. The source file itself does not help, need the preprocessed output, generated by the comnpiler |
Finally found the reproducer and was able to reproduce the crash with 17.0.4 and 18.1.5. But the crash does not reproduce with the trunk, looks like the issue is fixed already and it will be fixed in llvm 19.0 |
The issue does NOT appear if I append
to the CFLAGS. Build finishes normally without errors. @alexey-bataev, thanks for the feedback, maybe we can find out what commit fixed this issue and have it backported to the still active 18.x branch? EDIT: It also needs |
I tried to identify the fix, but there are too many potential candidates with too many dependencies. I can try to prepare a fix but it won't be a backport, it will be completely separate patch |
Hello there! I am not a programmer, but got this error - please, investigate, may be it will help to make product better.
I used sys-devel/llvm 17.0.6 + polly
System uname: Linux-6.8.4-gentoo-simple-gcc-x86_64-13th_Gen_Intel-R-_Core-TM-_i5-1335U-with-glibc2.38
python 3.11.9-final-0, default/linux/amd64/23.0/split-usr/hardened, gcc-13, glibc-2.38-r11, 6.8.4-gentoo-simple-gcc x86_64
Please, let me know what kind of another logs (settings) I should provide.
14:07.13 PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. 14:07.20 #0 0x00007bb5bcd68406 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xd68406) 14:07.20 #1 0x00007bb5bcd652af llvm::sys::RunSignalHandlers() (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xd652af) 14:07.20 #2 0x00007bb5bcd653fd (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xd653fd) 14:07.20 #3 0x00007bb5c744d2e0 (/lib64/libc.so.6+0x3e2e0) 14:07.20 #4 0x00007bb5be78969f llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x278969f) 14:07.20 #5 0x00007bb5be78cfa4 llvm::slpvectorizer::BoUpSLP::vectorizeOperand(llvm::slpvectorizer::BoUpSLP::TreeEntry*, unsigned int) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x278cfa4) 14:07.20 #6 0x00007bb5be78a611 llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x278a611) 14:07.21 #7 0x00007bb5be78d994 llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::MapVector<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u>, llvm::DenseMap<llvm::Value*, unsigned int, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, unsigned int>>, llvm::SmallVector<std::pair<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u>>, 0u>> const&, llvm::SmallVectorImpl<std::pair<llvm::Value*, llvm::Value*>>&, llvm::Instruction*) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x278d994) 14:07.21 #8 0x00007bb5be790d25 llvm::slpvectorizer::BoUpSLP::vectorizeTree() (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x2790d25) 14:07.21 #9 0x00007bb5be79bef8 llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, bool) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x279bef8) 14:07.21 #10 0x00007bb5be79e931 (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x279e931) 14:07.21 #11 0x00007bb5be7a973d llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x27a973d) 14:07.21 #12 0x00007bb5be7ab3d0 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x27ab3d0) 14:07.22 #13 0x00007bb5be7abbcc llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x27abbcc) 14:07.22 #14 0x00007bb5c07ce4f6 (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x47ce4f6) 14:07.22 #15 0x00007bb5bf7ab098 (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x37ab098) 14:07.22 #16 0x00007bb5bcf6b92e llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xf6b92e) 14:07.22 #17 0x00007bb5bf78ebb6 (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x378ebb6) 14:07.22 #18 0x00007bb5bcf69968 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xf69968) 14:07.22 #19 0x00007bb5bec398e1 (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x2c398e1) 14:07.22 #20 0x00007bb5bec3cb4e (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x2c3cb4e) 14:07.23 #21 0x00007bb5bec3d89a llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::MallocAllocator> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x2c3d89a) 14:07.23 #22 0x00007bb5bec200af (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x2c200af) 14:07.23 #23 0x00007bb5bec2fd9d (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0x2c2fd9d) 14:07.23 #24 0x00007bb5bcc1cd16 (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xc1cd16) 14:07.23 #25 0x00007bb5bcce9e96 llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xce9e96) 14:07.23 #26 0x00007bb5bccea8d7 (/usr/lib/llvm/17/bin/../lib64/libLLVM-17.so+0xcea8d7) 14:07.23 #27 0x00007bb5c749b9c4 (/lib64/libc.so.6+0x8c9c4) 14:07.23 #28 0x00007bb5c750f1cc (/lib64/libc.so.6+0x1001cc) 14:07.30 Failed to hack libxul.so: basic_ios::clear: iostream error 14:07.30 x86_64-pc-linux-gnu-clang++-17: error: linker command failed with exit code 1 (use -v to see invocation) 14:07.31 gmake[4]: *** [/var/tmp/notmpfs/portage/www-client/firefox-124.0.2/work/firefox-124.0.2/config/rules.mk:541: libxul.so] Error 1 14:07.31 gmake[4]: Leaving directory '/var/tmp/notmpfs/portage/www-client/firefox-124.0.2/work/firefox_build/toolkit/library/build' 14:07.31 gmake[3]: *** [/var/tmp/notmpfs/portage/www-client/firefox-124.0.2/work/firefox-124.0.2/config/recurse.mk:72: toolkit/library/build/target] Error 2 14:07.31 gmake[3]: Leaving directory '/var/tmp/notmpfs/portage/www-client/firefox-124.0.2/work/firefox_build' 14:07.31 gmake[2]: *** [/var/tmp/notmpfs/portage/www-client/firefox-124.0.2/work/firefox-124.0.2/config/recurse.mk:34: compile] Error 2 14:07.31 gmake[2]: Leaving directory '/var/tmp/notmpfs/portage/www-client/firefox-124.0.2/work/firefox_build' 14:07.31 gmake[1]: *** [/var/tmp/notmpfs/portage/www-client/firefox-124.0.2/work/firefox-124.0.2/config/rules.mk:361: default] Error 2 14:07.31 gmake[1]: Leaving directory '/var/tmp/notmpfs/portage/www-client/firefox-124.0.2/work/firefox_build' 14:07.31 gmake: *** [client.mk:60: build] Error 2
Thanks!
The text was updated successfully, but these errors were encountered: