Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2016 16:39:51 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        DemIS <demis@yandex.ru>, Steven Hartland <killing@multiplay.co.uk>, "freebsd-fs@freebsd.org" <freebsd-fs@FreeBSD.org>
Subject:   Re: Kernel panic zio.c, line: 270 FreeBSD 10.2 (or 10.3)
Message-ID:  <5707B4A7.4070203@FreeBSD.org>
In-Reply-To: <4332271457902960@web8o.yandex.ru>
References:  <1061671455578760@web3g.yandex.ru> <56C2655F.9010809@multiplay.co.uk> <1076701455583595@web2g.yandex.ru> <56C2782E.2010404@multiplay.co.uk> <2311371455610101@web11j.yandex.ru> <56C2E7A6.9090004@multiplay.co.uk> <4332271457902960@web8o.yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13/03/2016 23:02, DemIS wrote:
> #10 0xffffffff8244ef8b in dbuf_read (db=0xfffff803b1e8de00, zio=0xfffff80071def398, flags=6)
>     at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c:621
...
> #11 0xffffffff8245a777 in dmu_spill_hold_by_dnode (dn=0xfffff805c8be5000, flags=6, tag=0x0, dbp=0xfffff802f48dfa28)
>     at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c:333
>         db = (dmu_buf_impl_t *) 0xfffff803b1e8de00
>         err = -512


If you still have this crash dump, then can you please do the following in kgdb?

set print pretty
fr 11
p/x *dn
fr 10
p/x *db

I suspect that the following change might be able to prevent future corruption
of your files, but it won't help with already corrupted files:
https://github.com/openzfs/openzfs/pull/81/commits/ee09d80ceafa7ff7930d1e45dddc21ca3d7a87cb

The following completely untested patch might help to avoid panics with the
corrupted files, but no promises:

diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
index 4396c01334015..94b353d62e3e6 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
@@ -329,7 +329,10 @@ dmu_spill_hold_by_dnode
 		rw_exit(&dn->dn_struct_rwlock);

 	ASSERT(db != NULL);
-	err = dbuf_read(db, NULL, flags);
+	if (db->db.db_size > 0)
+		err = dbuf_read(db, NULL, flags);
+	else
+		err = ENOENT;
 	if (err == 0)
 		*dbp = &db->db;
 	else

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5707B4A7.4070203>