Bug 123436 - System hang/crash due to memory allocation
Summary: System hang/crash due to memory allocation
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel   
(Show other bugs)
Version: 3.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Rik van Riel
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2004-05-18 15:51 UTC by Per Lindahl
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-13 14:27:50 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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):

How reproducible:

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?


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 ?

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