From owner-freebsd-bugs Wed Feb 26 12:10:26 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54C6E37B401 for ; Wed, 26 Feb 2003 12:10:23 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5BDB43F93 for ; Wed, 26 Feb 2003 12:10:13 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h1QKADNS087167 for ; Wed, 26 Feb 2003 12:10:13 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h1QKAD2W087166; Wed, 26 Feb 2003 12:10:13 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF0BC37B401 for ; Wed, 26 Feb 2003 12:03:53 -0800 (PST) Received: from fep3.012.net.il (fep3.012.net.il [212.117.129.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C02443FA3 for ; Wed, 26 Feb 2003 12:03:52 -0800 (PST) (envelope-from mapc@alchemy.ath.cx) Received: from alchemy.oven.org ([80.178.65.186]) by fep3.012.net.il with ESMTP id <20030226200337.KHSG25546.fep3@alchemy.oven.org> for ; Wed, 26 Feb 2003 22:03:37 +0200 Received: from alchemy.oven.org (island@localhost [127.0.0.1]) by alchemy.oven.org (8.12.6/8.12.7) with ESMTP id h1NIhRw0007008 for ; Sun, 23 Feb 2003 20:43:27 +0200 (IST) (envelope-from mapc@alchemy.ath.cx) Received: (from mapc@localhost) by alchemy.oven.org (8.12.6/8.12.7/Submit) id h1NIhO5k007007; Sun, 23 Feb 2003 20:43:24 +0200 (IST) Message-Id: <200302231843.h1NIhO5k007007@alchemy.oven.org> Date: Sun, 23 Feb 2003 20:43:24 +0200 (IST) From: Roman Shterenzon To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/48715: atacontrol detach panics system when ATAPICAM is used. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 48715 >Category: kern >Synopsis: atacontrol detach panics system when ATAPICAM is used. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 26 12:10:12 PST 2003 >Closed-Date: >Last-Modified: >Originator: Roman Shterenzon >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD alchemy.oven.org 4.7-STABLE FreeBSD 4.7-STABLE #0: Fri Feb 14 20:22:34 IST 2003 root@alchemy.oven.org:/local/src/sys/compile/ALCHEMY i386 >Description: When the kernel is configured with ATAPICAM (and without acd, I don't know if it matters), then running atacontrol reinit [channel] will make the system panic. The primal reason for me trying to do that, is that cdda2wav sometimes (usually the second time run) will hang the cd device, making it unaccessible. The system has to be restarted, camcontrol reset or atacontrol reinit don't help. The cdda2wav hangs in cbwait. The following was sent to me by Thomas Quinot to address the cdda2wav and cd hang problem (however, it doesn't solve the problem): Le 2002-12-25, Roman Shterenzon écrivait : > 1001 15780 15044 0 -6 0 1528 872 cbwait DL+ p6 0:00.00 cdda2wav -x Hum that looks awfully like a race condition between the CAM layer and the ATAPI code. As a work-around you can try to reinitialize both using 'atacontrol reinit'. If you have no other SCSI devices, it would also be interesting if you could try whether the enclosed patch works around this problem. Thomas. Index: cam_periph.c =================================================================== RCS file: /home/ncvs/src/sys/cam/cam_periph.c,v retrieving revision 1.24.2.2 diff -u -r1.24.2.2 cam_periph.c --- cam_periph.c 22 Sep 2002 07:15:32 -0000 1.24.2.2 +++ cam_periph.c 29 Dec 2002 11:36:36 -0000 @@ -717,7 +717,7 @@ { int s; - s = splsoftcam(); + s = splbio(); if ((ccb->ccb_h.pinfo.index != CAM_UNQUEUED_INDEX) || ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INPROG)) tsleep(&ccb->ccb_h.cbfcnp, PRIBIO, "cbwait", 0); -- Thomas.Quinot@Cuivre.FR.EU.ORG ------- I'll be glad to assist, i.e. build kernel with kernel debugger, etc. >How-To-Repeat: Build a kernel with ATAPICAM and without acd, run atacontrol reinit on the ATAPI cdrom channel. It will produce a crash. >Fix: The panic should be a simple thing to solve, I guess. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message