PROBLEM: Process allocating all memory not killed at least >=2.2.12

luca78 (luca78@dada.it)
Sun, 10 Oct 1999 20:17:59 +0200 (CEST)


[1.] A process allocating the whole memory makes the system crash

[2.] Full description: A process which continues to allocate memory is not
killed by the kernel as it should be, and eventually makes the system
crash. This problem does _not_ exist in 2.2.9, but _does_ at least in
2.3.8. The process, even if executed with only regular user permission
eventually makes _every_ other process die, including daemons and system
processes, but the process itself seems not to die. Messages as 'Out of
memory for XXXX' appear, and the only thing to do is a hard reboot.
Using the 2.2.12 kernel the 'Unable to load interpreter' message appears,
but I am (sometimes?) able to kill the process allocating memory; however,
also in that case, no user can start or continue any other process while
the allocating one is active: I could be wrong, but in my opinion the
memory allocating process should be killed by the kernel.

[3.] Keywords: kernel, memory allocation

[4.] Kernel versions: at least 2.2.12 and 2.3.8; 2.9 does _not_ have the
bug. Right now /proc/version is:
------------------------------------------------------------------------
Linux version 2.2.12 (root@stallman) (gcc version 2.7.2.3) #1 Sat Sep 18
22:47:46 CEST 1999
------------------------------------------------------------------------

[5.] There are no Oops.

[6.] The trigger program is really trivial:
--------------------------------------------------
#include <malloc.h>

int main(){
while(1)
malloc(1);
return 0; /* Just to follow the Standard */
}
---------------------------------------------------

[7.] This is my hardware configuration: GNU/Linux on AMD-K6/225MHz,
motherboard with ALi chipset, two EIDE Quantum hard disks, Mitsumi 6X
ATAPI CD-ROM, Sound Blaster 16 PnP, S3Trio64V2/DX video card, extern
modem, Adaptec 152x SCSI controller, Mustek ScanExpress 12000SP scanner.

[7.1.] Software:
The script reports my compiler is egcs, but this is not true; egcs
is my default gcc, but I compile kernels with gcc 2.7.2.3, replacing
every 'gcc' occurrence in every Makefile. I am definitively sure this is
correct.

-------------------------------------------------------------------
Linux stallman 2.2.12 #1 Sat Sep 18 22:47:46 CEST 1999 i586 unknown
Kernel modules 2.1.55
Gnu C egcs-2.91.66
Binutils 2.9.1
Linux C Library 2.0.7
Dynamic linker ldd (GNU libc) 2.0.7
Linux C++ Library 2.7.2
Linux C++ Library 2.9.0
Procps 1.2.4
Mount 2.7f
Net-tools Utilities
Kbd 0.94
Sh-utils 1.16
Modules Loaded
-----------------------------------------------------------

[7.2.] Processor information:
-----------------------------------------------------------
processor : 0
vendor_id : AuthenticAMD
cpu family : 5
model : 6
model name : AMD-K6tm w/ multimedia extensions
stepping : 2
cpu MHz : 224.803205
fdiv_bug : no
hlt_bug : no
sep_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr mce cx8 sep mmx
bogomips : 448.92
---------------------------------------------------------------

[7.3.] Modules information: To minimize problems my kernel is monolithic
right now: I only include modules support to be able to use PPP or that
network-releated feature needing it. /proc/modules is empty

[7.4.] SCSI information:
/dev/scsi/aha152x/0:
------------------------------------------------------------------------
Adaptec 152x SCSI driver;
$Revision: 1.7 $
ioports 0x0140 to 0x015f
interrupt 0x09
disconnection/reconnection disabled
parity checking enabled
synchronous transfers disabled
0 commands currently queued
enabled debugging options: (abort) (reset)

queue status:
no not yet issued commands
no current command
no disconnected commands

waiting: SCSISEQ (); SCSISIG (DATA OUT); INTSTAT (lo); SSTAT (BUSFREE
PHASECHG ); SSTAT (); SXFRCTL0 (CH1 ); SIGNAL (); SELID (00), SSTAT2 (SEMPTY );
SFCNT (0); SCSICNT (0), OFFCNT(0), SSTAT4 (); DMACNTRL0 (16BIT PIO READ INTEN );
DMASTAT (DFIFOEMP )

enabled interrupts ()
------------------------------------------------------------------------

/proc/scsi/scsi:
------------------------------------------------------------------------
Attached devices:
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: SCANNER Model: Rev: 2.02
Type: Scanner ANSI SCSI revision: 01 CCS
------------------------------------------------------------------------

[7.5] Nothing else under /proc seems relevant

[X] I am not an expert in low-level programming, but however wanted to
report this bug which seems quite serious: every user able to compile and
execute a program can make the system unusable or even crash the machine,
also remotely.
If I can be of any help to solve this problem don't hesitate to ask.

--
     #####         +      . ****  luca78  ****       +    *
     #--O_O     .              +            -    *      .   +
   #=##  |   +     -     e-mail:  luca78@dada.it      -   .
###  |####     -     .      ICQ:  32929877    +    .    *  -

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/