From owner-freebsd-current@FreeBSD.ORG Sun Feb 28 04:59:51 2010 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id C4D2F106566C; Sun, 28 Feb 2010 04:59:49 +0000 (UTC) (envelope-from nork@FreeBSD.org) Date: Sun, 28 Feb 2010 13:59:47 +0900 From: Norikatsu Shigemura To: Alexander Motin Message-Id: <20100228135947.acf387df.nork@FreeBSD.org> In-Reply-To: <20100228133145.e0c8bc68.nork@ninth-nine.com> References: <20100218023945.848cd01a.nork@FreeBSD.org> <4B7EF63C.7030008@FreeBSD.org> <20100226014718.c0a07c84.nork@FreeBSD.org> <20100228133145.e0c8bc68.nork@ninth-nine.com> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org, freebsd-current@FreeBSD.org, Shigemura , Norikatsu Subject: Re: ATA_CAM-ed mvsata(4) on OpenRD-client X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 28 Feb 2010 04:59:51 -0000 Hi mav. On Sun, 28 Feb 2010 13:31:45 +0900 Norikatsu Shigemura wrote: > I didn't know what's happen. So I'll report code trace and > cam related struct dump with ddb which I made. Code trace with printf debug: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - periphdriver_init() @sys/cam/cam_periph.c -> adainit() @sys/cam/ata/ata_da.c OK -> probe_periph_init() @sys/cam/scsi/scsi_xpt.c OK -> pmpinit() @sys/cam/ata/ata_pmp.c FREEZE -> xpt_register_async() @sys/cam/cam_xpt.c -> xpt_for_all_devices() @sys/cam/cam_xpt.c -> xptbustraverse() @sys/cam/cam_xpt.c - - - - - in xptbustraverse() - - - - - for (bus = (start_bus ? start_bus : TAILQ_FIRST(&xsoftc.xpt_busses)); bus != NULL; bus = next_bus) { next_bus = TAILQ_NEXT(bus, links); mtx_unlock(&xsoftc.xpt_topo_lock); -> CAM_SIM_LOCK(bus->sim); freeze at this point, because of not catch lock, in the first loop. retval = tr_func(bus, arg); CAM_SIM_UNLOCK(bus->sim); if (retval == 0) return(retval); mtx_lock(&xsoftc.xpt_topo_lock); } - - - - - in xptbustraverse() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - So I dumped following mtx, cam_eb IN (0xc36c88c0, 0xc3770840, 0xc35df5c0)->sim. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - db> show lock 0xc35e5974 class: spin mutex name: flags: {SPIN} state: {OWNED, CONTESTED} owner: 0xc36c8d00 (tid 0, pid -1062090240, "") db> show lock 0xc35e5774 class: sleep mutex name: ATA state lock flags: {DEF} state: {UNOWNED} db> show lock 0xc0be5204 class: sleep mutex name: XPT lock flags: {DEF} state: {UNOWNED} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -