Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: don't use wapbl (-o log) on / (/dev)



On Mon, 16 Feb 2009 00:28:01 +0900, FUKAUMI Naoki wrote:
At Mon, 16 Feb 2009 00:23:22 +0900,
FUKAUMI Naoki wrote:
don't use wapbl (-o log) on / (/dev) because it leads silent data
corruption on (at least) msdosfs. it was introduced in

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/ufs/ffs/ffs_vnops.c.diff?r1=1.105&r2=1.106 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/ufs/ffs/ffs_vnops.c.diff?r1=1.104.4.1&r2=1.104.4.2

do

 $ mount_msdos XXX /mnt
 $ cp non-empty-file /mnt/
 $ umount /mnt
 $ mount_msdos XXX /mnt
 $ ls -l /mnt/

then you can see 0 byte non-empty-file.

I assume this is related (and so doesn't need to be PRed separately),
but I'm seeing the following:

(1) Copy a large file (e.g. a NetBSD installer ISO file) onto a USB
pen drive on a system not running WAPBL.
(2) Mount said pen drive with mount_msdos on a system running WAPBL.
(3) Try copying the file to a logged file system.

With GENERIC on 5.99.7/amd64, eventually I get a message saying there
was an I/O error.  The file ends up being incomplete on the target file
system.  There isn't a specific data size at which it fails
predictably.  (One time it failed at around 200MB, another time at
around 140MB.)  Then when unmounting the pen drive, I see the following
on the console: "sd0: cache synchronization failed".

If I use a DEBUG+DIAGNOSTIC kernel, the situation is the same until I
unmount the pen drive, at which point the kernel panics like so:

panic: kernel diagnostic assertion "LIST_EMPTY(&vp->v_dirtyblkhd)" failed: file "/home/disciple/netbsd-current/usr/src/sys/kern/vfs_subr.c", line 867
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip ffffffff802396a5 cs 8 rflags 246 cr2 7f7ffda03000 cpl 0 rsp ffff8000247578d0
Stopped in pid 464.1 (umount) at        netbsd:breakpoint+0x5:   leave
db{0}> bt
breakpoint() at netbsd:breakpoint+0x5
panic() at netbsd:panic+0x249
__kernassert() at netbsd:__kernassert+0x2d
vinvalbuf() at netbsd:vinvalbuf+0x206
spec_close() at netbsd:spec_close+0x8d
VOP_CLOSE() at netbsd:VOP_CLOSE+0x62
msdosfs_unmount() at netbsd:msdosfs_unmount+0x89
VFS_UNMOUNT() at netbsd:VFS_UNMOUNT+0x2e
dounmount() at netbsd:dounmount+0x14b
sys_unmount() at netbsd:sys_unmount+0x11c
syscall() at netbsd:syscall+0xb6

(If I use DEBUG+DIAGNOSTIC, but disable WAPBL on /, I just get the
"sd0: cache synchronization failed" message.  I assume that's a
separate issue, likely related to PR 40442.)

If this needs to be PRed separately, please let me know.

Regards,

Dave




Home | Main Index | Thread Index | Old Index