Bug 18394

Summary: When /swap if full ?
Product: Base System Reporter: legros <legros>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description legros 2000-05-05 09:00:01 UTC
Trying to hang up machine with $yes 'yes'. Then watching stats with a "top".
First RAM is totally filled, and than /swap. At this state machine crashs.
I tried on a Debian : process "yes" killed when swap's full : no crash.
I don't remember exactly the system messages at that point, I'll see this
and show you.
I tried with differents shells, crash is happening quiker with some of them.
Whith bash2 : about 40 min before crash.

How-To-Repeat: Just try $yes 'yes'
Comment 1 Sheldon Hearn 2000-05-05 15:09:46 UTC
On Fri, 05 May 2000 00:57:09 MST, legros@efrei.fr wrote:

> I'll give you output of "uname -a" this evening (Paris time...)

Next time, wait 'til you've got all the information on hand.  There's no
rush here. :-)

> Trying to hang up machine with $yes 'yes'. Then watching stats with
> a "top".  First RAM is totally filled, and than /swap. At this state
> machine crashs.

This looks bogus to me.  Could you double-check what you're typing at
the command prompt?  Is it really

	$yes 'yes'

?

That won't crash a machine (or even put too much stress on it).  Since
the variable $yes is empty, and since the shell gobbles the quotes,
you're effectively typing this:

	yes

Since this program doesn't have a memory leak, I think you're doing
something odd.  Do you have the $yes variable set to anything before you
do this?

Seeing the exact messages issued at crash time, or even better a
backtrace of the crash dump would help, but at this stage, I don't
believe you. :-)

Ciao,
Sheldon.
Comment 2 Sheldon Hearn freebsd_committer freebsd_triage 2000-05-05 17:49:49 UTC
State Changed
From-To: open->closed

As I suspected, this one seems to be a crank call -- the origin 
address is invalid. 

Comment 3 Sheldon Hearn 2000-05-08 08:12:31 UTC
On Mon, 08 May 2000 10:09:26 +1000, Gregory Bond wrote:

> >  	$yes 'yes'
> 
> Hmm, if it were 
> 	$yes `yes` 
> (nb: back-tic not apostrophe) then this would run out of swap space...
> eventually.

In which case, a simple

	`yes`

would suffice.  Note that it's the shell that exhausts memory, not the
yes process.  So now the the originator needs to tell us whether this is
still a problem when he uses login.conf(5) resource limits properly.

I still think this is bogus. :-)

Ciao,
Sheldon.