Bug 590475 - cc1plus fills all available RAM with internal error and advises to file bug report
Summary: cc1plus fills all available RAM with internal error and advises to file bug r...
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: x86_64 Linux
low
high
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-09 18:16 UTC by Joshua Kramer
Modified: 2011-05-13 12:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-20 16:29:45 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
g++ intermediate output of getscreen.cpp (1.28 MB, application/x-gzip)
2010-05-17 16:29 UTC, Joshua Kramer
no flags Details

Description Joshua Kramer 2010-05-09 18:16:01 UTC
Description of problem:

When compiling a popular open source package based on Qt, the compiler has problems with one particular file.  When the problem occurs, the compiler takes all available RAM and swap space (to the point that the X session is destroyed) and produces this error:

g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_SCRIPT_LIB -DQT_SCRIPTTOOLS_LIB -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtAssistantClient -I/usr/include/QtAssistant -I/usr/include/QtUiTools -I/usr/include/QtDesigner -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtSql -I/usr/include/Qt3Support -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtWebKit -I/usr/include -I../../openrpt/common -I../../openrpt/OpenRPT/renderer -I../../openrpt/OpenRPT/wrtembed -I../../openrpt/MetaSQL -I../../openrpt/MetaSQL/tmp -I../scriptapi -I../common -I../widgets -I../widgets/tmp/lib -I. -Imoc -Iui -o unx_obj/getscreen.o getscreen.cpp
{standard input}: Assembler messages:
{standard input}:0: Warning: end of file in string; '"' inserted
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See for instructions.
make: *** [unx_obj/getscreen.o] Error 1

Version-Release number of selected component (if applicable):

gcc-c++-4.4.3-1.el6.x86_64

How reproducible:

1. Configure a system such that Qt-3.3 is NOT on the system, but Qt 4 IS on the system.

2. Grab the development tree from here:
   http://www.octoberridge.net/xtuple-client-3.5.0-source.tar.bz2

3. Extract the source.

4. Begin with the 'openrpt' tree under xtuple-client-3.5.0-source.  In the openrpt tree, issue the command qmake and then make.  Openrpt should build fine.

5. Next, go to the xtuple directory under xtuple-client-3.5.0-source.  Again, issue qmake and make commands.

6. The build should fail with a linker error.  Remove the file xtuple/guiclient/unx_obj/getscreen.o.

7. Again, issue the make command.

8. gcc should fail with the error above.

9. Another failure mode is that a cc1plus process takes up 80% of available RAM and starts filling swap space.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 RHEL Product and Program Management 2010-05-09 19:41:37 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Joshua Kramer 2010-05-15 00:49:52 UTC
I was able to duplicate this on a 64-bit VM installation of EL6.  As it was originally filed this bug occurred on a Dell Lattitude laptop; I've duplicated this under a 64bit VirtualBox based installation.

On the laptop, the filesystem is XFS; on the VM, the filesystem is ext4.  I've seen in Google queries where errors like this occur while compiling files contained in ReiserFS filesystems.

In fact, you can duplicate it by executing the line noted below.  Note that the build of openrpt takes ~20 minutes, and the build of openrpt takes ~30 minutes until this error occurs; this is on a dual-core 2.6GHz processor.

I tried removing the '-pipe' options, and I got a segmentation fault on gcc.

g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W -D_REENTRANT
-DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_SCRIPT_LIB -DQT_SCRIPTTOOLS_LIB
-DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB
-DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/lib64/qt4/mkspecs/linux-g++ -I.
-I/usr/include/QtAssistantClient -I/usr/include/QtAssistant
-I/usr/include/QtUiTools -I/usr/include/QtDesigner -I/usr/include/QtCore
-I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtXml
-I/usr/include/QtSql -I/usr/include/Qt3Support -I/usr/include/QtScriptTools
-I/usr/include/QtScript -I/usr/include/QtWebKit -I/usr/include
-I../../openrpt/common -I../../openrpt/OpenRPT/renderer
-I../../openrpt/OpenRPT/wrtembed -I../../openrpt/MetaSQL
-I../../openrpt/MetaSQL/tmp -I../scriptapi -I../common -I../widgets
-I../widgets/tmp/lib -I. -Imoc -Iui -o unx_obj/getscreen.o getscreen.cpp

Comment 4 Jakub Jelinek 2010-05-17 08:53:45 UTC
gcc-4.4.3-1.el6 is very old and many var-tracking speedups have been done since then.  Can you please retry with a newer RHEL6 gcc (such as gcc-4.4.4-2.el6 or something close to that), or attach preprocessed source so that I can test it myself?  (add -save-temps to g++ command line, attach getscreen.ii it creates).

Comment 5 Joshua Kramer 2010-05-17 16:29:35 UTC
Created attachment 414605 [details]
g++ intermediate output of getscreen.cpp

Comment 6 Joshua Kramer 2010-05-17 16:32:23 UTC
> gcc-4.4.3-1.el6 is very old and many var-tracking speedups have been done
> since then.  Can you please retry with a newer RHEL6 gcc (such as
> gcc-4.4.4-2.el6 or something close to that), or attach preprocessed

Do you know where I can get a precompiled binary, and any dependent upgraded packages?  The file currently on the public FTP site is gcc-4.4.3-1.el6.  I only have access to the public FTP site, I do not have access to RHN.  In the meantime I will generate the preprocessed source and attach.

Comment 7 Jakub Jelinek 2010-05-19 09:06:49 UTC
I'm afraid it is available only from RHN.
You can grab it from Fedora though:
http://kojipkgs.fedoraproject.org/packages/gcc/4.4.4/4.fc12/
though, the only difference between RHEL6 and FC12 gcc is that FC12 includes gcj appletviewer and RHEL6 doesn't and in PowerPC gcc default options.  On x86-64/i?86 the defaults are the same and I believe the fc12 packages should install fine on RHEL6 beta.

Comment 8 Joshua Kramer 2010-05-20 16:25:21 UTC
This bug should be closed - the gcc-4.4.4 as it exists in FC12 does not exhibit this issue.


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