From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 24 15:40:01 2012 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2459F1EE for ; Mon, 24 Dec 2012 15:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id ED1B38FC14 for ; Mon, 24 Dec 2012 15:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBOFe01v080382 for ; Mon, 24 Dec 2012 15:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBOFe0oq080377; Mon, 24 Dec 2012 15:40:00 GMT (envelope-from gnats) Resent-Date: Mon, 24 Dec 2012 15:40:00 GMT Resent-Message-Id: <201212241540.qBOFe0oq080377@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Shunsuke Suganuma <3226388001@jcom.home.ne.jp> Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 92C8ECA for ; Mon, 24 Dec 2012 15:35:32 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 79A248FC12 for ; Mon, 24 Dec 2012 15:35:32 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qBOFZWRW023724 for ; Mon, 24 Dec 2012 15:35:32 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id qBOFZW3d023723; Mon, 24 Dec 2012 15:35:32 GMT (envelope-from nobody) Message-Id: <201212241535.qBOFZW3d023723@red.freebsd.org> Date: Mon, 24 Dec 2012 15:35:32 GMT From: Shunsuke Suganuma <3226388001@jcom.home.ne.jp> To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/174684: 3dm2 (or smartctl) triggers a kernel panic X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 15:40:01 -0000 >Number: 174684 >Category: kern >Synopsis: 3dm2 (or smartctl) triggers a kernel panic >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 24 15:40:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Shunsuke Suganuma >Release: 9.1-PRERELEASE >Organization: >Environment: 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1 r244649M: amd64 with LSI 3ware 9750 SAS/SATA Storage Controller >Description: 3dm2 or smartmontools(smartctl) with 3ware 9750 (tws driver) triggers a kernel panic, when INVARIANTS/INVARIANT_SUPPORT are set as the kernel option. [3dm2] installed from ports [smartmontools] installed from ports (For supporting tws, I've modified some of the code based on the info obtained here: http://sourceforge.net/apps/trac/smartmontools/ticket/236) Panic example: <118>root{/}% smartctl -a --device=3ware,0 /dev/tws0 <118>smartctl 6.0 2012-10-10 r3643 [FreeBSD 9.1-PRERELEASE amd64] (local build) <118>Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org <118> panic: sleepq_signal: invalid NULL wait channel cpuid = 6 KDB: stack backtrace: #0 0xffffffff80830bf6 at kdb_backtrace+0x66 #1 0xffffffff807fa558 at panic+0x1d8 #2 0xffffffff8083b1a8 at sleepq_signal+0xf8 #3 0xffffffff80803267 at wakeup_one+0x27 #4 0xffffffff806a907c at tws_ioctl+0x54c #5 0xffffffff8074f00a at devfs_ioctl_f+0x7a #6 0xffffffff80844e0f at kern_ioctl+0xcf #7 0xffffffff8084509d at sys_ioctl+0xfd #8 0xffffffff80a9e211 at amd64_syscall+0x2d1 #9 0xffffffff80a88d27 at Xfast_syscall+0xf7 Uptime: 5m20s Dumping 722 out of 16338 MB:..3%..12%..23%..31%..43%..51%..62%..71%..82%..91% >How-To-Repeat: 1. build and install the kernel with: options INVARIANTS options INVARIANT_SUPPORT 2. install ports/sysutils/3dm 2.11.00.019 3. run 3dm2 with some appropriate config, then panic. >Fix: The following change seems to prevent the panic. (but I don't know if it's the correct fix for the problem.) src/sys/dev/tws/tws_user.c: @L208 in tws_passthru() [before] wakeup_one(sc->chan); [after] if ( sc->chan != NULL ) wakeup_one(sc->chan); >Release-Note: >Audit-Trail: >Unformatted: