Bug 51837 - gcc Internal error: Illegal instruction in low real-memory state
gcc Internal error: Illegal instruction in low real-memory state
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
8.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-15 14:20 EDT by Need Real Name
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-01 19:43:33 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 Need Real Name 2001-08-15 14:20:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Description of problem:
Whenever compiling anything in a low real-memory condition (ie.- most 
importantly, less than 50KB), gcc fails and reports "Illegal instruction" 
despite having large available quantities of swap.

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


How reproducible:
Always

Steps to Reproduce:
1. Compile a rather lengthy RPM or piece of source code. The kernel is a 
good example.
2. If you do manage to compile it, compile something else as well.
3. Keep an eye on /proc/meminfo during compiles. When the available 
MemFree hits bottom, the system will report Illegal Instruction and fail 
instead of swapping. 
	

Actual Results:  Growing memory leaks from failed gcc compiles caused the 
consumption of available RAM, and never released it. Eventually this would 
degrade performance of the system and/or failure.

Expected Results:  Error-free code compilation.

Additional info:
(from a compilation via "rpm -ta dante-1.1.10.tar.gz")

gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../libscompat -
DSOCKS_CL
IENT=1 -DSOCKS_SERVER=0 -DSOCKSLIBRARY_DYNAMIC=1 -O2 -march=i386 -
mcpu=i686 -g -
O2 -pipe -c  -fPIC -DPIC broken.c -o .libs/broken.lo
broken.c: In function `socks_getpwnam':
broken.c:79: Internal error: Illegal instruction.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[1]: *** [broken.lo] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/dante-1.1.10/dlib'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.44963 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.44963 (%build)
[root@localhost dberry]# cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  393834496 346836992 46997504        0 54198272 129167360
Swap: 1850605568   126976 1850478592
MemTotal:       384604 kB
MemFree:         45896 kB
MemShared:           0 kB
Buffers:         52928 kB
Cached:         126140 kB
Active:         151808 kB
Inact_dirty:     25776 kB
Inact_clean:      1484 kB
Inact_target:    68244 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       384604 kB
LowFree:         45896 kB
SwapTotal:     1807232 kB
SwapFree:      1807108 kB
[root@localhost dberry]#
Comment 1 Need Real Name 2002-12-09 12:15:27 EST
I get this type of error compiling Mesa 5.0 + Mesa Demo 5.0 from the oficial site.

ons -fstrict-aliasing -malign-loops=2 -malign-jumps=2 -malign-functions=2
-D_REENTRANT -DPTHREADS -c vpexec.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../src -g -O2 -Wall
-fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing
-malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_REENTRANT -DPTHREADS -c
vpexec.c  -fPIC
-DPIC -o vpexec.o
cc1: warning: -malign-loops is obsolete, use -falign-loops
cc1: warning: -malign-jumps is obsolete, use -falign-jumps
cc1: warning: -malign-functions is obsolete, use -falign-functions
In file included from /usr/include/stdio.h:138,
                 from glheader.h:62,
                 from vpexec.c:79:
/usr/include/bits/stdio_lim.h:-13240: internal error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[3]: ** [vpexec.lo] Erro 1
make[3]: Saindo do diretsrio `/home/fabio/OpenGL/Mesa-5.0/src'
make[2]: ** [all-recursive] Erro 1
make[2]: Saindo do diretsrio `/home/fabio/OpenGL/Mesa-5.0/src'
make[1]: ** [all-recursive] Erro 1
make[1]: Saindo do diretsrio `/home/fabio/OpenGL/Mesa-5.0'
make: ** [all-recursive-am] Erro 2

My system

RedHat 8.0
GCC
gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Free Output:
[root@akiross Mesa-5.0]# free
             total       used       free     shared    buffers     cached
Mem:        118364     116256       2108          0       1720      63088
-/+ buffers/cache:      51448      66916
Swap:       128512      40884      87628
Comment 2 Richard Henderson 2004-10-01 19:43:33 EDT
"Illegal Instruction" is not a gcc bug.  It's either 

  (1) Bad ram
  (2) Kernel bug wrt swapping
  (3) Gcc somehow compiled for i686 and used on an older system.

Until shown otherwise I'll have to assume (1).

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