Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1673018 - gcc: OOM while compiling sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c in glibc
Summary: gcc: OOM while compiling sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c in glibc
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 31
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: 2019-02-06 13:17 UTC by Florian Weimer
Modified: 2020-11-24 16:41 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-24 16:41:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
e_sqrtl.i (253.00 KB, text/plain)
2019-02-06 13:17 UTC, Florian Weimer
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 89225 0 P1 RESOLVED [9 Regression] LRA hang on ppc64le compiling glibc starting with r268404 2020-01-03 18:39:55 UTC

Description Florian Weimer 2019-02-06 13:17:42 UTC
Created attachment 1527523 [details]
e_sqrtl.i

Compiling the attached file with

gcc -c -O2 -fstack-protector-strong e_sqrtl.i

on ppc64le results in an out-of-memory error.

I don't know if this ppc64le-specific because glibc uses ldbl-128ibm only on ppc64le.

The backtrace suggests it could be LRA-related:

(gdb) bt
#0  0x000000001097b348 in lra_create_live_ranges_1(bool, bool) ()
#1  0x0000000010f1dee0 in lra_create_live_ranges(bool, bool) ()
#2  0x0000000010f136ac in lra(_IO_FILE*) ()
#3  0x0000000010ef1f58 in (anonymous namespace)::pass_reload::execute(function*) ()
#4  0x000000001098bdf4 in execute_pass_list_1(opt_pass*) ()
#5  0x000000001098c5c4 in execute_pass_list_1(opt_pass*) ()
#6  0x0000000010f3f068 in execute_pass_list(function*, opt_pass*) ()
#7  0x0000000010e300b4 in cgraph_node::expand() ()
#8  0x0000000010e2ee64 in symbol_table::compile() ()
#9  0x0000000010e2deac in symbol_table::finalize_compilation_unit() ()
#10 0x0000000010f63a10 in compile_file() ()
#11 0x0000000010730e58 in toplev::main(int, char**) ()
#12 0x0000000010732ff4 in main ()
(gdb) finish
Run till exit from #0  0x000000001097b348 in lra_create_live_ranges_1(bool, bool) ()
0x0000000010f1dee0 in lra_create_live_ranges(bool, bool) ()
(gdb) finish
Run till exit from #0  0x0000000010f1dee0 in lra_create_live_ranges(bool, bool) ()
0x0000000010f136ac in lra(_IO_FILE*) ()
(gdb) finish
Run till exit from #0  0x0000000010f136ac in lra(_IO_FILE*) ()

And that never completes.

I don't have full backtraces because I cannot find the debuginfo package for /usr/libexec/gcc/ppc64le-redhat-linux/9/cc1.

Comment 1 Florian Weimer 2019-02-06 13:24:48 UTC
Sorry, this is with gcc-9.0.1-0.3.fc30.ppc64le.

Comment 2 Florian Weimer 2019-02-06 13:36:21 UTC
It turns out that cpp-debuginfo has the debugging information for cc1.  With that, I get:

#0  0x00000000109627ac in lra_constraints (first_p=<optimized out>) a
   t ../../gcc/lra-constraints.c:4763
#1  0x0000000010f131a4 in lra (f=<optimized out>) at ../../gcc/lra.c:2461
#2  0x0000000010ef1f58 in do_reload () at ../../gcc/ira.c:5516
#3  (anonymous namespace)::pass_reload::execute (this=<optimized out>) at ../../gcc/ira.c:5700
#4  0x000000001098bdf4 in execute_one_pass (pass=0x11884570) at ../../gc
   c/passes.c:2483
#5  execute_pass_list_1 (pass=0x11884570) at ../../gcc/passes.c:2569
#6  0x000000001098c5c4 in execute_pass_list_1 (pass=0x11883430) at ../..
   /gcc/passes.c:2570
#7  0x0000000010f3f068 in execute_pass_list (fn=<optimized out>, 
pass=<optimized out>) at ../../gcc/passes.c:2580
#8  0x0000000010e300b4 in cgraph_node::expand (this=this@entry
=0x7ffff5a64218) at ../../gcc/context.h:48
#9  0x0000000010e2ee64 in expand_all_functions () at ../../gcc/cgraphunit.c:2333
#10 symbol_table::compile (this=this@entry=0x7ffff5a80000) at ../../gcc/cgraphunit.c:2684
#11 0x0000000010e2deac in symbol_table::finalize_compilation_unit (this=
    0x7ffff5a80000) at ../../gcc/cgraphunit.c:2862
#12 0x0000000010f63a10 in compile_file () at ../../gcc/toplev.c:482
#13 0x0000000010730e58 in do_compile () at ../../gcc/toplev.c:2177
#14 toplev::main (this=0x7fffffffef56, argc=<optimized out>, argv=<optimized
     out>) at ../../gcc/toplev.c:2312
#15 0x0000000010732ff4 in main (argc=<optimized out>, argv=
    0x7ffffffff378) at ../../gcc/main.c:39

Looks like we never exit the outer for loop here in gcc/lra.c:lra:

   │2457          for (;;)                                                                                            │
   │2458            {                                                                                                 │
   │2459              for (;;)                                                                                        │
   │2460               {                                                                                              │
   │2461                 bool reloads_p = lra_constraints (lra_constraint_iter == 0);                                 │
   │2462                 /* Constraint transformations may result in that eliminable                                  │
   │2463                    hard regs become uneliminable and pseudos which use them                                  │
   │2464                    should be spilled.         It is better to do it before pseudo                            │
   │2465                    assignments.                                                                              │
   │2466                                                                                                              │
   │2467                    For example, rs6000 can make                                                              │
   │2468                    RS6000_PIC_OFFSET_TABLE_REGNUM uneliminable if we started                                 │
   │2469                    to use a constant pool.  */                                                               │
   │2470                 lra_eliminate (false, false);                                                                │

Comment 3 Ben Cotton 2019-08-13 17:13:29 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 4 Ben Cotton 2019-08-13 19:13:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 5 Ben Cotton 2020-11-03 15:09:11 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
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 '31'.

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 31 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 6 Ben Cotton 2020-11-24 16:41:28 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 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.


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