From owner-freebsd-current Tue May 8 14:18:33 2001 Delivered-To: freebsd-current@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id D166037B422 for ; Tue, 8 May 2001 14:18:27 -0700 (PDT) (envelope-from des@ofug.org) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id XAA58315; Tue, 8 May 2001 23:18:24 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: tlambert2@mindspring.com Cc: Dennis Glatting , Kris Kennaway , freebsd-stable@frebsd.org, freebsd-current@FreeBSD.ORG Subject: Re: pgm to kill 4.3 via vm References: <20010507074503.Y24943-100000@btw.plaintalk.bellevue.wa.us> <3AF81B16.7EC1F3DE@mindspring.com> From: Dag-Erling Smorgrav Date: 08 May 2001 23:18:23 +0200 In-Reply-To: <3AF81B16.7EC1F3DE@mindspring.com> Message-ID: Lines: 33 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --=-=-= Terry Lambert 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 #include #include #include #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