From owner-freebsd-stable@freebsd.org Tue Aug 8 07:23:37 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1D12DC7A7A; Tue, 8 Aug 2017 07:23:37 +0000 (UTC) (envelope-from emz@norma.perm.ru) Received: from elf.hq.norma.perm.ru (mail.norma.perm.ru [IPv6:2a00:7540:1::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.norma.perm.ru", Issuer "Vivat-Trade UNIX Root CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C2A573506; Tue, 8 Aug 2017 07:23:36 +0000 (UTC) (envelope-from emz@norma.perm.ru) Received: from bsdrookie.norma.com. (net206-94.perm.ertelecom.ru [46.146.206.94] (may be forged)) by elf.hq.norma.perm.ru (8.15.2/8.15.2) with ESMTPS id v787NSZW037580 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 8 Aug 2017 12:23:29 +0500 (YEKT) (envelope-from emz@norma.perm.ru) Subject: Re: a strange and terrible saga of the cursed iSCSI ZFS SAN To: freebsd-fs@freebsd.org References: <1bd10b1e-0583-6f44-297e-3147f6daddc5@norma.perm.ru> Cc: freebsd-stable@FreeBSD.org From: "Eugene M. Zheganin" Message-ID: Date: Tue, 8 Aug 2017 12:23:28 +0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1bd10b1e-0583-6f44-297e-3147f6daddc5@norma.perm.ru> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spamd-Result: default: False [1.50 / 25.00] BAYES_HAM(-3.00)[100.00%] RBL_SPAMHAUS_PBL(2.00)[94.206.146.46.zen.spamhaus.org : 127.0.0.10] HFILTER_HOSTNAME_UNKNOWN(2.50)[] DMARC_NA(0.00)[norma.perm.ru] MIME_GOOD(-0.10)[text/plain] R_DKIM_NA(0.00)[] R_SPF_SOFTFAIL(0.00)[~all] MID_RHS_MATCH_FROM(0.00)[] RECEIVED_SPAMHAUS(0.00)[94.206.146.46.zen.spamhaus.org] RCPT_COUNT_2(0.00)[] TO_MATCH_ENVRCPT_ALL(0.00)[] FROM_HAS_DN(0.00)[] TO_DN_NONE(0.00)[] FROM_EQ_ENVFROM(0.00)[] RCVD_COUNT_1(0.00)[] ONCE_RECEIVED(0.10)[] X-Rspamd-Server: localhost X-Rspamd-Scan-Time: 2.81 X-Rspamd-Queue-ID: v787NSZW037580 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Aug 2017 07:23:37 -0000 On 05.08.2017 22:08, Eugene M. Zheganin wrote: > Hi, > > > I got a problem that I cannot solve just by myself. I have a iSCSI zfs > SAN system that crashes, corrupting it's data. I'll be short, and try > to describe it's genesis shortly: > > 1) autumn 2016, SAN is set up, supermicro server, external JBOD, > sandisk ssds, several redundant pools, FreeBSD 11.x (probably release, > don't really remember - see below). > > 2) this is working just fine until early spring 2017 > > 3) system starts to crash (various panics): > > panic: general protection fault > panic: page fault > panic: Solaris(panic): zfs: allocating allocated > segment(offset=6599069589504 size=81920) > panic: page fault > panic: page fault > panic: Solaris(panic): zfs: allocating allocated > segment(offset=8245779054592 size=8192) > panic: page fault > panic: page fault > panic: page fault > panic: Solaris(panic): zfs: allocating allocated > segment(offset=1792100934656 size=46080) > > 4) we memtested it immidiately, no problems found. > > 5) we switch sandisks to toshibas, we switch also the server to an > identical one, JBOD to an identical one, leaving same cables. > > 6) crashes don't stop. > > 7) we found that field engineers physically damaged (sic!) the SATA > cables (main one and spare ones), and that 90% of the disks show ICRC > SMART errors. > > 8) we replaced the cable (brand new HP one). > > 9) ATA SMART errors stopped increasing. > > 10) crashes continue. > > 11) we decided that probably when ZFS was moved over damaged cables > between JBODs it was somehow damaged too, so now it's panicking > because of that. so we wiped the data completely, reinitialized the > SAN system and put it back into the production. we even dd'ed each > disk with zeroes (!) - just in case. Important note: the data was > imported using zfs send from another, stable system that is runing in > production in another DC. > > 12) today we got another panic. > > btw the pools look now like this: > > > # zpool status -v > pool: data > state: ONLINE > status: One or more devices has experienced an error resulting in data > corruption. Applications may be affected. > action: Restore the file in question if possible. Otherwise restore the > entire pool from backup. > see: http://illumos.org/msg/ZFS-8000-8A > scan: none requested > config: > > NAME STATE READ WRITE CKSUM > data ONLINE 0 0 62 > raidz1-0 ONLINE 0 0 0 > da2 ONLINE 0 0 0 > da3 ONLINE 0 0 0 > da4 ONLINE 0 0 0 > da5 ONLINE 0 0 0 > da6 ONLINE 0 0 0 > raidz1-1 ONLINE 0 0 0 > da7 ONLINE 0 0 0 > da8 ONLINE 0 0 0 > da9 ONLINE 0 0 0 > da10 ONLINE 0 0 0 > da11 ONLINE 0 0 0 > raidz1-2 ONLINE 0 0 62 > da12 ONLINE 0 0 0 > da13 ONLINE 0 0 0 > da14 ONLINE 0 0 0 > da15 ONLINE 0 0 0 > da16 ONLINE 0 0 0 > > errors: Permanent errors have been detected in the following files: > > data/userdata/worker208:<0x1> > > pool: userdata > state: ONLINE > status: One or more devices has experienced an error resulting in data > corruption. Applications may be affected. > action: Restore the file in question if possible. Otherwise restore the > entire pool from backup. > see: http://illumos.org/msg/ZFS-8000-8A > scan: none requested > config: > > NAME STATE READ WRITE CKSUM > userdata ONLINE 0 0 216K > mirror-0 ONLINE 0 0 432K > gpt/userdata0 ONLINE 0 0 432K > gpt/userdata1 ONLINE 0 0 432K > > errors: Permanent errors have been detected in the following files: > > userdata/worker36:<0x1> > userdata/worker30:<0x1> > userdata/worker31:<0x1> > userdata/worker35:<0x1> > > 12) somewhere between p.5 and p.10 the pool became deduplicated (not > directly connected to the problem, just for production reasons). > > > So, concluding: we had bad hardware, we replaced EACH piece (server, > adapter, JBOD, cable, disks), and crashes just don't stop. We have 5 > another iSCSI SAN systems, almost fully identical that don't crash. > Crashes on this particular system began when it was running same set > of versions that stable systems. > > So far my priority version is that something was broken in the iSCSI+zfs stack somewhere between r310734 (most recent version on my SAN systems that works) and r320056 (probably earlier, but r320056 is the first revision with documented crash). So I downgraded back to r310734 (from a 11.1-RELEASE, which is affected, if I'm right). Some things speak pro this version: - the system was stable pre-spring 2017, before the upgrade happened - zfs corruption happens _only_ on the pools that the iSCSI is serving from, no corruption happens on the zfs pools that have nothing to do with providing zvils as iSCSI targets (and this seems to be the most convincing point). - the faulty hardware was changed. though it was changed to a identical hardware, BUT I have the very same set of identical hardware working in almost identical environment under r310734 in another DC. so far I'm not sure, because only 20 hours passed since the downgrade. However, if the system will be stable for more than a week (was never stable that long on recent revisions), it will prove I'm right and I'll file the PR. Thanks. Eugene.