From owner-freebsd-current@FreeBSD.ORG Sun Oct 21 07:45:44 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 8410B16A417 for ; Sun, 21 Oct 2007 07:45:44 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (unknown [IPv6:2001:2f0:104:e002::32]) by mx1.freebsd.org (Postfix) with ESMTP id 9F44013C442 for ; Sun, 21 Oct 2007 07:45:43 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from delta.allbsd.org (p4054-ipbf904funabasi.chiba.ocn.ne.jp [122.26.39.54]) (authenticated bits=128) by mail.allbsd.org (8.13.8/8.13.8) with ESMTP id l9L7jVUw081012 for ; Sun, 21 Oct 2007 16:45:42 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (alph.allbsd.org [192.168.0.10]) (authenticated bits=0) by delta.allbsd.org (8.13.4/8.13.4) with ESMTP id l9L7jGSg084747 for ; Sun, 21 Oct 2007 16:45:18 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sun, 21 Oct 2007 16:40:08 +0900 (JST) Message-Id: <20071021.164008.241988280.hrs@allbsd.org> To: current@FreeBSD.org From: Hiroki Sato In-Reply-To: <20071019.021408.138664034.hrs@allbsd.org> References: <20071015.034121.120532311.hrs@allbsd.org> <20071019.021408.138664034.hrs@allbsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 5.2 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sun_Oct_21_16_40_08_2007_855)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (mail.allbsd.org [133.31.130.32]); Sun, 21 Oct 2007 16:45:42 +0900 (JST) Cc: 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 07:45:44 -0000 ----Security_Multipart(Sun_Oct_21_16_40_08_2007_855)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 at 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 ----Security_Multipart(Sun_Oct_21_16_40_08_2007_855)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBHGwJYTyzT2CeTzy0RApVDAKCSjWUvnQg6H5Mnlc1Dfi3vfwyDiQCgj5Ou JtcH6eRVdN6IQ3d6H1Iuzyw= =Zxrk -----END PGP SIGNATURE----- ----Security_Multipart(Sun_Oct_21_16_40_08_2007_855)----