From owner-freebsd-hackers Fri Sep 18 07:39:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA03638 for freebsd-hackers-outgoing; Fri, 18 Sep 1998 07:39:44 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from citadel.cdsec.com (citadel.cdsec.com [192.96.22.18]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA03633 for ; Fri, 18 Sep 1998 07:39:39 -0700 (PDT) (envelope-from gram@cdsec.com) Received: (from nobody@localhost) by citadel.cdsec.com (8.8.8/8.6.9) id QAA23943 for ; Fri, 18 Sep 1998 16:46:54 +0200 (SAST) Received: by citadel via recvmail id 23893; Fri Sep 18 16:46:17 1998 From: Graham Wheeler Message-Id: <199809181445.QAA03398@cdsec.com> Subject: Re: FreeBSD hanging/rebooting To: hackers@FreeBSD.ORG Date: Fri, 18 Sep 1998 16:45:00 +0200 (SAT) X-Mailer: ELM [version 2.4 PL25-h4.1] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG While this may or may not be related to the other problems we are experiencing, I just ran a test program of mine that used to crash 2.2.2 and noticed that it still crashes 2.2.7. I posted a similar program a long time back; clearly the problem that it reveals still exists. When run as root, this program forks child processes until the system runs out of swap space, after which it is killed by a signal. The entire O/S then hangs. Alt-F1 etc still works to change VTs, but nothing else works, and a hard reset is needed. #include #include #define MAXPROC 2000 main() { int pids[MAXPROC], i; for (i = 0; i < MAXPROC; i++) { pids[i] = fork(); if (pids[i] < 0) { perror("fork"); break; } else if (pids[i] == 0) /* child */ { sleep(60); exit(0); } else printf("%d\n", i); } sleep(30); } -- Dr Graham Wheeler E-mail: gram@cdsec.com Citadel Data Security Phone: +27(21)23-6065/6/7 Internet/Intranet Network Specialists Mobile: +27(83)253-9864 Firewalls/Virtual Private Networks Fax: +27(21)24-3656 Data Security Products WWW: http://www.cdsec.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message