mpt driver issue?

Michael Tuexen tuexen at freebsd.org
Mon Nov 7 08:21:57 UTC 2016


> On 6 Nov 2016, at 23:46, Scott Long <scottl at samsco.org> wrote:
> 
> 
>> On Nov 6, 2016, at 1:57 PM, Michael Tuexen <tuexen at FreeBSD.org> wrote:
>> 
>>> On 6 Nov 2016, at 20:41, Sean Bruno <sbruno at freebsd.org> wrote:
>>> 
>>> 
>>> 
>>> On 11/06/16 10:54, Michael Tuexen wrote:
>>>> Dear all,
>>>> 
>>>> it was suggested on current@ to forward this to freebsd-scsi@
>>>> 
>>>> The problem shows up since r308268 and it looks like an issue
>>>> in the mpt driver...
>>>> 
>>>> Best regards
>>>> Michael
>>> 
>>> 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).
> 
> 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 at 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="GenuineIntel"  Id=0x206a7  Family=0x6  Model=0x2a  Stepping=7
  Features=0xfa3fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,DTS,MMX,FXSR,SSE,SSE2,SS>
  Features2=0x9fba2203<SSE3,PCLMULQDQ,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,HV>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  Structured Extended Features=0x2<TSCADJ>
  TSC: P-state invariant
Hypervisor: Origin = "VMwareVMware"
real memory  = 536870912 (512 MB)
avail memory = 472502272 (450 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <PTLTD  	 APIC  >
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 <Version 1.1> 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: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <INTEL 440BX> on motherboard
acpi0: Power Button (fixed)
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
cpu0: <ACPI CPU> numa-domain 0 on acpi0
cpu1: <ACPI CPU> numa-domain 0 on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0: <AT realtime clock> 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: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX4 UDMA33 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1060-0x106f at device 7.1 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
pci0: <bridge> at device 7.3 (no driver attached)
vgapci0: <VGA-compatible display> port 0x1070-0x107f mem 0xe8000000-0xefffffff,0xfe000000-0xfe7fffff irq 16 at device 15.0 on pci0
vgapci0: Boot video device
mpt0: <LSILogic 1030 Ultra4 Adapter> port 0x1400-0x14ff mem 0xfeba0000-0xfebbffff,0xfebc0000-0xfebdffff irq 17 at device 16.0 on pci0
mpt0: MPI Version=1.2.0.0
panic: mutex mpt not owned at ../../../dev/mpt/mpt.c:1212
cpuid = 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.
> 
> Scott
> 



More information about the freebsd-scsi mailing list