ffs_copyonwrite: locking against myself - snapshot related panic

Bruce Cran bruce at cran.org.uk
Sun Jul 6 09:31:37 PDT 2003


I created snapshots of /var, /, /tmp and /usr, and then continued to use the
system normally, after beginning to move one of the snapshots across to an nfs
directory, then cancelling the move.  When I later came to install lftp 
from /usr/ports/ftp/lftp, I had the following panic:

ffs_copyonwrite: locking against myself

since a debug kernel wasn't built, I rebooted, fsck'd the filesystems and 
rebuilt the kernel.   I then proceeded to trigger the panic again by running
'make install' in /usr/ports/ftp/lftp, and got the following trace:

Debugger
panic
lockmgr
BUF_TIMELOCK
getblk
breadn
bread
ffs_alloccg
ffs_hashalloc
ffs_alloc
ffs_balloc_ufs2
ffs_copyonwrite
spec_xstrategy
spec_specstrategy
spec_vnoperate
bwrite
bawrite
ffs_nodealloccg
ffs_hashalloc
ffs_valloc
ufs_makeinode
ufs_create
ufs_vnoperate
VOP_CREATE
vn_open_cred
vn_open
kern_open
open
syscall
Xint0x80_syscall
syscall(5, FreeBSD ELF32, open)

I can trigger this on demand, whether the 'nvidia' module is loaded or not. All
my slices are UFS2, and have been fsck'd in single-user mode.  The second panic
I had generated messages about recovering errors for about 30 seconds when I 
fsck'd /usr, so I don't know what kind of state it's now in.  The panic seems
to have disappeared after I deleted the snapshot files.   Are snapshots
supposed to be able to be moved/copied around like images - or 
are they part of the 'real' filesystem, and so have to be treated carefully?

--
Bruce Cran


More information about the freebsd-current mailing list