Date: 08 May 2001 23:18:23 +0200 From: Dag-Erling Smorgrav <des@ofug.org> To: tlambert2@mindspring.com Cc: Dennis Glatting <dennis.glatting@software-munitions.com>, Kris Kennaway <kris@obsecurity.org>, freebsd-stable@frebsd.org, freebsd-current@FreeBSD.ORG Subject: Re: pgm to kill 4.3 via vm Message-ID: <xzp8zk7k09s.fsf@flood.ping.uio.no> In-Reply-To: <3AF81B16.7EC1F3DE@mindspring.com> References: <20010507074503.Y24943-100000@btw.plaintalk.bellevue.wa.us> <xzpy9s9mbyl.fsf@flood.ping.uio.no> <3AF81B16.7EC1F3DE@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= Terry Lambert <tlambert2@mindspring.com> writes: > So now the question becomes "what is he testing that is > resulting in 4.3 locking up?". Good question. It does some non-trivial stuff besides allocating: buffered I/O and fork()/exec()'ing sync(1). > Your suggested replacement test might be fun to run, but I > think it wouldn't lock up 4.3... Nope. But the attached - much nastier - program did trash my -CURRENT box when run as root in an xterm. What happened was that the X server faulted and died, rendering the console unusable; the serial console filled up with getswapspace() errors, so the only recourse was a break to DDB followed by 'call boot', which managed to sync all filesystems except the root, but failed to actually reboot the machine. I would *love* to have a DDB equivalent to 'kill -9', so I could drop to the DDB prompt, check ps, kill a process or two, and drop back out of DDB. It would have saved me a reboot and a longish fsck in this case. A second try, on the text console and as a regular user, got to 643 MB before it, top(1) and an xterm were killed. This is a 5.0-CURRENT system with 192 MB RAM and 512 MB swap, so 643 MB is pretty close to max capacity. DES -- Dag-Erling Smorgrav - des@ofug.org --=-=-= Content-Disposition: attachment; filename=adsp.c #include <sys/types.h> #include <sys/mman.h> #include <stdlib.h> #include <unistd.h> #define CHUNKSIZE 1048576 #define CHUNKS 4096 int main(int argc, char *argv[]) { int i, j, n, ps; char *p; n = (argc > 1) ? atoi(argv[1]) : CHUNKS; ps = getpagesize(); for (i = 0; i < n; ++i) { if ((p = mmap(NULL, CHUNKSIZE, PROT_WRITE, MAP_ANON, -1, 0)) == NULL) { write(1, "\n:(\n", 4); exit(1); } write(1, ".", 1); for (j = 0; j < CHUNKSIZE; j += ps) p[j] = 1; } write(1, "\n:)\n", 4); read(0, p, 1); exit(0); } --=-=-=-- 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?xzp8zk7k09s.fsf>