Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Nov 1998 19:59:34 -0500 (EST)
From:      Brian Feldman <green@unixhelp.org>
To:        John Fieber <jfieber@indiana.edu>
Cc:        garman@earthling.net, current@FreeBSD.ORG, julian@whistle.com, wollman@khavrinen.lcs.mit.edu
Subject:   Re: The infamous dying daemons bug
Message-ID:  <Pine.BSF.4.05.9811091953110.26160-100000@janus.syracuse.net>
In-Reply-To: <Pine.BSF.4.05.9811090932230.462-100000@fallout.campusview.indiana.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 9 Nov 1998, John Fieber wrote:

> On Sun, 8 Nov 1998, Brian Feldman wrote:
> 
> > Device      1K-blocks     Used    Avail Capacity  Type
> > /dev/wd0s1b    102400    12300    89972    12%    Interleaved
> > /dev/wd1s1b    102400    12408    89864    12%    Interleaved
> > Total          204544    24708   179836    12%
> >  This is normal usage after
> > swap_pager: suggest more swap space: 157 MB
> > swap_pager: out of swap space
> > pid 5795 (memory), uid 1000, was killed: out of swap space
> 
> I don't think this illustrates bug we are trying to smoke out
> though. This is showing the "memory" process as being killed,
> presumably because it went overboard on memory consumption.
> 
> The dying daemon bug seems to manifists itself in the death of

The point of "memory" is to eat up ram. Watch:
#include <stdio.h>
#define SIZE 1024

void
main(void) {
	int count, yep = 0;
	void *stfu[102400];
	for (count = 0; count < 102400; count++) {
		if((stfu[count] = malloc(SIZE)) != (void *) NULL) {
			printf("%p (%i) malloc'd\n", stfu[count], count);
			bzero(stfu[count], SIZE);
			yep++;
		}	
		else
			break;
	}
	for (count = 0; count < yep; count++) {
		free(stfu[count]);
		printf("%i free'd\n", count);
		}
	if (yep != 102400) {
		printf("mallocs failed at %i", yep);
		exit (1);
		}
	else
	exit (0);
}

> innocent bystander
> processes and usually by a signal 11, not by
> "out of swap space".  Note these two observations:
The point of the memory starvation was to _bring_up_ things like this.
Indeed, after the memory starvation had occurred, no processes ata ll were
killed.
 > 
>    Date: Sun, 8 Nov 1998 15:26:48 -0800 (PST)
>    From: Julian Elischer <julian@whistle.com>
>    Message-ID: <Pine.BSF.3.95.981108152353.12341D-100000@current1.whistle.com>
> 
>    It's been a while since we looked at it closely but it appeared
>    that a page of useful memeory was suddenly unmapped from the
>    process.
> 
>    Date: Sun, 8 Nov 1998 23:17:00 -0500 (EST)
>    From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
>    Message-Id: <199811090417.XAA13563@khavrinen.lcs.mit.edu>
> 
>    It seems, so far as I was able to characterize, to happen to
>    daemons which are *swapped out* at the time of the memory
>    shortage.  If it's active enough to still be in core, it doesn't
>    get spammed.
> 
> -john

According to these e-mails, I have been attempting the same scenarios,
but without the same effects.

Cheers,
Brian Feldman
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9811091953110.26160-100000>