From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 28 11:12:24 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 878DC1065671 for ; Thu, 28 Feb 2008 11:12:24 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from mail.irbisnet.ru (mail.irbisnet.ru [IPv6:2001:470:1f09:aa:203:baff:fe18:f4c1]) by mx1.freebsd.org (Postfix) with ESMTP id 00DDC8FC13 for ; Thu, 28 Feb 2008 11:12:23 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from mail.irbisnet.ru (yuri@mail.irbisnet.ru [IPv6:::1]) by mail.irbisnet.ru (8.14.2/8.14.2) with ESMTP id m1SBCMex099973; Thu, 28 Feb 2008 14:12:22 +0300 (MSK) (envelope-from yuri.pankov@gmail.com) Received: (from yuri@localhost) by mail.irbisnet.ru (8.14.2/8.14.2/Submit) id m1SBCMnO099972; Thu, 28 Feb 2008 14:12:22 +0300 (MSK) (envelope-from yuri.pankov@gmail.com) X-Authentication-Warning: mail.irbisnet.ru: yuri set sender to yuri.pankov@gmail.com using -f Date: Thu, 28 Feb 2008 14:12:22 +0300 From: Yuri Pankov To: freebsd-hackers@freebsd.org Message-ID: <20080228111222.GE92245@mail.irbisnet.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Subject: pfind() in ithread handler X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2008 11:12:24 -0000 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