Bug 124547 - C program using all memory kills mouse and alt-tab in X
C program using all memory kills mouse and alt-tab in X
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-05-27 09:17 EDT by Raphael Clifford
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-19 11:47:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
app that can cause the problem (17.88 KB, application/octet-stream)
2004-05-27 09:19 EDT, Raphael Clifford
no flags Details

  None (edit)
Description Raphael Clifford 2004-05-27 09:17:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124

Description of problem:
If I run a simple C program that allocates a very large amount of
memory and then writes to itm the system starts thrashing as expected.
Then, if I kill it after a minute or so some of the following happen
(not always the same subset)

1) The mouse pointer dissappears
2) alt-tab does do anything at all
3) The mouse is still there but clicking has no visible affect.

I can always still using the existing xterm is I am focussed on it. 
Restarting X fixes things.

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

How reproducible:

Steps to Reproduce:
1. Run a C program that allocates more memory than is available then
writes to it
2. Wait for it to thrash for a minute or so
3. Kill the program using ctrl-C

Actual Results:  Mouse pointer has gone and/or alt-tab does not work.
In any case it is not possible to change to another window and you
have to restart X to be able to use it properly.

Expected Results:  X should be working as usual.

Additional info:

The OOM killer appears NOT to have run (nothing in dmesg).  It seems
that something else is happening. One suggestion has been that some
core Gnome app tries to allocate/use memory and fails which causes the
mouse/focus to die and that alt-tab is in some way tied to the
Comment 1 Raphael Clifford 2004-05-27 09:19:56 EDT
Created attachment 100628 [details]
app that can cause the problem

Run this app with ./progOLN 20000000 100

and it will cause the problem. Increase the first number if memory is not fully
used up by these parameters.
Comment 2 Dave Jones 2004-06-19 11:47:57 EDT
if those apps are misbehaving when theres a shortage of memory, the
bug lies with those apps, not with the kernel.

resource starvation issues are fixed typically by setting reasonable
ulimits. The kernel can overcommit resources, but if you design a
pathalogical case to actually use everything, breakage is to be expected.

Comment 3 Raphael Clifford 2004-06-21 09:31:50 EDT
I think the problem is that I shouldn't have classified it under
"kernel". The bottom line is that any user can make the system
permanently unusable (until it is restarted) simply by accidently (or
intentionally) making an array that is too large and writing to it. 
If this is a GNOME bug then I am of course happy to have it classified
there. It does certainly seem like something that needs attention however.

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