Bug 59547 - gcc segfaults when compiling gv-3.5.8 with make -j
gcc segfaults when compiling gv-3.5.8 with make -j
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i686 Linux
high Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-02-09 22:58 EST by Marc Culler
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-02-12 21:16:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marc Culler 2002-02-09 22:58:19 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.9-21 i686)

Description of problem:
The gv-3.5.8 source code uses the -j flag to make.  The gcc compiler segfaults
when compiling
gv-3.5.8 "out of the box".  If the -j flag is disabled then the compilation
completes successfully. 

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

How reproducible:

Steps to Reproduce:
1. Get the gv-3.5.8 source from ftp://ftpthep.physik.uni-mainz.de/pub/gv and
2. Edit the file source/paths.h to remove the ## characters from the INC_X11,
and INC_XAW macros.
3.  xmkmf; make Makefiles; make

Actual Results:  Below is some of the compiler output.  The compilation of
magmenu.c was started several steps earlier.  The "undeclared variable" error in
process_menu does not arise when compiling without the -j flag.  Also, the crash
can occur in different source files on different runs.

I have a 1.8GHz Pentium 4 system running the 2.4.9-21 kernel.  I just installed
Redhat 7.2 today and immediately installed all of the up2date rpms found by the
update agent, including: 

I imagine that this might be a race condition and might behave differently on
different architechtures.  And it seems quite likely to me that the bug is
actually in the threads library used by make, not in gcc per se.

>>>>>>>>>>>>>>>>>> OUTPUT FOLLOWS:

gcc -O2 -march=i386 -mcpu=i686 -pipe      -I/usr/X11R6/include   -Dlinux
-DGV_LIBDIR=\"/usr/local/lib/gv/\" -DGV_CODE  -DUSE_FALLBACK_STYLES          -c
-o popup.o popup.c
magmenu.c: In function `magmenu_a_magMenu':
magmenu.c:358: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[1]: *** [magmenu.o] Error 1
make[1]: *** Waiting for unfinished jobs....
process.c: In function `process_menu':
process.c:365: `processButton' undeclared (first use in this function)
process.c:365: (Each undeclared identifier is reported only once
process.c:365: for each function it appears in.)
process.c:409: `processMenu' undeclared (first use in this function)
make[1]: *** [process.o] Error 1
make: *** [all] Error 2

Expected Results:  Of course this very widely used program should compile
correctly, even with the parallelizing make option enabled.  (I also think that
gv should be included in the RedHat 7.2 distribution in binary form, and I have
no idea why the source is distributed with that broken paths.h.)

Additional info:
Comment 1 Jakub Jelinek 2002-02-12 07:28:43 EST
Is it reproduceable (you get the same error always on the same file)?
The fact that removing -j from make help suggest that it probably is not.
Also, were you using -j somenumber or just -j without any argument?
The latter might mean you just get ouf of main memory/swap.
Comment 2 Marc Culler 2002-02-12 21:16:39 EST
It  seems unlikely that I would use up 1GB of memory and 2GB of swap compiling
gv.  The crash occurred every time that I ran make, and I ran it several times. 
On the other hand,  I am no longer able to reproduce the crash.  So it may have
had to do with the state of my system at that time.  I guess you could say that
it was "fixed" by rebooting.  Sigh.

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