Bug 123436

Summary: System hang/crash due to memory allocation
Product: Red Hat Enterprise Linux 3 Reporter: Per Lindahl <per.lindahl>
Component: kernelAssignee: Rik van Riel <riel>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: petrides, riel
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-13 14:27:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Per Lindahl 2004-05-18 15:51:19 UTC
Description of problem: 
The system hangs and require a poweroff.
We setup the system to serve as our Perforce server (source control)
and three hours after the switch the system hung (Previous system was
a RH 7.2). After a reboot the P4D (perforce daemon) peaksout using all
available memory and hangs the system.
But the script below does the same thing and even if I create a normal 
account and run the below command as a normal user the system hangs
I'd say that it's a serious DoS problem.

[per@system per$] perl -e 'while(1){push(@nasty, "nasty" x 1024)}'


Version-Release number of selected component (if applicable):
2.4.21-15.EL

How reproducible:
100%

Steps to Reproduce:
1.start a console as a normal user
2.perl -e 'while(1){push(@nasty, "nasty" x 1024)}'
3.sytem hangs instead of stopping the program.
  
Actual results:
System hang

Expected results:
Shell crash or application termination not system hang.

Additional info:
Sysrq is available to produce dumps.

The perl command has not been able to hang a u2date FedoraC 1
installation or SLES9 but several RH EL 3 machines. SMP machines has
not crashed hard instead it just makes the server not respond.

Comment 1 Rik van Riel 2004-05-18 16:11:37 UTC
Does the bug happen when you turn off memory overcommit by "echo 2 >
/proc/sys/vm/overcommit_memory" ?

Comment 2 Per Lindahl 2004-05-18 18:35:56 UTC
No, it does not. 

I get "Segementation fault" and "Out of momory!" as both root and user.

So what next? This makes the application crasch although it doesn't
take the server with it (which is good).

Can I provide you with logs or other sets of data?

PL

Comment 3 Rik van Riel 2004-05-18 19:38:51 UTC
Well, what do you expect an application that allocates infinite memory
to do once the system doesn't have any more memory to allocate ? ;)

Does switching off memory overcommit make your system behave in the
desired way ?