From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 17:29:44 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48E09106564A for ; Sat, 5 Nov 2011 17:29:44 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.31.35]) by mx1.freebsd.org (Postfix) with ESMTP id 0A8AB8FC1A for ; Sat, 5 Nov 2011 17:29:43 +0000 (UTC) Received: from [87.79.158.243] (helo=fabiankeil.de) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1RMjtF-00081x-FN; Sat, 05 Nov 2011 18:18:45 +0100 Date: Sat, 5 Nov 2011 18:17:22 +0100 From: Fabian Keil To: Brandon Falk Message-ID: <20111105181722.501dea14@fabiankeil.de> In-Reply-To: <20111105164212.GB50362@localhost> References: <20111105164212.GB50362@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/1XMPc1bDaQAs+/2SkUYLunp"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: freebsd-hackers@freebsd.org Subject: Re: cdparanoia stuck in cbwait X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2011 17:29:44 -0000 --Sig_/1XMPc1bDaQAs+/2SkUYLunp Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Brandon Falk wrote: > I was got some read errors when I was reading from my disk, which is > fine. But then cdparanoia starting to no longer respond. Now it's > zombied and sitting in cbwait. `kill -9 ` does not take it down, it > seems like it's stuck in the kernel (?). Is this an issue to look at > cdparanoia for, or to look in the kernel? Perhaps cdparanoia or the > kernel should have some sort of a timeout? Currently it looks like the > only fix is a full reboot. I believe this is a kernel issue. Processes can become unresponsive and unkillable while waiting for blocks to be read and in case of read failures that can take quite some time. Note that the kernel itself has a somewhat high default retry count which multiplies the retries the firmware already does transparently, so a failed read operation can take minutes to complete while a successful one takes fractions of a second. And after the kernel eventually reports a read failure the application may "smartly" decide to retry a few times as well, again multiplying the time of the delay. Before ripping CDs and DVDs with invalid sectors I therefore set kern.cam.cd.retry_count to 0 and patched vobcopy to skip invalid-sector ranges faster. For some DVDs, this reduces the ripping time from several hours to about 20 minutes. How long did you wait for cdparanoia to die? If you only waited a couple of minutes, it's possible that rebooting may not have been necessary. Fabian --Sig_/1XMPc1bDaQAs+/2SkUYLunp Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk61b6QACgkQBYqIVf93VJ2HwACfbkpBtrqFQjOUHzuYqmYidXOg KD0AnA6ps/oq0Nn6lKjkt2ywS3ECO3K0 =j3Lk -----END PGP SIGNATURE----- --Sig_/1XMPc1bDaQAs+/2SkUYLunp--