Summary: | sys-devel/clang-17.0.1: Hangs when compiling dev-libs/nss-3.93 with -O2 -march=skylake | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | David Carlos Manuelda <StormByte> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | contyk, ionen, mozilla, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/llvm/llvm-project/issues/67333 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 912821 | ||
Attachments: |
emerge --info
build.log sha512.c preprocessed |
Description
David Carlos Manuelda
2023-09-25 11:40:43 UTC
Created attachment 871378 [details]
emerge --info
Created attachment 871379 [details]
build.log
* Also tested without ccache with same behaviour I actually just woke up earlier to nss build being stuck on a single thread in my llvm-musl chroot w/ clang:17 after going like that for like 8 hours, figure I hit the same thing. Updated fine after I did CC=clang-16 / CXX=clang++16 but did not dig further into it. (In reply to Ionen Wolkens from comment #4) > I actually just woke up earlier to nss build being stuck on a single thread > in my llvm-musl chroot w/ clang:17 after going like that for like 8 hours, > figure I hit the same thing. Updated fine after I did CC=clang-16 / > CXX=clang++16 but did not dig further into it. ... and seems I can reproduce easily on my regular (non-musl/llvm profile) system as well if I just pick a clang 17 toolchain. Seems to build fine if don't pass -march=native (aka hangs with what is effectively `-march=skylake -O2` for me, just -O2 is fine) For reproducing without portage, seems this was sufficient (needs dev-util/gyp): nss-3.93/nss$ CFLAGS="-march=skylake -O2" ./build.sh --system-nspr --clang [1247/1264] LINK /root/nss-3.93/dist/Debug/bin/ssl_gtest (hang) Haven't looked further to reduce more. Created attachment 871392 [details]
sha512.c preprocessed
I've added the -E option to the generated command line to the affected compile unit to make the preprocessed output which, in theory, can be tested in any system with Clang without any of its dependencies (because it will be compiled with -c just as an intermediate object) for further testing.
I reported it upstream in the hope this can be addressed better killed here a emerge process after 3 hours too at a tinderbox image For bonus points, Cvise with timeout? (In reply to Sam James from comment #10) > For bonus points, Cvise with timeout? I've hopefully done it well enough: https://github.com/llvm/llvm-project/issues/67333#issuecomment-1734707805. I don't think it's really an infinite loop, I think it just scales very very poorly with some code which is why the smaller reproducers still take an outsized amount of time (but do complete). Fixed by: commit 289280527735926a78b97688e3548cf2ca2a87fe Author: Michał Górny <mgorny@gentoo.org> Date: Wed Oct 4 18:16:00 2023 +0200 sys-devel/llvm: Backport hang fix on skylake Signed-off-by: Michał Górny <mgorny@gentoo.org> I'll keep it open for a little bit for visibility. -march=znver2 is also affected. I have also been affected by this on my Ryzen 3700X when compiling nss-3.94 today. Issue closed upstream by merging backported patch so now there are two options: a) Apply the backported patch (tested ok to current 17.0.2) and remove mask b) Just wait 1 week for next release (In reply to David Carlos Manuelda from comment #14) > Issue closed upstream by merging backported patch so now there are two > options: > a) Apply the backported patch (tested ok to current 17.0.2) and remove mask We already did: https://bugs.gentoo.org/914657#c12. (In reply to Sam James from comment #15) > (In reply to David Carlos Manuelda from comment #14) > > Issue closed upstream by merging backported patch so now there are two > > options: > > a) Apply the backported patch (tested ok to current 17.0.2) and remove mask > > We already did: https://bugs.gentoo.org/914657#c12. Just realized it, too many things in head, sorry ;) |