Bug 2240371 - ICE in LTO when building odio-sacd
Summary: ICE in LTO when building odio-sacd
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2023-09-23 14:31 UTC by Davide Cavalca
Modified: 2024-04-11 15:40 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Davide Cavalca 2023-09-23 14:31:09 UTC
See https://koji.fedoraproject.org/koji/taskinfo?taskID=106585307 for an example

+ cd odio-sacd-23.1.31
+ /usr/bin/make -O -j8 V=1 VERBOSE=1
gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection  -Wall   -c -o src/main.o src/main.c
gcc -c -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection  -Wall src/main.c -o src/main.o
gcc -o data/usr/bin/odio-sacd src/main.o -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes  -lodiosacd
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_FINISH_UNIT               | annobin: Generate final annotations
PLUGIN_START_UNIT                | annobin: Generate global annotations
PLUGIN_ALL_PASSES_START          | annobin: Generate per-function annotations
PLUGIN_ALL_PASSES_END            | annobin: Register per-function end symbols
lto1: internal compiler error: resolution sub id 0x225b954a157b57a1 not in object file
Please submit a full bug report, with preprocessed source.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [Makefile:16: odio-sacd] Error 1

Reproducible: Always

Comment 1 Dan Horák 2023-09-25 12:25:07 UTC
This is interesting, I have reproduced the ICE only once in 5 my local mock builds ...

I would go with disabling LTO for ppc64le as a workaround (%global _lto_cflags %nil), it has no benefits in this single source file project I believe ...

Comment 2 Dan Horák 2023-09-25 12:34:19 UTC
and also got a success in koji https://koji.fedoraproject.org/koji/taskinfo?taskID=106686380 (after the 1st attempt failed)

Comment 3 Dominik 'Rathann' Mierzejewski 2023-09-25 19:51:23 UTC
I found it easy to reproduce on koji.
It looks like it's failing on i686 and aarch64, too:
https://koji.fedoraproject.org/koji/taskinfo?taskID=106586400
even after ppc64le was excluded.

Comment 4 Aoife Moloney 2024-02-15 22:58:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 5 Dan Horák 2024-04-11 15:40:11 UTC
I have run another check and out of 10 scratch builds there were 3 builds that failed, one on x86_64, another on ppc64le and s390x and the third on ppc64le. So the issue is clearly still there and still not easily reproducable. I am going to disable LTO as a workaround.


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