From owner-freebsd-bugs Wed Sep 1 14:52:53 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 2E57F14D7D for ; Wed, 1 Sep 1999 14:52:48 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA04084; Wed, 1 Sep 1999 14:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 6F73E14E2C; Wed, 1 Sep 1999 14:43:50 -0700 (PDT) Message-Id: <19990901214350.6F73E14E2C@hub.freebsd.org> Date: Wed, 1 Sep 1999 14:43:50 -0700 (PDT) From: proett@nas.nasa.gov To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: kern/13532: bad vm mfs interaction Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 13532 >Category: kern >Synopsis: bad vm mfs interaction >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 1 14:50:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Tom Proett >Release: 3.2 stable >Organization: MRJ Inc. >Environment: FreeBSD sensei.nas.nasa.gov 3.2-STABLE FreeBSD 3.2-STABLE #5: Wed Aug 4 11:20:20 PDT 1999 proett@sensei.nas.nasa.gov:/usr/src/sys/compile/SENSEI i386 >Description: Using a memory file system and a memory intensive program at the same time can result in the system hanging. Running the program below twice results in a gradual death spiral. Most procs are waiting on "newbuf". Here is the output of "top" after things froze: last pid: 30140; load averages: 3.05, 1.65, 1.24 up 24+21:50:02 13:30:19 32 processes: 5 running, 26 sleeping, 1 stopped CPU states: 0.4% user, 0.0% nice, 0.0% system, 1.6% interrupt, 98.1% idle Mem: 15M Active, 27M Inact, 14M Wired, 1968K Cache, 7336K Buf, 804K Free Swap: 200M Total, 127M Used, 72M Free, 64% Inuse PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 238 nobody -2 20 14272K 10520K newbuf 465.2H 0.88% 0.88% setiathome 272 root -18 0 15112K 0K wswbuf 20.6H 0.00% 0.00% XF86_S3 210 root 2 0 788K 0K select 12:01 0.00% 0.00% 114 root 2 -12 1032K 172K select 9:19 0.00% 0.00% xntpd 90 root 2 0 404K 60K select 4:59 0.00% 0.00% routed 170 root 2 0 1304K 0K RUN 0:33 0.00% 0.00% 166 root 10 0 980K 0K RUN 0:30 0.00% 0.00% 105 root 2 0 820K 0K RUN 0:25 0.00% 0.00% 9812 root 2 0 1320K 0K RUN 0:09 0.00% 0.00% 30 root -18 0 101M 7592K wswbuf 0:06 0.00% 0.00% mount_mfs 30086 root 2 0 1312K 156K select 0:02 0.00% 0.00% sshd1 30140 proett -2 0 25204K 4256K newbuf 0:02 0.00% 0.00% suck 140 root 2 0 1008K 0K select 0:02 0.00% 0.00% 118 daemon 2 0 836K 0K select 0:01 0.00% 0.00% 244 root 2 0 1560K 0K select 0:01 0.00% 0.00% 30132 proett 28 0 1560K 316K RUN 0:01 0.00% 0.00% top 269 root 2 0 2108K 0K select 0:01 0.00% 0.00% ... >How-To-Repeat: Run this program twice on a system that uses mfs as /tmp. #include #include #include #define XSIZE 4096 main() { char *buf; int fsok, memok; int fd; fd = open("/tmp/suck.out", O_WRONLY|O_CREAT|O_TRUNC, 0644); if (fd == -1) { perror("open"); exit(1); } fsok = memok = 1; while (fsok || memok) { if (memok) { buf = malloc(XSIZE); if (buf == NULL) { perror("malloc"); memok = 0; } } if (fsok) { if (write(fd, buf, XSIZE) != XSIZE) { perror("write"); fsok = 0; } } } printf("sleeping...\n"); sleep(500); return 0; } >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message