tech-kern archive

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

Re: panic: ffs_valloc: dup alloc



At Fri, 19 Mar 2010 17:51:46 -0500, myself wrote:
> 
> I'm seeing a panic: ffs_valloc: dup alloc.
> Does anyone have a similar panic?
> 
> The kernel is -current from March 15.
> I cannot repeat the panic reliably, but it seems to occur after
> suspend/resume (immediately or several minutes later).
> The panic occured in /home, which is a ffs on cgd on wd.
> "fsck -f" does not report any error on it.

I finally found a clue for this problem.
With the attached patch [1], my system seems to be stable again.
With the patch, I see "channel reset" [2] on resume.
Without the patch (i.e., unmodified -current), I see
a lot of "cgd0: error 5" messages [3] instead.

It seems to me that cgd is just passing EIO around, so I suspect that
errors are not correctly handled somewhere in FFS...

[1]
Index: sys/dev/ata/wd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ata/wd.c,v
retrieving revision 1.384
diff -u -r1.384 wd.c
--- sys/dev/ata/wd.c    24 Feb 2010 22:37:57 -0000      1.384
+++ sys/dev/ata/wd.c    5 Oct 2010 20:46:04 -0000
@@ -489,9 +489,9 @@
        }
 
        /* If device invalidated (e.g. media change, door open,
-        * device suspension), then error.
+        * XXX device suspension), then error.
         */
-       if ((wd->sc_flags & WDF_LOADED) == 0 || !device_is_active(wd->sc_dev)) {
+       if ((wd->sc_flags & WDF_LOADED) == 0) {
                bp->b_error = EIO;
                goto done;
        }

[2]
Suspending system...
acpi0: entering state S3
Flushing disk caches: done
ath0: deleting keyix 1 w/o power
ioapic0 reenabling
wd0h: channel reset writing fsbn 1164848 (wd0 bn 31540991; cn 31290 tn 10 sn 41\
), retrying
cbb0: interrupting at ioapic0 pin 16
wd0: soft error (corrected)

[3]
ioapic0 reenabling
cgd0: error 5
cgd0: error 5
cgd0: error 5
cgd0: error 5
cgd0: error 5
cgd0: error 5
cgd0: error 5
cgd0: error 5
cgd0: error 5
cgd0: error 5
cgd0: error 5
cgd0: error 5
cgd0: error 5
cbb0: interrupting at ioapic0 pin 16

-- 
KAMADA Ken'ichi <kamada%nanohz.org@localhost>


Home | Main Index | Thread Index | Old Index