panic: "__mp_lock_held(&sched_lock) == 0" failed

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

panic: "__mp_lock_held(&sched_lock) == 0" failed

Bryan Linton
>Synopsis: Kernel panics with '"__mp_lock_held(&sched_lock) == 0" failed' message
>Category: system
>Environment:
        System      : OpenBSD 5.9
        Details     : OpenBSD 5.9-beta (GENERIC.MP-PPPOE_TERM_UNKNOWN_SESSIONS) #1: Sat Jan  9 15:34:21 JST 2016
                         [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC.MP-PPPOE_TERM_UNKNOWN_SESSIONS

        Architecture: OpenBSD.i386
        Machine     : i386
>Description:
        I've been experiencing hard-locks or random reboots related to
        using firefox (both regular and -esr versions) but also
        connected to heavy disk usage (such as from using net/rsnapshot
        to backup a large directory) for several months now, but
        did not report it because I could not get the system to
        drop to ddb.

        Since updating to a recent snapshot, I have finally been
        able to get a backtrace, which I have included below.

        While it seems like firefox is a fairly reliable way of
        triggering the panic, the system will on very rare
        occasions panic without having used firefox or heavy
        disk access, so I can only assume that they exacerbate
        the condition that causes it.

        This bug has occurred on stock GENERIC.MP kernels for
        several months now, so even though the kernel I'm
        reporting this on has an additional kernel option
        enabled (namely, PPPOE_TERM_UNKNOWN_SESSIONS) I do not
        think that this is related to the bug.  If necessary, I
        can reproduce it on a GENERIC.MP kernel and resubmit
        another trace.


        Transcribed by hand from photos, please excuse any errors.

        panic: kernel diagnostic assertion "___mp_lock_held(&sched_lock) == 0" failed file
        Stopped at Debugger+0x7: leave
        TID PID UID PRFLAGS PFLAGS CPU COMMAND
        27829 27829 1400 0x2 0 0 firefox-esr
        *19043 27829 1400 0x2 0x4000080 1 firefox-esr
        Debugger(d0a05dec,f5322de4,d09e0d44,f5322de4,0) at Debugger+0x7
        panic(d09e0d44,d095e7e6,d09dbe04,d09dc144,7f) at panic+0x71
        __assert(d095e7e6,d09dc144,7f,d09dbe04,8919b85e) at __assert+0x2e
        _kernel_lock(f5322e8c,f5322e74,f5322e68,f5322e6c,d09518f0) at _kernel_lock+0x48

        trap() at trap+0x3ef
        --- trap (number -142920240 ---
        Bad frame pointer: 0xdab5b9f4
        0:
        http://www.openbsd.org/ddb.html describes th eminimum infor required in bug
        reports.  Insufficient info makes it difficult to find and fix bugs.
        ddb{1}> trace
        Debugger(d0a05dec,f5322de4,d09e0d44,f5322de4,0) at Debugger+0x7
        panic(d09e0d44,d095e7e6,d09dbe04,d09dc144,7f) at panic+0x71
        __assert(d095e7e6,d09dc144,7f,d09dbe04,8919b85e) at __assert+0x2e
        _kernel_lock(f5322e8c,f5322e74,f5322e68,f5322e6c,d09518f0) at _kernel_lock+0x48

        trap() at trap+0x3ef
        --- trap (number -142920240 ---
        Bad frame pointer: 0xdab5b9f4
        0:
        ddb{1}> show panic
        kernel diagnostic assertion "__mp_lock_held(&sched_lock) == 0" failed: file "..
        /../../../kern/kern_lock.c", line 127
        ddb{1}> ps
                [many, many lines showing firefox-esr among others]
        ddb{1}> machine ddbcpu 0
        Stopped at Debugger+0x7: leave
        Debugger(d0c835a0,418aa000,f6070000,d0500010,77c50010) at Debugger+0x7
        i386_ipi_handler(b0,f7290020,f607000,d0500010,77c50010) at i386_ipi_handl+0x5f
        Xintripi() at Xinttripi+0x49
        --- interrupt ---
        __mp_lock(d0bcb3a0,1,f607bcdc,d051bbdb,d0be5084) at __mp_lock+0x3a
        wakeup_n(d0be5084,ffffffff,77c5b000,f607bcdc,d0203229) at wakeup_n+0x2d
        uvm_pmr_getpages(1,0,0,1,0) at uvm_pmr_getpages+0x5fc
        uvm_pagealloc(0,0,0,f77aee2c,2) at uvm_pagealloc+0x17d
        uvm_fault(da734be8,77c53000,0,3,d0b5b2fc) at uvm_fault+0xb92
        trap() at trap+0x729
        --- trap (number 32752) ---
        0x6:
        ddb{0}>

>How-To-Repeat:
        Running www/firefox-esr or www/mozilla-firefox and engaging in normal
        web browsing seems to trigger the panic after anywhere from
        5-60 minutes.

        Occasionally, heavy disk access such as running net/rsnapshot
        will also cause a similar crash.
>Fix:
        Unknown.


dmesg:
OpenBSD 5.9-beta (GENERIC.MP-PPPOE_TERM_UNKNOWN_SESSIONS) #1: Sat Jan  9 15:34:21 JST 2016
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC.MP-PPPOE_TERM_UNKNOWN_SESSIONS
cpu0: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,LAHF,PERF,SENSOR
real mem  = 3219472384 (3070MB)
avail mem = 3145240576 (2999MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 04/01/10, BIOS32 rev. 0 @ 0xfd6b0, SMBIOS rev. 2.4 @ 0xe0010 (68 entries)
bios0: vendor LENOVO version "79ETE6WW (2.26 )" date 04/01/2010
bios0: LENOVO 2623D9U
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET BOOT SSDT SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) LURT(S3) DURT(S3) EXP0(S4) EXP1(S4) EXP2(S4) EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB7(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz
cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,LAHF,PERF,SENSOR
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 12 (EXP3)
acpiprt6 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for USB0, USB2, USB7
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "92P1139" serial   659 type LION oem "Panasonic"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
bios0: ROM list: 0xc0000/0xfe00 0xd0000/0x1000 0xd1000/0x1000 0xdc000/0x4000! 0xe0000/0x10000!
cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2000, 1667, 1333, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
ppb0 at pci0 dev 1 function 0 "Intel 82945GM PCIE" rev 0x03: apic 1 int 16
pci1 at ppb0 bus 1
radeondrm0 at pci1 dev 0 function 0 "ATI Radeon Mobility X1300 M52-64" rev 0x00
drm0 at radeondrm0
radeondrm0: apic 1 int 16
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Analog Devices AD1981HD, Conexant/0x2bfa, using Analog Devices AD1981HD
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 1 int 20
pci2 at ppb1 bus 2
em0 at pci2 dev 0 function 0 "Intel 82573L" rev 0x00: msi, address 00:16:41:52:7e:81
ppb2 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 1 int 21
pci3 at ppb2 bus 3
wpi0 at pci3 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: msi, MoW1, address 00:13:02:20:41:18
ppb3 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 1 int 22
pci4 at ppb3 bus 4
xhci0 at pci4 dev 0 function 0 "Renesas uPD720202 xHCI" rev 0x02: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Renesas xHCI root hub" rev 3.00/1.00 addr 1
ppb4 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: apic 1 int 23
pci5 at ppb4 bus 12
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 16
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1 int 17
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 1 int 19
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1 int 19
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb5 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci6 at ppb5 bus 21
cbb0 at pci6 dev 0 function 0 "TI PCI1510 CardBus" rev 0x00: apic 1 int 16
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 22 device 0 cacheline 0x8, lattimer 0xb0
pcmcia0 at cardslot0
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <HL-DT-ST, DVDRAM GSA-U10N, 1.05> ATAPI 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ahci0 at pci0 dev 31 function 2 "Intel 82801GBM AHCI" rev 0x02: msi, AHCI 1.1
ahci0: port 0: 1.5Gb/s
scsibus2 at ahci0: 32 targets
sd0 at scsibus2 targ 0 lun 0: <ATA, INTEL SSDSC2CW24, 400i> SCSI3 0/direct fixed naa.5001517bb2a98d08
sd0: 228936MB, 512 bytes/sector, 468862128 sectors, thin
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 1 int 23
iic0 at ichiic0
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
uhidev0 at uhub2 port 1 configuration 1 interface 0 "Logitech USB-PS/2 Optical Mouse" rev 2.00/20.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
uhidev1 at uhub2 port 2 configuration 1 interface 0 "Gravis GamePad Pro USB" rev 1.00/2.00 addr 3
uhidev1: iclass 3/0
uhid0 at uhidev1: input=4, output=0, feature=0
ugen0 at uhub5 port 2 "STMicroelectronics Biometric Coprocessor" rev 1.00/0.01 addr 2
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
softraid0: sd1 was not shutdown properly
sd1 at scsibus4 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd1: 200595MB, 512 bytes/sector, 410819160 sectors
root on sd1a (bfe3b486511fab55.a) swap on sd1b dump on sd1b
WARNING: / was not properly unmounted
radeondrm0: 1600x1200
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
wpi0: radio is disabled by hardware switch
wpi0: could not initialize hardware

usbdevs:
Controller /dev/usb0:
addr 1: super speed, self powered, config 1, xHCI root hub(0x0000), Renesas(0x1912), rev 1.00
 port 1 addr 2: super speed, self powered, config 1, Backup+  Desk(0xab31), Seagate(0x0bc2), rev 3.42, iSerialNumber NA7EA2SZ
 port 2 disabled
 port 3 disabled
 port 4 disabled
Controller /dev/usb1:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel(0x8086), rev 1.00
 port 1 powered
 port 2 powered
 port 3 powered
 port 4 powered
 port 5 powered
 port 6 powered
 port 7 powered
 port 8 powered
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x8086), rev 1.00
 port 1 addr 2: low speed, power 98 mA, config 1, USB-PS/2 Optical Mouse(0xc03d), Logitech(0x046d), rev 20.00
 port 2 addr 3: low speed, power 100 mA, config 1, GamePad Pro USB(0x4001), Gravis(0x0428), rev 2.00
Controller /dev/usb3:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x8086), rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb4:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x8086), rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb5:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x8086), rev 1.00
 port 1 powered
 port 2 addr 2: full speed, power 100 mA, config 1, Biometric Coprocessor(0x2016), STMicroelectronics(0x0483), rev 0.01