Bug 922974

Summary: Rebuilding mksh using GCC 4.8 causes cc in permanent 99.9% CPU usage
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: awilliam, jakub, law, redhat, robatino, tg
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: RejectedBlocker
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-17 01:56:13 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
build.log none

Description Robert Scheck 2013-03-18 22:00:38 UTC
Description of problem:
Rebuilding mksh using GCC 4.8 causes cc in permanent 99.9% CPU usage, the CPU
usage from the mockbuild in koji was told me by Nirik after requesting it.

[...]
cc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-
tables -DMKSH_DISABLE_EXPERIMENTAL -DMKSH_GCC55009 -fno-asynchronous-unwind-
tables -fno-strict-aliasing -fstack-protector-all -flto=jobserver -Wall 
-fwrapv  -fuse-linker-plugin -o mksh  lalloc.o eval.o exec.o expr.o funcs.o 
histrap.o jobs.o lex.o main.o misc.o shf.o syn.o tree.o var.o edit.o strlcpy.o  
|| for _f in ${tcfn}*; do case $_f in 
Build.sh|check.pl|check.t|dot.mkshrc|*.c|*.h|mksh.1) ;; *) rm -f "$_f" ;; esac; 
done
[never comes back, koji/mock timeout kills the process after a long time]

As this worked with older GCC versions fine, I feel this could be a bug in
our new GCC 4.8 - that's the only really new involved/changed component...

Version-Release number of selected component (if applicable):
gcc-4.8.0-0.17.fc20  
mksh-44-1.fc20

How reproducible:
Everytime, fire a scratch build in the Fedora buildsystem for example, the
issue can be triggered via "-c lto" to Build.sh (thus "-flto=jobserver"), but
requires i686, because it builds on x86_64 fine.

Actual results:
No successful rebuild.

Expected results:
Successful rebuild.

Comment 1 Robert Scheck 2013-03-18 22:08:24 UTC
Created attachment 712291 [details]
build.log

Comment 2 Robert Scheck 2013-03-18 22:19:36 UTC
Please note that mksh-44-1.fc19 and mksh-44-1.fc20 avoid using "-c lto" for
the time being, thus a minor spec file change is required before rebuilding
the SRPM.

Comment 3 Robert Scheck 2013-05-01 19:55:46 UTC
This issue still exists with gcc-4.8.0-0.18.fc20 and gcc-4.8.0-2.fc19

Comment 4 Adam Williamson 2013-05-03 00:59:19 UTC
Robert: can you please provide a rationale as to why this bug ought to block the release? It's obviously a significant issue for devel, but there's no obvious reason for it to block the compose/release process. Thanks.

Comment 5 Adam Williamson 2013-05-06 16:40:26 UTC
Discussed at 2013-05-06 blocker review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2013-05-06/f19beta-blocker-review-3.2013-05-06-16.02.log.txt . Rejected as a blocker: we can see no way in which this impacts the release criteria at all, and no reason to hold up a release for it. It would be fine to fix this with an update, so far as we can see.

Comment 6 Thorsten Glaser 2013-07-24 12:35:30 UTC
I can confirm that this must be a GCC upstream bug… it’s entering Debian now too. Maybe someone with a fast box can bisect GCC or something.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717734

Comment 7 Thorsten Glaser 2013-08-15 20:13:54 UTC
This appears to have hit openSUSE_Factory now, but only on i386 (“i586”) not amd64 (unless compiler versions differ; the OpenSuSE Buildservice is a bit of a blackbox).

I’d really appreciate if someone with a fast box can bisect this in GCC then report it upstream. I do not have a fast box; compiling GCC takes most of a day for me.

Comment 8 Thorsten Glaser 2013-08-17 21:34:15 UTC
Judging from the OpenSuSE Buildservice logs, this seems to not be a busy-spin but (after about 15000 seconds) virtual memory exhaustion (probably a nōn-terminating optimisation pass).

Comment 9 Thorsten Glaser 2013-08-21 09:21:37 UTC
This is caused by not just using LTO but also -g – without -g it’s still noticeably slower than not using LTO, but terminates within several seconds (on a 3 GHz machine).


To add insult to injury…

gcc version 4.9.0 20130731 (experimental) [trunk revision 201378] (Debian 20130731-1)

… in this (gcc-snapshot, i.e. without Debian-specific patches), LTO terminates in reasonable time again (both without and with -g) but produces executables that just segfault (on i386).

I’m seriously annoyed at GCC breaking first -fwhole-program --combine then LTO such oftenly.

Comment 10 Fedora End Of Life 2013-09-16 13:14:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 11 Fedora End Of Life 2015-05-29 08:56:15 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. 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 Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Robert Scheck 2015-05-29 08:58:00 UTC
The issues also exists with Fedora 21, reassigning. Jakub, can you please
take care of this?

Comment 13 Fedora End Of Life 2015-11-04 11:45:11 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. 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 Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Fedora End Of Life 2015-12-02 02:45:23 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 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 please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

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

Comment 15 Fedora End Of Life 2017-02-28 09:33:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 16 Fedora End Of Life 2018-02-20 15:38:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 17 Ben Cotton 2019-02-19 17:12:11 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 30 development cycle.
Changing version to '30.

Comment 18 Ben Cotton 2020-04-30 22:16:33 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
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
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 19 Thorsten Glaser 2020-04-30 23:41:31 UTC
This can be closed, we disabled LTO, first Robert in the package, and recently I upstream (because it breaks too often).

Comment 20 Robert Scheck 2020-05-17 01:56:13 UTC
Unfortunately Jakub as package maintainer never paid attention over 7+ years to this bug report as it seems ;-(