From: HJ Lu (hlu@luke.eecs.wsu.edu)
Date: 04/18/93


From: hlu@luke.eecs.wsu.edu (HJ Lu)
Subject: Re: how to grind your system to a halt .. vitrual mem, tcsh
Date: Sun, 18 Apr 1993 05:58:57 GMT

In article <gleasokr.735103262@rintintin.Colorado.EDU> gleasokr@rintintin.Colorado.EDU (Kris Gleason) writes:
>
>I happened upon an interesting discovery the other day. If you're
>curious, try this...
>
>in tcsh, hold down a key for a while; let the key repeat until the buffer
>is full (no more keystrokes will be accepted). Then, hit return. You
>should probably run top in another virtual terminal before you hit return.
>Then, watch tcsh's memory usage climb and climb and climb, until the
>system grinds to a halt (swap space fills up, then the remaining space
>in the buffer cache gets eaten until the system can no longer function).
>You might also want to set up an infinite loop that calls free, so you
>can watch your memory usage directly. Careful, 'cause the only way out
>of this is to cycle the power (if you let things get out of hand enough).
>I let it run until it took 10 minutes between free's updates... 0 swap,
>300 or so cache, 40 free. Yikes!
>
>I didn't check into the reason that tcsh eats up so much memory. But,
>it may be important that I am running with libc4.3.3.
>
>If you're curious, bash is a bit more graceful... segmentation fault
>instead of the grinding. I didn't try any other shells.
>
>I did this with 8 M of ram, and 16 M of swap (so don't tell me to increase
>my swap :) I just found it interesting, and a _huge_ security hole
>(unless you want other users to halt your system).
>
>Just an observation.
>

I believe rlimit is not 100% enforced. Maybe it is the time
to do that. You can set hard limits in files in /etc. The actual
limits should depend on your tastes.

H.J.