Subject: kern/37425: fss_snapshot_mount panic during fsck
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <scotte@warped.com>
List: netbsd-bugs
Date: 11/24/2007 01:25:00
>Number:         37425
>Category:       kern
>Synopsis:       fsck on a system with snapshots resulted in panic...resolved after boot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 24 01:25:00 +0000 2007
>Originator:     Scott Ellis
>Release:        NetBSD 4.99.36
>Organization:
	
>Environment:
	
	
System: NetBSD intrepid 4.99.36 NetBSD 4.99.36 (INTREPID.P5W) #1: Tue Nov 20 17:17:23 PST 2007 scotte@intrepid:/nbu/source/netbsd/src/obj.amd64/nbu/source/netbsd/src/sys/arch/amd64/compile/INTREPID.P5W amd64
Architecture: x86_64
Machine: amd64
>Description:
	

Upon reboot, fsck occurred, and the system panic'ed:

panic: ffs_snapshot_mount: 861962 already on list
Stopped in pid 18.1 (mount_ffs) at	netbsd:breakpoint+0x1:	ret
db{0}> bt
breakpoint() at netbsd:breakpoint+0x1
ffs_snapremove() at netbsd:ffs_snapremove
ffs_mount() at netbsd:ffs_mount+0x6c0
do_sys_mount() at netbsd:do_sys_mount+0x3ac
sys___mount50() at netbsd:sys___mount50+0x33
syscall() at netbsd:syscall+0x177

Continuing caused a sync and reboot, at which time the filesystem was
pronounced clean, and all seems well.

>How-To-Repeat:
	

Torturing my system by doing (effectively):

fssconfig -c fss0 / /.foobar/`date`
fssconfig -u fss0
vnconfig -r vnd0 /.foobar/`date`
mount -o ro vnd0a /.woof/`date`
umount -f /.woof/`date`
vnconfig -u vnd0
rm /.foobar/`date`

(In a script, so that properly removes files/dirs/etc.)

Eventually the system froze (could not break into DDB it seems), seemingly
related to doing an 'ls' in one of the mounted snapshots while it was
being removed.

Reset the system and enjoy.

>Fix:
	

>Unformatted: