From owner-freebsd-current Mon Nov 9 17:00:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA17345 for freebsd-current-outgoing; Mon, 9 Nov 1998 17:00:32 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA17320 for ; Mon, 9 Nov 1998 17:00:20 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id TAA26308; Mon, 9 Nov 1998 19:59:34 -0500 (EST) Date: Mon, 9 Nov 1998 19:59:34 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: John Fieber cc: garman@earthling.net, current@FreeBSD.ORG, julian@whistle.com, wollman@khavrinen.lcs.mit.edu Subject: Re: The infamous dying daemons bug In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 #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 > Message-ID: > > 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 > 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