Subject: pkg/13149: CFS on NetBSD results in weird IO errors
To: None <gnats-bugs@gnats.netbsd.org>
From: None <urban@boquist.net>
List: netbsd-bugs
Date: 06/09/2001 12:54:41
>Number: 13149
>Category: pkg
>Synopsis: CFS is broken on NetBSD
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 09 03:53:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Urban Boquist
>Release: NetBSD-1.5V
>Organization:
Carlstedt Research & Technology AB, Sweden
>Environment:
System: NetBSD iller 1.5V NetBSD 1.5V (ILLER-$Revision: 1.36 $) #0: Mon May 28 01:36:50 CEST 2001 root@iller:/usr/src/sys/arch/i386/compile/ILLER i386
Architecture: i386
Machine: i386
>Description:
I have been trying to use CFS on NetBSD for several times
during the last few years, but never got it fully working. Now that
CFS is in pkgsrc I thought I would give it a try
again. Unfortunately I still see the same problems.
A reliable way to provoke an error for me is to run a "cvs
checkout" or "cvs update" on top of a CFS file system.
Eventually CVS will stop with an error about something that
should be a directory have changed into a regular file.
After a long timeout, the file becomes a directory again.
See the example below.
>How-To-Repeat:
Start CFS:
- install pkgsrc/security/cfs
- echo "/null -maproot=root localhost" >> /etx/exports
- make sure you run rpcbind and mountd, but not nfsd
- start cfsd
- mkdir /crypt /null
- mount -o intr,-2 127.0.0.1:/null /crypt
Then use CVS on top of CFS. Below is a transcript demo:
$ cfs_mkdir cfs1
Key:
Again:
$ cfs_attach cfs1
Key:
$ cd /crypt/cfs1/
$ env CVS_RSH=ssh cvs -d anoncvs@anoncvs.netbsd.org:/cvsroot co doc
cvs server: Updating doc
U doc/3RDPARTY
U doc/BRANCHES
U doc/CHANGES
U doc/CHANGES.prev
U doc/HACKS
U doc/LAST_MINUTE
U doc/MIRRORS
U doc/README.files
U doc/README.patchrel
U doc/README.sup
U doc/TODO
U doc/pkg-CHANGES
U doc/pkg-CHANGES-1997
U doc/pkg-CHANGES-1998
U doc/pkg-CHANGES-1999
U doc/pkg-CHANGES-2000
cvs server: Updating doc/i386
cvs server: Updating doc/pmax
cvs server: Updating doc/style
cvs [checkout aborted]: cannot open doc/sun3/CVS/Root: Not a directory
$ ls -liga doc/sun3
total 4
889133 drwxr-xr-x 3 boquist wheel 512 Jun 7 22:50 ./
889029 drwxr-xr-x 7 boquist wheel 2048 Jun 7 22:50 ../
889134 -rwxr-xr-x 2 boquist wheel 512 Jun 7 22:50 CVS*
$ while true; do date; ls -liga doc/sun3; sleep 60; done
Thu Jun 7 22:52:41 CEST 2001
total 4
889133 drwxr-xr-x 3 boquist wheel 512 Jun 7 22:50 ./
889029 drwxr-xr-x 7 boquist wheel 2048 Jun 7 22:50 ../
889134 -rwxr-xr-x 2 boquist wheel 512 Jun 7 22:50 CVS*
Thu Jun 7 22:53:42 CEST 2001
total 4
889133 drwxr-xr-x 3 boquist wheel 512 Jun 7 22:50 ./
889029 drwxr-xr-x 7 boquist wheel 2048 Jun 7 22:50 ../
889134 -rwxr-xr-x 2 boquist wheel 512 Jun 7 22:50 CVS*
.
.
[snip]
.
.
Fri Jun 8 00:04:46 CEST 2001
total 4
889133 drwxr-xr-x 3 boquist wheel 512 Jun 7 22:50 ./
889029 drwxr-xr-x 7 boquist wheel 2048 Jun 7 22:50 ../
889134 -rwxr-xr-x 2 boquist wheel 512 Jun 7 22:50 CVS*
Fri Jun 8 00:05:46 CEST 2001
total 4
889133 drwxr-xr-x 3 boquist wheel 512 Jun 7 22:50 ./
889029 drwxr-xr-x 7 boquist wheel 2048 Jun 7 22:50 ../
889134 drwxr-xr-x 2 boquist wheel 512 Jun 7 22:50 CVS/
If the "cvs checkout" succeeds I can usually very quickly provoke the
same error by running "cvs update" repeatedly until it fails. This is
on NetBSD-1.5V. However, I have seen the same problem on NetBSD-1.5
too, although it usually takes longer to provoke the problem.
>Fix:
Unknown, but my guess would be a problem somewhere in the NetBSD
kernel NFS code. CFS has been around for a really long time, and
although the source is a bit dated, it seems to work very reliably on
most other OSes.
>Release-Note:
>Audit-Trail:
>Unformatted: