From owner-freebsd-scsi@freebsd.org Mon Nov 7 08:21:57 2016 Return-Path: Delivered-To: freebsd-scsi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEB6EC33FDE for ; Mon, 7 Nov 2016 08:21:57 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73DB81871; Mon, 7 Nov 2016 08:21:57 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [192.168.1.101] (p508F13AC.dip0.t-ipconnect.de [80.143.19.172]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 293A1721E281A; Mon, 7 Nov 2016 09:21:52 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: mpt driver issue? From: Michael Tuexen In-Reply-To: Date: Mon, 7 Nov 2016 09:21:50 +0100 Cc: Sean Bruno , freebsd-scsi Content-Transfer-Encoding: quoted-printable Message-Id: <1909C322-A218-4463-9A86-8E859B4715E6@freebsd.org> References: <4398FA07-AABF-441E-A412-42BABCD59444@freebsd.org> To: Scott Long X-Mailer: Apple Mail (2.3251) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2016 08:21:57 -0000 > On 6 Nov 2016, at 23:46, Scott Long wrote: >=20 >=20 >> On Nov 6, 2016, at 1:57 PM, Michael Tuexen = wrote: >>=20 >>> On 6 Nov 2016, at 20:41, Sean Bruno wrote: >>>=20 >>>=20 >>>=20 >>> On 11/06/16 10:54, Michael Tuexen wrote: >>>> Dear all, >>>>=20 >>>> it was suggested on current@ to forward this to freebsd-scsi@ >>>>=20 >>>> The problem shows up since r308268 and it looks like an issue >>>> in the mpt driver... >>>>=20 >>>> Best regards >>>> Michael >>>=20 >>> I don't see any *obvious* reason that we should hold the mpt lock = here. >>> It looks ok to just drop it. >> I tried that and the system (with WITNESS) panic'ed... >> Can't write a core (not a surprise). >=20 > Any info on where the panic was? After learning how to add a serial console to a VM und Fusion: Booting... GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2016 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights = reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-CURRENT #705 r308359M: Sun Nov 6 21:54:54 CET 2016 = tuexen@freebsd12.testbed:/usr/home/tuexen/head/sys/amd64/compile/SCTP = amd64 FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on = LLVM 3.8.0) WARNING: WITNESS option enabled, expect reduced performance. VT(vga): text 80x25 CPU: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz (1799.38-MHz K8-class CPU) Origin=3D"GenuineIntel" Id=3D0x206a7 Family=3D0x6 Model=3D0x2a = Stepping=3D7 = Features=3D0xfa3fbff = Features2=3D0x9fba2203 AMD Features=3D0x28100800 AMD Features2=3D0x1 Structured Extended Features=3D0x2 TSC: P-state invariant Hypervisor: Origin =3D "VMwareVMware" real memory =3D 536870912 (512 MB) avail memory =3D 472502272 (450 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 2 package(s) random: unblocking device. MADT: Forcing active-low polarity and level trigger for SCI ioapic0 irqs 0-23 on motherboard random: entropy device external interface kbd1 at kbdmux0 netmap: loaded module module_register_init: MOD_LOAD (vesa, 0xffffffff80f7f3c0, 0) error 19 nexus0 vtvga0: on motherboard cryptosoft0: on motherboard acpi0: on motherboard acpi0: Power Button (fixed) hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 950 cpu0: numa-domain 0 on acpi0 cpu1: numa-domain 0 on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 atrtc0: port 0x70-0x71 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port = 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1060-0x106f at device 7.1 on pci0 ata0: at channel 0 on atapci0 ata1: at channel 1 on atapci0 pci0: at device 7.3 (no driver attached) vgapci0: port 0x1070-0x107f mem = 0xe8000000-0xefffffff,0xfe000000-0xfe7fffff irq 16 at device 15.0 on = pci0 vgapci0: Boot video device mpt0: port 0x1400-0x14ff mem = 0xfeba0000-0xfebbffff,0xfebc0000-0xfebdffff irq 17 at device 16.0 on = pci0 mpt0: MPI Version=3D1.2.0.0 panic: mutex mpt not owned at ../../../dev/mpt/mpt.c:1212 cpuid =3D 0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xffffffff8222b3d0 vpanic() at vpanic+0x182/frame 0xffffffff8222b450 panic() at panic+0x43/frame 0xffffffff8222b4b0 __mtx_assert() at __mtx_assert+0xc1/frame 0xffffffff8222b4c0 mpt_free_request() at mpt_free_request+0x81/frame 0xffffffff8222b500 mpt_configure_ioc() at mpt_configure_ioc+0x3fa/frame 0xffffffff8222b5e0 mpt_attach() at mpt_attach+0x20c/frame 0xffffffff8222b640 mpt_pci_attach() at mpt_pci_attach+0x9c9/frame 0xffffffff8222b6e0 device_attach() at device_attach+0x41d/frame 0xffffffff8222b740 bus_generic_attach() at bus_generic_attach+0x4a/frame 0xffffffff8222b760 pci_attach() at pci_attach+0xd5/frame 0xffffffff8222b7a0 device_attach() at device_attach+0x41d/frame 0xffffffff8222b800 bus_generic_attach() at bus_generic_attach+0x4a/frame 0xffffffff8222b820 acpi_pcib_acpi_attach() at acpi_pcib_acpi_attach+0x402/frame = 0xffffffff8222b890 device_attach() at device_attach+0x41d/frame 0xffffffff8222b8f0 bus_generic_attach() at bus_generic_attach+0x4a/frame 0xffffffff8222b910 acpi_attach() at acpi_attach+0xdbf/frame 0xffffffff8222b9d0 device_attach() at device_attach+0x41d/frame 0xffffffff8222ba30 bus_generic_attach() at bus_generic_attach+0x4a/frame 0xffffffff8222ba50 nexus_acpi_attach() at nexus_acpi_attach+0x73/frame 0xffffffff8222ba80 device_attach() at device_attach+0x41d/frame 0xffffffff8222bae0 bus_generic_new_pass() at bus_generic_new_pass+0x116/frame = 0xffffffff8222bb10 bus_set_pass() at bus_set_pass+0x8c/frame 0xffffffff8222bb40 configure() at configure+0x9/frame 0xffffffff8222bb50 mi_startup() at mi_startup+0x118/frame 0xffffffff8222bb70 btext() at btext+0x2c KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at kdb_enter+0x3b: movq $0,kdb_why db> Best regards Michael PS: I haven't seen your initial response on = https://lists.freebsd.org/pipermail/freebsd-scsi/2016-November/date.html Just tested Sean's proposed patch. >=20 > Scott >=20