Re: pfind() in ithread handler
- From: pluknet <pluknet@xxxxxxxxx>
- Date: Thu, 28 Feb 2008 16:17:45 +0300
On 28/02/2008, Yuri Pankov <yuri.pankov@xxxxxxxxx> wrote:
Hi,
I'm trying to understand the cause of following panic.
panic: Trying sleep, but thread marked as sleeping prohibited
cpuid = 0
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
panic() at panic+0x17d
sleepq_add() at sleepq_add+0x2e1
_sx_slock_hard() at _sx_slock_hard+0x15d
_sx_slock() at _sx_slock+0xc1
pfind() at pfind+0x24
saa_intr() at saa_intr+0x313
ithread_loop() at ithread_loop+0xda
fork_exit() at fork_exit+0x12a
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip = 0, rsp = 0xffffffffac3c0d30, rbp = 0 ---
Can someone enlighten me on what is causing the panic and is it ok to
use pfind() in interrupt handler (I have very limited understanding of
kernel internals)?
Code in question (taken from saa driver
http://freebsd.ricin.com/ports/distfiles/kbtv-1.92.tbz) can be found at
http://www.pastebin.ca/921830
TIA,
Yuri
You cannot sleep in high priority ithread handler, pfind() uses
sleepable sx(9) lock.
In your case it fail to acquire a shared lock and trying to sleep.
Probably you should call pfind() elsewhere.
wbr,
pluknet
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- References:
- pfind() in ithread handler
- From: Yuri Pankov
- pfind() in ithread handler
- Prev by Date: Re: fs/udf: vm pages "overlap" while reading large dir [patch]
- Next by Date: Re: cvs tag renaming after repo copy
- Previous by thread: pfind() in ithread handler
- Next by thread: Re: pfind() in ithread handler
- Index(es):