From owner-freebsd-current@freebsd.org Wed Nov 20 22:52:55 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6398C1C4769 for ; Wed, 20 Nov 2019 22:52:55 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47JHyv23Qwz4TVr for ; Wed, 20 Nov 2019 22:52:55 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (c-73-225-95-104.hsd1.wa.comcast.net [73.225.95.104]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id xAKMqrZr067346 (version=TLSv1.2 cipher=AES128-SHA bits=128 verify=NO); Wed, 20 Nov 2019 14:52:54 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: g_vfs_done():ufs/rootfs[WRITE flood on rpi3 To: bob prohaska , freebsd-current@freebsd.org References: <20191120223703.GA1208@www.zefox.net> From: Julian Elischer Message-ID: <0b658ba2-a385-e7d3-cdec-2036d0e29ee0@freebsd.org> Date: Wed, 20 Nov 2019 14:52:48 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <20191120223703.GA1208@www.zefox.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 47JHyv23Qwz4TVr X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.89 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.94)[-0.938,0]; NEURAL_HAM_LONG(-0.95)[-0.952,0]; ASN(0.00)[asn:36236, ipnet:204.109.60.0/22, country:US] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Nov 2019 22:52:55 -0000 On 11/20/19 2:37 PM, bob prohaska wrote: > While compiling a kernel at r354909 using a system at > r354845 the serial console flooded with messages of the > form > g_vfs_done():ufs/rootfs[WRITE(offset=266534912, length=32768)]error = 5 > > occasionally interspersed with > > mmcsd0: Error indicated: 1 Timeout > g_vfs_done():ufs/rootfs[WRITE(offset=268697600, length=32768)]emmcsd0: Error indicated: 1 Timeout > > It looked like the microSD card had finally failed, but breaking to > the debugger and rebooting seems to have recovered normally: The kernel > build picked up where it left off and the new kernel appears to boot > and run. There are a few explanations as to how this succeeded. One thing to note is that during builds, there is a large chance that any given write does not to be persisted as it is a temporary write of some kind.  As long as the next reader of the file can get it from cache, things will succeed. There is also of course the chance that the write actually succeeded but that it happened later or that the response was bad rather than the write..  This can happen due to bugs in the firmware of the card. And finally, potentially when you rebuilt, the failed steps were redone.  UFS Soft updates would help that result as it will not allow the metadata to be written until the data for the file was successfully written.. It will however be worth keeping an eye on that device..