Bug 1193212

Summary: ARM: lto1: internal compiler error: Segmentation fault
Product: [Fedora] Fedora Reporter: Lennart Poettering <lpoetter>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: davejohansen, jakub, kevin, law, mpolacek, mschmidt, pbrobinson, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: armv7hl   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-5.0.0-0.17.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 18:22:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/tmp/cccnhdY0.out none

Description Lennart Poettering 2015-02-16 21:41:29 UTC
https://kojipkgs.fedoraproject.org//work/tasks/4667/8954667/build.log

lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Makefile:12414: recipe for target 'systemd-stdio-bridge' failed
make[2]: *** [systemd-stdio-bridge] Error 1
make[2]: *** Waiting for unfinished jobs....

Comment 1 Kevin Fenzi 2015-02-16 22:54:44 UTC
When disabling ld.gold it also segfaults: 

https://kojipkgs.fedoraproject.org//work/tasks/5626/8955626/build.log

Will attach the  /tmp/cccnhdY0.out

Comment 2 Kevin Fenzi 2015-02-16 22:55:15 UTC
Created attachment 992406 [details]
/tmp/cccnhdY0.out

Comment 3 Michal Schmidt 2015-02-17 16:13:40 UTC
I have doubts whether the upstream bug is the same bug, because I tried doing a scratch build of systemd with "-Wformat=0 -Wno-format-security" appended to CFLAGS and gcc still segfaulted:
http://koji.fedoraproject.org/koji/taskinfo?taskID=8967974

Anyway, I will retry with gcc-5.0.0-0.15.fc22 when it's in the buildroot.

Comment 4 Jakub Jelinek 2015-02-17 16:15:42 UTC
All I did was grab Kevin's #c2 dump and look at it in a local cross-compiler, where it died on the spot which Marek fixed.

Comment 5 Michal Schmidt 2015-02-18 09:50:07 UTC
gcc-5.0.0-0.15.fc22 still segfaults when building systemd on arm:
http://koji.fedoraproject.org/koji/taskinfo?taskID=8978884

From the build.log it seems gcc did not produce any /tmp/cc*.log files.

Not sure how to extract more useful information from Koji.
I reserved an arm machine in Beaker to try to reproduce the crash there.

Comment 6 Jakub Jelinek 2015-02-18 09:52:49 UTC
I've managed to reproduce this on aarch64 (if it is the same issue), and commented in http://gcc.gnu.org/PR65012 with my findings.

Comment 7 Michal Schmidt 2015-02-18 17:23:27 UTC
systemd really was affected by both of the upstream bugs.
Upstream gcc bz65066 is fixed in gcc-5.0.0-0.15.fc22 and
gcc bz65012 can be worked around by building systemd on arm
without LTO, which I now did, in systemd-219-3.fc2[23].

Comment 8 Peter Robinson 2015-02-18 17:26:27 UTC
(In reply to Michal Schmidt from comment #7)
> systemd really was affected by both of the upstream bugs.
> Upstream gcc bz65066 is fixed in gcc-5.0.0-0.15.fc22 and
> gcc bz65012 can be worked around by building systemd on arm
> without LTO, which I now did, in systemd-219-3.fc2[23].

We saw the same issue with gcc 4.9 with LTO on systemd, maybe upstream gcc could add some tests for this so we don't regress again

Comment 9 Michal Schmidt 2015-02-25 13:32:30 UTC
The bug appears fixed in gcc-5.0.0-0.16.fc23.
I reenabled LTO in systemd-219-7.fc23 and built it successfully:
http://koji.fedoraproject.org/koji/taskinfo?taskID=9068577

For F22 I see gcc-5.0.0-0.16.fc22 is built and tagged f22-updates-candidate, but not yet submitted to Bodhi.

Comment 10 Fedora Update System 2015-02-27 15:06:17 UTC
gcc-5.0.0-0.17.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/gcc-5.0.0-0.17.fc22

Comment 11 Fedora Update System 2015-02-27 19:43:26 UTC
Package gcc-5.0.0-0.17.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gcc-5.0.0-0.17.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-2759/gcc-5.0.0-0.17.fc22
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2015-03-05 18:22:27 UTC
gcc-5.0.0-0.17.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.