kern/60175: 5.2-RC: disk errors cause panic in softupdates code
Simun Mikecin
sime at logos.hr
Fri Dec 12 02:00:24 PST 2003
>Number: 60175
>Category: kern
>Synopsis: 5.2-RC: disk errors cause panic in softupdates code
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Dec 12 02:00:21 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Simun Mikecin
>Release: FreeBSD 5.2-RC i386
>Organization:
>Environment:
System: FreeBSD data.home.hr 5.2-RC FreeBSD 5.2-RC #0: Thu Dec 11 13:41:50 CET 2003 root at data.home.hr:/usr/obj/usr/src/sys/DATA i386
>Description:
It looks softupdates code doesn't like disk errors of any kind. I
get panic that says:
"softdep_move_dependencies: need merge code"
It can be found in /sys/ufs/ffs/ffs_softdep.c
This is what I tried:
1) I have a floppy that has some bad sectors. Making UFS2 filesystem
with softupdates enabled on that floppy, and trying to write some
files to it causes a panic (before that I get few error reports in
dmesg). If I try it with softupdates disabled I only get errors in
dmesg and partially corrupted filesystem, but no panic.
2) I have a DVD media with UFS2 filestem on it (tunefs -p says
softupdates are enabled). I put it in a DVD-ROM drive (that can only
read), mount it read-only and everything works OK. But If I don't
use '-ur' as a mount option it will be mounted read-write (which is
default). System will even let me write files to the mounted file
system (at least it looks that way, nothing can really be written to
the media). After some time errors show in dmesg saying that WRITE
operation is not permitted, but after some time I get a panic. If I
try the same thing with DVD media that was written with softupdates
disabled, no panic occurs.
3) I tried using DVD+RW media on ATAPI DVD burner by using
bsdlabel/newfs/mount. Doing it by using "acd" device implemented in
atapi-cd.c works ok. But using it by using SCSI emulation layer
(device "cd") atapi-cam.c produces errors ("Logical unit not ready,
long write in progress") when writing to the media (I think this is
a well known bug by now). So I suppose it then behaves to the
VFS/FFS layer like a media with bad sectors. Again it panics after
some time of writing to it only when softupdates are enabled.
Those three scenarios I tried are not very important but I suppose
it would be the same with a hard disk that has some sectors gone
bad, or that has trouble reading/writing of any kind, which would be
a very bad thing.
>How-To-Repeat:
Try one of the scenarios from above.
>Fix:
Disable softupdates, until softupdates code gets better.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list