Bug 55829 - System Hangs While trying to allocate memory with malloc()
Summary: System Hangs While trying to allocate memory with malloc()
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-07 12:18 UTC by Deian Chepishev
Modified: 2007-04-18 16:38 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Deian Chepishev 2001-11-07 12:18:11 UTC
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 12:28:04 UTC
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.