This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 55829 - System Hangs While trying to allocate memory with malloc()
System Hangs While trying to allocate memory with malloc()
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-07 07:18 EST by Deian Chepishev
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-11-07 07:18:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Deian Chepishev 2001-11-07 07:18:11 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Description of problem:
When I make an infinite cycle for allocating memory with malloc function. 
The first time when i start the program After the memory is finished the 
system Terminates the process, But if i start 2 processes simultaneously 
the system almost allways hangs completely. The interesting thing is that 
this happens if I use the default RedHat kernel shiped with RH7.2 (2.4.7). 
If I try with 2.4.14 this does not happen. Even regular user can crash the 
system

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


How reproducible:
Sometimes

Steps to Reproduce:
1. Write this code
#include<stdio.h>
int main(){
int *i;

while(1){
    i=(int*)malloc(10000);
}
return 0;
}
2.Compile the program
3. Run the program. If it does not hang from the first time. Start 2 
processes SIMULTANEOUSLY. It will hang for at most 4 tryes.	

Actual Results:  The system is Completely Hanged. I can not change the 
console with Alt-F1-6. I can do nothing from the keyboard. I do not know 
about the network but may be it hangs too.

Expected Results:  Instead of this the system should terminate the 
processes as it had done the first time when i Tryed this

Additional info:

Nothing Appears on the console.
My system is RH7.2 Default instalation. No patches applyed. 
Intel Celeron 433
163 MB RAM
BX440 chipset
But this works and on P3 733, 256 MB RAM, I815 chipset. The same 
Distrubution with all relevant patches applyed only the kernel is default. 
I have and kernel 2.4.14 compiled too and this is not happening with it. 
Even regular user can crash the system.
Comment 1 Arjan van de Ven 2001-11-07 07:28:04 EST
The 2.4.9 kernel errata should have this fixed.

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