From owner-freebsd-emulation Thu Feb 13 5:56:38 2003 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 678B237B401 for ; Thu, 13 Feb 2003 05:56:37 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5A5643FB1 for ; Thu, 13 Feb 2003 05:56:35 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id AAA09311; Fri, 14 Feb 2003 00:56:30 +1100 Date: Fri, 14 Feb 2003 00:56:56 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Milo Hyson Cc: FreeBSD Emulation List Subject: Re: Working on IBM JDK fix In-Reply-To: <3E4B29FB.6030801@cyberlifelabs.com> Message-ID: <20030213235848.P3145-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 12 Feb 2003, Milo Hyson wrote: > I've found a little more info on this issue. Here's a dump from > /var/log/messages. These lines start pouring in as soon as the JVM tries > to exit. > > Feb 12 21:07:27 beastie /kernel: kernel trap 26 with interrupts disabled > ... I think you are right that this has something to do with the LDT. The "kernel trap 26 with interrupts disabled" message is caused by the kernel slightly mishandling loading of invalid segment registers (%de/%es/%fs only) in doreti. It is supposed to silently convert the trap for this to a SIGBUS, but it actually does this unsilently. Anyway, applications can easily cause endless errors from this by shooting away LDT entries while still using them, and catching SIGBUS without fixing up the problem. The SIGBUS handler returns via sigreturn() which triggers another SIGBUS at the same %eip if it attempts to reload an invalid segment descriptor. > Feb 12 21:07:27 beastie /kernel: kernel trap 12 with interrupts disabled I can't explain this. The kernel has some more bugs in this area. It does too much of the trap handling with interrupts disabled (or locks held in -current). -current with WITNESS detects some of the bugs and may panic for invalid %gs's at context switch time. It used to panic for an invalid %gs due to not clearing it in execve() together with freeing the user LDT. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message