kern/100365: snapshots on busy filesystem fail
Stephen J. Roznowski
sjr at comcast.net
Sun Jul 16 02:00:33 UTC 2006
>Number: 100365
>Category: kern
>Synopsis: snapshots on busy filesystem fail
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Jul 16 02:00:31 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Stephen J. Roznowski
>Release: FreeBSD 6.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD 6.1-STABLE FreeBSD 6.1-STABLE #3: Sat Jul 8 22:34:39 EDT 2006
>Description:
Taking snapshots while creating/deleting directories leads
to corrupted snapshots.
>How-To-Repeat:
I'm running the following script as root:
#!/bin/sh
FS=/usr/ports
for i in 1 2 3 4 5 6 7 8 9 10
do
echo $i
mksnap_ffs $FS $FS/.snap/snapshot
fsck_ffs $FS/.snap/snapshot
/bin/rm -f $FS/.snap/snapshot
done
If the filesystem is quiet, the script completes without errors.
In another window, I'm running the following:
# mkdir /usr/ports/.a
# cd /usr/ports/.a
# while (1)
> mkdir a b c d e f g h i j k l m n o p
> rmdir a b c d e f g h i j k l m n o p
> sleep 1
> end
Now, when I run the previous script, occasionally I'll get snapshots
that are corrupt when the fsck is checking them. [Appears to be about
50% of the time....]
Additionally, I'm seeing the following error:
mksnap_ffs: Cannot create /usr/ports/.snap/snapshot: Resource temporarily unavailable
/usr/ports/.snap/snapshot is not a disk device
and dmesg shows:
fsync: giving up on dirty
0xffffff002fcee9b0: tag devfs, type VCHR
usecount 1, writecount 0, refcount 635 mountedhere 0xffffff0000e7c600
flags ()
v_object 0xffffff002ff5a460 ref 0 pages 2556
lock type devfs: EXCL (count 1) by thread 0xffffff002ac52260 (pid 71385)
dev ad0s1f
fsync: giving up on dirty
0xffffff002fcee9b0: tag devfs, type VCHR
usecount 1, writecount 0, refcount 634 mountedhere 0xffffff0000e7c600
flags ()
v_object 0xffffff002ff5a460 ref 0 pages 2552
lock type devfs: EXCL (count 1) by thread 0xffffff002ac52260 (pid 71385)
dev ad0s1f
I can provide more system configuration details if needed.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list