From owner-freebsd-hackers@freebsd.org Thu Jul 18 02:37:30 2019 Return-Path: Delivered-To: freebsd-hackers@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 C4B3BBC227 for ; Thu, 18 Jul 2019 02:37:30 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34E3F6F34F; Thu, 18 Jul 2019 02:37:30 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.69] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 93F771E11E; Thu, 18 Jul 2019 02:37:29 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.1b.0.190715 Date: Wed, 17 Jul 2019 19:37:25 -0700 Subject: Re: For a first time completed S.M.A.R.T captive test From: Ravi Pokala To: "freebsd-hackers@freebsd.org" , , Message-ID: <481465DB-D5EE-4019-A2DB-DBA4D46FE312@freebsd.org> Thread-Topic: For a first time completed S.M.A.R.T captive test Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-Rspamd-Queue-Id: 34E3F6F34F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.92)[-0.921,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jul 2019 02:37:30 -0000 Hi Domagoj The "captive" test is blocking -- meaning the drive won't indicate command completion for multiple hours in the case of modern large HDDs -- so the FreeBSD driver will almost certainly timeout before completion. That in turn will trigger recovery mechanisms, which will include a soft-reset, which is where the "Interrupted (host reset)" comes from. You almost always want to do the "off-line" test; that tells the drive firmware to start the test and run it in the background. It will indicate command completion in a second or two, but the test will still take the same amount of time. But in the case of the "off-line" test, the drive is responsive to the host even while the test runs. When the drive receives a command from the host, it will pause the test, service the host request, and then resume the test. I work at a storage company, I've been running ATA self-test for 15+ years, and I've never understood why the "captive" test even exists. *Maybe* there were dedicated drive test systems that had huge timeouts, back in the PATA days? Or even horrible DOS stuff that didn't even have a timeout, and just waited for the interrupt forever? In any case, I would simply not bother with the "captive" test modes. -Ravi (rpokala@)