Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 162854 - System crash while compiling courier, due to gcc problem.
Summary: System crash while compiling courier, due to gcc problem.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc4
Version: 4
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-10 14:49 UTC by Devrim Gündüz
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-08-25 22:33:44 UTC


Attachments (Terms of Use)

Description Devrim Gündüz 2005-07-10 14:49:03 UTC
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 17:04:44 UTC
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 20:45:05 UTC
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 09:46:02 UTC
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 17:38:05 UTC
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 14:28:32 UTC
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 22:33:44 UTC
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.