Bug 1849165 - gcc crashes during PGO Firefox build
Summary: gcc crashes during PGO Firefox build
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-19 18:10 UTC by Martin Stransky
Modified: 2020-10-05 08:31 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-25 15:12:18 UTC
Type: Bug
Embargoed:
mhroncok: fedora_prioritized_bug?


Attachments (Terms of Use)

Description Martin Stransky 2020-06-19 18:10:39 UTC
Description of problem:
When building Firefox with PGO, gcc crashes in feedback build with:

22:02.22 ../TestJSImplInheritanceGenBinding.cpp: In function ‘_GLOBAL__sub_I_TestJSImplInheritanceGenBinding.cpp’:
22:02.22 ../TestJSImplInheritanceGenBinding.cpp:2911:1: warning: ‘/home/komat/src/objdir-pgo/dom/bindings/test/TestJSImplInheritanceGenBinding.gcda’ profile count data file not found [-Wmissing-profile]
22:02.22  2911 | } // namespace mozilla
22:02.22       | ^
22:02.26 mfbt/tests/TestFunctionTypeTraits
22:02.45 during RTL pass: ira
22:02.48 /home/komat/src/objdir-pgo/dist/include/mozilla/Casting.h: In function ‘BitwiseCast’:
22:02.48 /home/komat/src/objdir-pgo/dist/include/mozilla/Casting.h:64:1: internal compiler error: in to_frequency, at profile-count.c:273
22:02.48    64 | }
22:02.48       | ^
22:02.56 Please submit a full bug report,
22:02.56 with preprocessed source if appropriate.
22:02.56 See <http://bugzilla.redhat.com/bugzilla> for instructions.
22:02.58 make[5]: *** [/tmp/ccCKwxhi.mk:2: /tmp/TestFloatingPoint.sifv8g.ltrans0.ltrans.o] Error 1
22:02.58 lto-wrapper: fatal error: make returned 2 exit status
22:02.58 compilation terminated.
22:02.58 /usr/bin/ld: error: lto-wrapper failed
22:02.58 collect2: error: ld returned 1 exit status
22:02.58 gmake[4]: *** [/home/komat/src/config/rules.mk:517: TestFloatingPoint] Error 1
22:02.58 gmake[4]: *** Waiting for unfinished jobs....


Version-Release number of selected component (if applicable):
gcc-10.1.1-1.fc32.x86_64

I'm not sure how to extract any useful debuginfo data here. Mozilla uses clang to build PGO/LTO FF.

Comment 1 Jakub Jelinek 2020-06-22 07:56:02 UTC
Does it reproduce with current F32 package git src.rpm, or any tweaks are needed?
Does it happen in F33 too (which has slightly newer gcc)?

Comment 2 Martin Stransky 2020-06-22 08:31:02 UTC
It's latest nightly only, I haven't reproduced it with Firefox 77 from Fedora due to other build issues. May be affected as well, I'll post update here. I haven't tested Fedora 33.

Comment 3 Martin Stransky 2020-07-29 08:14:30 UTC
Hi Jakub,

so we hit the gcc bug in recent Firefox at Fedora 32/33. The affected builds are here:

https://koji.fedoraproject.org/koji/taskinfo?taskID=48015864

fails with:

/builddir/build/BUILD/firefox-79.0/objdir/dist/include/mozilla/Casting.h: In function 'BitwiseCast':
/builddir/build/BUILD/firefox-79.0/objdir/dist/include/mozilla/Casting.h:64:1: internal compiler error: in to_frequency, at profile-count.c:273
   64 | }
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [/tmp/cc97Ic0E.mk:2: /tmp/TestFloatingPoint.oQNWgG.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status

all you need to reproduce is just to rebuild Firefox srpm package from

https://koji.fedoraproject.org/koji/taskinfo?taskID=48015953

Thanks.

Comment 4 Miro Hrončok 2020-08-18 12:19:10 UTC
Proposing as prioritized bug, see https://pagure.io/fesco/issue/2020#comment-671672

Comment 5 Jeff Law 2020-08-18 17:38:24 UTC
Just a note, Jakub is on PTO this week, so I wouldn't expect any progress until he returns.

Comment 6 Jakub Jelinek 2020-08-19 09:12:57 UTC
I have tried to reproduce this, but couldn't, firefox-79.0-1 builds just fine on x86_64 when LTO is not on and PGO is on.
With LTO on one runs into the write_type https://gcc.gnu.org/PR96690 ICE.

Comment 7 Jakub Jelinek 2020-08-22 13:52:56 UTC
I have made further 2 attempts and didn't reproduce in either of those.

Comment 8 Martin Stransky 2020-08-24 09:08:14 UTC
Okay, I'll try new builds.

Comment 9 Ben Cotton 2020-08-26 17:29:06 UTC
Since reproducibility is unclear, we deferred decision on accepting as a Prioritized Bug until the next meeting (9 September): https://meetbot.fedoraproject.org/fedora-meeting/2020-08-26/fedora_prioritized_bugs_and_issues.2020-08-26-15.00.log.html#l-38

Comment 10 Ben Cotton 2020-09-09 15:47:02 UTC
Martin, can you provide more information on reproducibility? We're still unsure about whether or not to accept this as a Prioritized Bug: https://meetbot.fedoraproject.org/fedora-meeting/2020-09-09/fedora_prioritized_bugs_and_issues.2020-09-09-15.00.log.html#l-24

Comment 11 Martin Stransky 2020-09-10 06:41:50 UTC
I think we can remove it from Prioritized bugs as PGO works. LTO is still broken.
Thanks.

Comment 12 Jakub Jelinek 2020-09-10 08:47:48 UTC
Depends on which LTO bug you're talking about, the ICE in write_type should be fixed already in f34 and in f33 is stuck, waiting for the testing -> stable push for a week already.
Or do you encounter some other LTO issue (e.g. the known ARM Neon problem)?

Comment 13 Peter Robinson 2020-09-10 09:08:20 UTC
> be fixed already in f34 and in f33 is stuck, waiting for the testing ->
> stable push for a week already.

We're in freeze for beta, so that is expected, but you can tag gcc and any other associated bits (annobin etc) into override, or you can request a freeze exception via https://qa.fedoraproject.org/blockerbugs/

Comment 14 Martin Stransky 2020-09-10 09:47:43 UTC
Can you please submit the gcc lto fix update for Fedora 32 too?
Thanks.

Comment 15 Martin Stransky 2020-09-10 19:15:03 UTC
(In reply to Jakub Jelinek from comment #12)
> Depends on which LTO bug you're talking about, the ICE in write_type should
> be fixed already in f34 and in f33 is stuck, waiting for the testing ->
> stable push for a week already.
> Or do you encounter some other LTO issue (e.g. the known ARM Neon problem)?

LTO seems to build fine on my x86_64/Fedora 33/gcc-10.2.1-3.fc33 so this one can be closed.


Note You need to log in before you can comment on or make changes to this bug.