From owner-freebsd-bugs Sun Jun 22 09:00:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA09036 for bugs-outgoing; Sun, 22 Jun 1997 09:00:04 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA08995; Sun, 22 Jun 1997 09:00:02 -0700 (PDT) Date: Sun, 22 Jun 1997 09:00:02 -0700 (PDT) Message-Id: <199706221600.JAA08995@hub.freebsd.org> To: freebsd-bugs Cc: From: Tor Egge Subject: Re: kern/3688: fsck -p gets transient unexpected inconsistensies Reply-To: Tor Egge Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR kern/3688; it has been noted by GNATS. From: Tor Egge To: Tor.Egge@idi.ntnu.no Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/3688: fsck -p gets transient unexpected inconsistensies Date: Sun, 22 Jun 1997 17:56:39 +0200 I wrote: > When recovering from a system crash, `fsck -p' in /etc/rc complained about > unexpected inconsistencies on 3 different filesystems. When running fsck > manually on each of these filesystems, only the clean flag needed to be set in > the superblock. The three filesystems were all located on ccd devices. This is caused by a superblock for a different filesystem being present in memory when comparing the superblock with the alternate superblock. :-( Under some circumstances, copy-on-write handling is broken. How-To-Repeat: Compile the appended program, using the `-static' option. Run this program on a machine with a recent 3.0-current SMP kernel and only one CPU enabled (sysctl -w kern.smp_active=1). ---------- #include #include #include #include #include #include #include #include #include #include #ifndef NUMCHILD #define NUMCHILD 3 #endif struct child { pid_t pid; int fd; } children[NUMCHILD]; char okbuf[1]; char childbuf[1]; void touchbuf(char *buf); int main(int argc,char **argv) { int i; pid_t pid; int pipefd[2]; char *buf; int exitcode; exitcode = 0; buf = malloc(8*1024); for (i=0;i