From owner-freebsd-scsi@FreeBSD.ORG Sat Feb 4 01:07:19 2012 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08D4E106564A for ; Sat, 4 Feb 2012 01:07:19 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id E50818FC08 for ; Sat, 4 Feb 2012 01:07:18 +0000 (UTC) Received: from delta.delphij.net (c-67-188-85-47.hsd1.ca.comcast.net [67.188.85.47]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id A0703C52D; Fri, 3 Feb 2012 17:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1328317638; bh=k3tgJHuM7j7P1PkmGiHOqa7KsDNipSB11jaJrC0QF6g=; h=Message-ID:Date:From:Reply-To:MIME-Version:To:CC:Subject: Content-Type:Content-Transfer-Encoding; b=c4IVy+GNwR1oAiSvHXt13h1Vb2nu1pjxWtRLhQLTUpMR39yhIZP65oG/YC7XhblOI EBFJMFCEhdPMuBc5xzxukogCXJJtsN63STcyls7oB9/e5Oz8l5KZfICg4rVjm9h2LJ rfKfACtwixrvh6qu6HCuRPgqZPxu8UhmHJpkHF70= Message-ID: <4F2C84C5.60109@delphij.net> Date: Fri, 03 Feb 2012 17:07:17 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: freebsd-scsi@freebsd.org X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: d@delphij.net Subject: 'camcontrol rescan all' stuck in 'cbwait' X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2012 01:07:19 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, It looks like that a FreeBSD 9.0 system would stuck in 'cbwait' state when: - A drive have been hot-pulled and a new drive have been hot-plugged; - The operator does 'camcontrol rescan all' after putting the new drive in. Looking at procstat -kk -a | grep cam output, I don't think there is anything special: 12 100051 intr swi2: cambio mi_switch+0x174 ithread_loop+0x216 fork_exit+0x11f fork_trampoline+0xe 16 100142 enc_daemon0 - mi_switch+0x174 sleepq_wait+0x42 _sleep+0x317 cam_periph_getccb+0x62 enc_daemon+0x229 fork_exit+0x11f fork_trampoline+0xe 17 100143 enc_daemon1 - mi_switch+0x174 sleepq_wait+0x42 _sleep+0x317 cam_periph_getccb+0x62 enc_daemon+0x229 fork_exit+0x11f fork_trampoline+0xe 18 100144 enc_daemon2 - mi_switch+0x174 sleepq_wait+0x42 _sleep+0x317 cam_periph_getccb+0x62 enc_daemon+0x229 fork_exit+0x11f fork_trampoline+0xe 19 100145 enc_daemon3 - mi_switch+0x174 sleepq_wait+0x42 _sleep+0x317 cam_periph_getccb+0x62 enc_daemon+0x229 fork_exit+0x11f fork_trampoline+0xe 6022 100305 camcontrol - mi_switch+0x174 sleepq_wait+0x42 _sleep+0x317 cam_periph_runccb+0x5a xptioctl+0x692 devfs_ioctl_f+0x7b kern_ioctl+0x115 sys_ioctl+0xfd amd64_syscall+0x450 Xfast_syscall+0xf7 0 100090 kernel mps0 taskq mi_switch+0x174 sleepq_wait+0x42 _sleep+0x317 taskqueue_thread_loop+0xbc fork_exit+0x11f fork_trampoline+0xe 0 100093 kernel mps1 taskq mi_switch+0x174 sleepq_wait+0x42 _sleep+0x317 taskqueue_thread_loop+0xbc fork_exit+0x11f fork_trampoline+0xe 5 100091 mps_scan0 - mi_switch+0x174 sleepq_wait+0x42 _sleep+0x317 mpssas_scanner_thread+0x6a fork_exit+0x11f fork_trampoline+0xe 6 100094 mps_scan1 - mi_switch+0x174 sleepq_wait+0x42 _sleep+0x317 mpssas_scanner_thread+0x6a fork_exit+0x11f fork_trampoline+0xe 12 100092 intr irq274: mps0 mi_switch+0x174 ithread_loop+0x216 fork_exit+0x11f fork_trampoline+0xe 12 100095 intr irq275: mps1 mi_switch+0x174 ithread_loop+0x216 fork_exit+0x11f fork_trampoline+0xe Sounds like a task never gets completed (lost of interrupt?)? Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBCAAGBQJPLITFAAoJEG80Jeu8UPuzlW8IAINrxzdH+1FJOvsYJTClhJEd htttx2unhSA2njkd8kEGpdpCjxh136CTLrELySGI5s2HeinuKIPX/6fIK9cUyZjZ I3WsRQhfZG82uX1jzKXZD1877/LypkjQDUcPwY2CvoU4Ypo/+zA2BwmKrTqmSkJj f3zKj9RX2mhhljiE6S9skHh0/Z1jcA90PW7VffrKgA35PWjmXl+Cis7+Rm2WC3qh ab6OcnPez79W1amCKKBhtTsdPwMOMRV3Bn2jQXmFxRuiUwLOW1Fxydk8YW2pzxN1 d2UnT2j1cjDI0rUX74C1xsxB9wkQBBBftzv46gDfzhHhX3tKSsWco9laQUvmwi8= =iWx9 -----END PGP SIGNATURE-----