Bug 2240371 - ICE in LTO when building odio-sacd
Summary: ICE in LTO when building odio-sacd
Keywords:
Status: CLOSED EOL
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:
: 2243158 (view as bug list)
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2023-09-23 14:31 UTC by Davide Cavalca
Modified: 2025-05-16 07:44 UTC (History)
17 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-16 07:44:17 UTC
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.

Comment 6 Dan Horák 2024-10-02 17:16:51 UTC
In theory it could be a race condition between the gcc producer and consumer processes, because I haven't seen an issue in my tests (2x 10 runs) when doing a "serial" build (passing -j1 to make).

Comment 7 Cristian Le 2024-11-08 17:33:05 UTC
*** Bug 2243158 has been marked as a duplicate of this bug. ***

Comment 8 Cristian Le 2024-11-08 17:39:37 UTC
Any updates on this issue. There are other builds that have similar failures, probably worth marking them duplicate of this and concentrate the discussion, reproducibility wise, cp2k should be fairly reproducible probably due to its size.

Comment 9 Dan Horák 2024-11-08 17:41:27 UTC
I don't think 2243158 is a duplicate of this one. The symptoms are quite different.

Comment 10 Aoife Moloney 2025-04-25 10:07:57 UTC
This message is a reminder that Fedora Linux 40 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '40'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 40 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 11 Aoife Moloney 2025-05-16 07:44:17 UTC
Fedora Linux 40 entered end-of-life (EOL) status on 2025-05-13.

Fedora Linux 40 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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