Date: Wed, 1 Sep 1999 14:43:50 -0700 (PDT) From: proett@nas.nasa.gov To: freebsd-gnats-submit@freebsd.org Subject: kern/13532: bad vm mfs interaction Message-ID: <19990901214350.6F73E14E2C@hub.freebsd.org>
index | next in thread | raw e-mail
>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% <moused>
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% <sendmail>
166 root 10 0 980K 0K RUN 0:30 0.00% 0.00% <cron>
105 root 2 0 820K 0K RUN 0:25 0.00% 0.00% <syslogd>
9812 root 2 0 1320K 0K RUN 0:09 0.00% 0.00% <sshd1>
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% <amd>
118 daemon 2 0 836K 0K select 0:01 0.00% 0.00% <portmap>
244 root 2 0 1560K 0K select 0:01 0.00% 0.00% <sshd2>
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% <xdm>
...
>How-To-Repeat:
Run this program twice on a system that uses mfs as /tmp.
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990901214350.6F73E14E2C>
