From owner-freebsd-current@FreeBSD.ORG Sun Oct 21 14:28:03 2007 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE64716A46C for ; Sun, 21 Oct 2007 14:28:03 +0000 (UTC) (envelope-from john_m_cooper@yahoo.com) Received: from smtp118.plus.mail.sp1.yahoo.com (smtp118.plus.mail.sp1.yahoo.com [69.147.95.81]) by mx1.freebsd.org (Postfix) with SMTP id AD86213C4C5 for ; Sun, 21 Oct 2007 14:27:43 +0000 (UTC) (envelope-from john_m_cooper@yahoo.com) Received: (qmail 68513 invoked from network); 21 Oct 2007 07:56:25 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=xG2PAmh5/gvvkmQHxURq4AboIktRQAvAizcXe0k3sqgcoP+g+yQKeOigY9j1dmcT5ZqkAXLHujc8FpBacfM7GcqcpeUIODIf9fsTwokQi8oOqQLmgG11rBO/K2lq8U/hs2xyenKYTU4CdMJCphUFRkb92wPwjDZS5rRTjtRaDgE= ; Received: from unknown (HELO borgdemon3.temp.wsu.edu) (john_m_cooper@134.121.244.74 with plain) by smtp118.plus.mail.sp1.yahoo.com with SMTP; 21 Oct 2007 07:56:25 -0000 X-YMail-OSG: 1rAkHJsVM1mqv_fTs05WVb7zNhB2xM.eNZnGwuspG25UJdQfB_9M8Na41Begp.uDFg2jcGzm3g-- Message-ID: <471B0625.50202@yahoo.com> Date: Sun, 21 Oct 2007 00:56:21 -0700 From: John Merryweather Cooper User-Agent: Thunderbird 2.0.0.4pre (X11/20071013) MIME-Version: 1.0 To: Hiroki Sato References: <20071015.034121.120532311.hrs@allbsd.org> <20071019.021408.138664034.hrs@allbsd.org> <20071021.164008.241988280.hrs@allbsd.org> In-Reply-To: <20071021.164008.241988280.hrs@allbsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current@FreeBSD.org Subject: Re: panic in 8-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2007 14:28:03 -0000 Hiroki Sato wrote: > Hiroki Sato wrote > in <20071019.021408.138664034.hrs@allbsd.org>: > > hr> Hiroki Sato wrote > hr> in <20071015.034121.120532311.hrs@allbsd.org>: > hr> > hr> hr> I got the following panic with the Oct 14 8-CURRENT kernel. A 2-way > hr> hr> (Opteron) box running GENERIC FreeBSD/i386 kernel with serial console > hr> hr> access, and typing some keys just after "Trying to mount..." line > hr> hr> appears seems to prevent this panic. Without typing any keys the box > hr> hr> remain stopped after displaying the line, and then typing a key will > hr> hr> cause this panic. Whether the panic occurs depends on the time > hr> hr> between displaying the line and typing a key. > hr> hr> > hr> hr> ----(from here) > hr> hr> WARNING: WITNESS option enabled, expect reduced performance. > hr> hr> Trying to mount root from ufs:/dev/ad4s1a > hr> hr> spin lock 0xc0c17a6c (sio) held by 0xc3f0d630 (tid 100004) too long > hr> hr> panic: spin lock held too long > hr> hr> cpuid = 0 > hr> hr> KDB: enter: panic > hr> hr> [thread pid 46 tid 100056 ] > hr> hr> Stopped at kdb_enter+0x32: leave > (snip) > > hr> I found that this panic occurred only when "options [KDG]DB" were > hr> defined and reproducible on serial-console-enabled HP boxes such as > hr> DL140G3 and ML115. With the options, the same panic occurs even on > hr> 6.2R. > > After some investigation, I found it occurs only when options > BREAK_TO_DEBUGGER (or ALT_BREAK_TO_DEBUGGER) is defined. More > specifically, the box stops if the following line exists in sio.c: > > |#if defined(KDB) && (defined(BREAK_TO_DEBUGGER) || \ > | defined(ALT_BREAK_TO_DEBUGGER)) > | /* > | * Enable interrupts for early break-to-debugger support > | * on the console. > | */ > | if (ret == 0 && unit == comconsole) > | outb(siocniobase + com_ier, IER_ERXRDY | IER_ERLS | > | IER_EMSC); > |#endif > > If this line is removed, no hiccup just after "Trying to mount > root..." and no panic occur. I guess enabling sio's interrupt > this early stage causes a deadlock, but I am not sure the details of > what happends there. > > Anyone who can reproduce this problem? > > -- > | Hiroki SATO > I can reproduce it at will on 7.0-BETA1 on my HP Pavillion dv9420us. I have to do the shuffle every time in order to boot. I'm going to try your patch and see if it helps. I note that I don't have sio installed as this laptop has no serial ports (just lots of usb ports). jmc