Bug 162854 - System crash while compiling courier, due to gcc problem.
System crash while compiling courier, due to gcc problem.
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
4
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-10 10:49 EDT by Devrim GÜNDÜZ
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-25 18:33:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Devrim GÜNDÜZ 2005-07-10 10:49:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
When I try to build Courier RPM on Fedora Core 4, system crashes. Compiler uses all the memory first, and then the swap area. When swap is filled, the system usually crashes.

It seems to be a GCC bug, since the same software is compiled on RHEL 3.

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

How reproducible:
Always

Steps to Reproduce:
1.Download Courier : http://www.courier-mta.org/beta/courier/courier-0.50.0.20050703.tar.bz2
2. Run rpmbuild -ta courier-0.50.0.20050703.tar.bz2
3. System crashes.
  

Actual Results:   make[4]: Entering directory
 `/home/courier/rpm/BUILD/courier-0.50.0.20050703/courier/module.esmtp'
 Compiling esmtp.c
 Linking librewrite.la
 Compiling courieresmtp.c
 courieresmtp.c: In function 'start_child':
 courieresmtp.c:478: warning: ignoring return value of 'dup', declared with
attribute warn_unused_result
 courieresmtp.c:483: warning: ignoring return value of 'dup', declared with
 attribute warn_unused_result
 Compiling esmtpclient.c
 gcc: Internal error: Killed (program cc1)
 Please submit a full bug report.
 See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
 make[4]: *** [esmtpclient.o] Error 1
 gcc: Internal error: Killed (program cc1)
 Please submit a full bug report.
 See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
 make[4]: *** [esmtpclient.o] Error 1
 make[4]: Leaving directory
 `/home/courier/rpm/BUILD/courier-0.50.0.20050703/courier/module.esmtp'
 make[3]: *** [all] Error 2
 make[3]: Leaving directory
 `/home/courier/rpm/BUILD/courier-0.50.0.20050703/courier/module.esmtp'
 make[2]: *** [all-recursive] Error 1
 make[2]: Leaving directory
 `/home/courier/rpm/BUILD/courier-0.50.0.20050703/courier'
 make[1]: *** [all] Error 2
 make[1]: Leaving directory
 `/home/courier/rpm/BUILD/courier-0.50.0.20050703/courier'
 make: *** [all-recursive] Error 1
 error: Bad exit status from /var/tmp/rpm-tmp.1679 (%build)



Additional info:
Comment 1 Jakub Jelinek 2005-07-10 13:04:44 EDT
Please provide preprocessed courieresmtp.i and compiler options used,
plus info on how much memory and swap you have.
Comment 2 Devrim GÜNDÜZ 2005-07-10 16:45:05 EDT
The compiler options: 
----------------------
CFLAGS='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 
-mtune=pentium4 -fasynchronous-unwind-tables'

CXXFLAGS='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32
-march=i386 -mtune=pentium4 -fasynchronous-unwind-tables'

FFLAGS='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions  -mtune=pentium4
-fasynchronous-unwind-tables'

Memory and swap information:
----------------------------
256 MB RAM and 512 MB swap

Preprocessed courieresmtp.i:
-----------------------------
I can't provide it now; however you can produce it by downloading and running

rpmbuild -ta courier....tar.bz2



Comment 3 Jakub Jelinek 2005-07-12 05:46:02 EDT
The preprocessed source is necessary, as you might have different headers
instaled than me, configure in the package might find different stuff etc.
Preprocessed source is the only reliable way to debug compiler problems.
Just rerun the gcc command line used to compile that file with additional
-save-temps and you'll have courieresmtp.i in the current directory.
Comment 4 Seth Jennings 2005-07-21 13:38:05 EDT
I am having the exact same problem: 

OS: Fedora Core 4
RAM: 256MB
Swap Size: 384MB
Command Line: rpmbuild -ta courier-0.50.0.20050716.tar.bz2 

Output (right before error):
BEGIN
make[4]: Entering directory
`/home/sdj3204/rpm/BUILD/courier-0.50.0.20050716/courier/module.esmtp'
Compiling esmtp.c
Linking librewrite.la
Compiling courieresmtp.c
courieresmtp.c: In function 'start_child':
courieresmtp.c:478: warning: ignoring return value of 'dup', declared with
attribute warn_unused_result
courieresmtp.c:483: warning: ignoring return value of 'dup', declared with
attribute warn_unused_result
Compiling esmtpclient.c
gcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
make[4]: *** [esmtpclient.o] Error 1
make[4]: Leaving directory
`/home/sdj3204/rpm/BUILD/courier-0.50.0.20050716/courier/module.esmtp'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/home/sdj3204/rpm/BUILD/courier-0.50.0.20050716/courier/module.esmtp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/sdj3204/rpm/BUILD/courier-0.50.0.20050716/courier'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/sdj3204/rpm/BUILD/courier-0.50.0.20050716/courier'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.60373 (%build)
END

I would provide the other materials you requested but I don't know how to
find/generate them.
Comment 5 Jakub Jelinek 2005-08-17 10:28:32 EDT
You can find answers in http://gcc.gnu.org/bugs.html
Basically, you need to find the arguments passed to gcc (convince courier's
makefiles to output the commands it is actually running, or watch from other
terminal using ps), then run that command by hand with additional -save-temps
option.  If you can reproduce it that way, attach the courieresmtp.i file
it creates here and say which gcc options were used.
Comment 6 Jakub Jelinek 2005-08-25 18:33:44 EDT
If you have the request info, please reopen.

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