Bug 189745 - [uart] ns8250 uart spin lock held too long
Summary: [uart] ns8250 uart spin lock held too long
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-13 03:20 UTC by Colin Percival
Modified: 2018-08-02 03:39 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Percival freebsd_committer freebsd_triage 2014-05-13 03:20:00 UTC
panic: spin lock held too long

#2  0xffffffff808af8f4 in panic (fmt=<value optimized out>)
    at /usr/src/sys/kern/kern_shutdown.c:754
#3  0xffffffff8089cb71 in _mtx_lock_spin_cookie (c=<value optimized out>, 
    tid=<value optimized out>, opts=<value optimized out>, 
    file=<value optimized out>, line=<value optimized out>)
    at /usr/src/sys/kern/kern_mutex.c:554
#4  0xffffffff80725223 in ns8250_bus_ipend (sc=0xfffff800083fc400)
    at uart_cpu.h:92
#5  0xffffffff80723fe7 in uart_intr (arg=0xfffff800083fc400) at uart_if.h:87
#6  0xffffffff80883e5b in intr_event_handle (ie=0xfffff8000819c200, 
    frame=0xfffffe03a5ff8870) at /usr/src/sys/kern/kern_intr.c:1437
#7  0xffffffff80d8d1c8 in intr_execute_handlers (isrc=0xfffff800081bf168, 
    frame=0xfffffe03a5ff8870) at /usr/src/sys/x86/x86/intr_machdep.c:269

In some panic reports there were _mtx_lock_spin_cookie -> printf -> vprintf
-> kvprintf -> putchar -> cnputs -> cnputc -> uart_cnputc cycles as a result
of the bug being re-trigerred by attempting to print the "spin lock ... held
... too long" warning.  (Which may be something worth fixing separately, by
detecting the loop and skipping straight to the panic call.)

No console output is available (panicmail does not submit it) so I don't know
which thread was holding the spin lock for so long; but it clearly unlocked
eventually since the "spinning too long -> printf -> spinning too long" cycles
were not infinite.

How-To-Repeat: 
No idea.  This panic is strongly correlated with residing in EC2, but it may
merely be caused by the broken_txfifo option since EC2 is where that option
is most often used.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:46 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped