From owner-freebsd-stable@freebsd.org Mon Jul 11 11:30:41 2016 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 C90FDB8494E for ; Mon, 11 Jul 2016 11:30:41 +0000 (UTC) (envelope-from karl@denninger.net) Received: from mail.denninger.net (denninger.net [70.169.168.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D07E1CB4 for ; Mon, 11 Jul 2016 11:30:41 +0000 (UTC) (envelope-from karl@denninger.net) Received: from [192.168.1.40] (Karl-Desktop.Denninger.net [192.168.1.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.denninger.net (Postfix) with ESMTPSA id 63B2C407261 for ; Mon, 11 Jul 2016 06:30:32 -0500 (CDT) Subject: Re: Not-so stable if you take a CAM error.... To: freebsd-stable@freebsd.org References: <2b0c454b-c1a0-4b5b-e778-bf0939e90ae1@denninger.net> From: Karl Denninger Message-ID: <6e9c07e1-12a6-a7cd-f775-6b0fe5a706bc@denninger.net> Date: Mon, 11 Jul 2016 06:30:06 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms060303020901030402080803" X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 11:30:41 -0000 This is a cryptographically signed message in MIME format. --------------ms060303020901030402080803 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 7/11/2016 02:57, Ronald Klop wrote: > On Mon, 11 Jul 2016 02:54:38 +0200, Karl Denninger > wrote: > >> Got a (nasty) surprise this afternoon on my sandbox machine. >> >> I was updating some Raspberry Pi2 machines which involved taking the s= d >> card out, sticking it in an adapter and plugging it into the sandbox, >> then mounting the partition and using rsync. >> >> Unfortunately one of the cards was, unknown to me, bad and returned a >> write error during the update. >> >> The machine panic'd immediately after the CAM write error popped up. >> >> I was quite surprised by this, since (1) the SD card was (of course) >> mounted as a UFS filesystem; it shows up as a CAM device, (2) the >> machine itself is running off a ZFS root on a normal host-adapter and >> thus there is no comingling of the buffer cache and (3) there were no >> images being run from (can't, wrong architecture!) nor any system I/O >> (e.g. pagefile) going to the SD card. >> >> I certainly understand that under some circumstances (maybe even most >> circumstances) taking a hard I/O error to a system device is going to >> hose you and a panic() is arguably "least astonishment" when the price= >> of being wrong might be a corrupted system file or worse (e.g. corrupt= ed >> paged-out RSS, etc.) But I didn't expect a panic out a failed write t= o >> a device that is mounted and being used purely for data. >> >> I don't have a crash dump but can almost-certainly reproduce this if >> it's something that shouldn't happen and thus merits investigation. >> > > Hi, > > I understand you are surprised by this. I don't think it is the way it > should work. > Is there _any_ debugging information for people to use and try to help > you? Like which FreeBSD version are you running? Which FreeBSD version > was used to create the UFS fs? Does it use softupdates (SU) or also > journaling (SU+J)? > Maybe some output of dmesg? Or type of SD-card and reader. Other > people might have similar problems with similar hardware. > > Regards, > Ronald. > FreeBSD 11.0-BETA1 #0 r302489: Sat Jul 9 10:15:24 CDT 2016 =20 karl@NewFS.denninger.net:/usr/obj/usr/src/sys/KSD-SMP and FreeBSD 11.0-BETA1 #0 r302526: Sun Jul 10 10:39:31 CDT 2016 =20 karl@NewFS.denninger.net:/pics/CrossBuild/obj/arm.armv6/pics/CrossBuild/s= rc/sys/RPI2 Both blew up in the same way when stimulated with same I/O error. The filesystem in question does have softupdates enabled (the RPI images have it turned on by default) but no journaling. It's not card/reader dependent no architecture dependent; when it occurred the first time I stuck the card and reader into one of my Pis and attempted to update it there (thinking that perhaps my sandbox machine's USB port was wonky) and it blew up the Pi2 in the exact same way. This isn't (obviously, given both Intel-style and ARM machines being involved) architecture dependent. It's been a good long while since I took an actual hard I/O error that was 'visible' at the OS level (I've had plenty of disks die on ZFS over last few years but no "double failures" on a mirror or similar, and I on my servers I haven't had a UFS-based system for a while. This definitely looks like some sort of regression in the code; I've run FreeBSD for a hell of a long time and have had plenty of instances where disks have failed without having the machine go out from under me. --=20 Karl Denninger karl@denninger.net /The Market Ticker/ /[S/MIME encrypted email preferred]/ --------------ms060303020901030402080803 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC Bl8wggZbMIIEQ6ADAgECAgEpMA0GCSqGSIb3DQEBCwUAMIGQMQswCQYDVQQGEwJVUzEQMA4G A1UECBMHRmxvcmlkYTESMBAGA1UEBxMJTmljZXZpbGxlMRkwFwYDVQQKExBDdWRhIFN5c3Rl bXMgTExDMRwwGgYDVQQDExNDdWRhIFN5c3RlbXMgTExDIENBMSIwIAYJKoZIhvcNAQkBFhND dWRhIFN5c3RlbXMgTExDIENBMB4XDTE1MDQyMTAyMjE1OVoXDTIwMDQxOTAyMjE1OVowWjEL MAkGA1UEBhMCVVMxEDAOBgNVBAgTB0Zsb3JpZGExGTAXBgNVBAoTEEN1ZGEgU3lzdGVtcyBM TEMxHjAcBgNVBAMTFUthcmwgRGVubmluZ2VyIChPQ1NQKTCCAiIwDQYJKoZIhvcNAQEBBQAD ggIPADCCAgoCggIBALmEWPhAdphrWd4K5VTvE5pxL3blRQPyGF3ApjUjgtavqU1Y8pbI3Byg XDj2/Uz9Si8XVj/kNbKEjkRh5SsNvx3Fc0oQ1uVjyCq7zC/kctF7y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