From owner-freebsd-emulation Thu Feb 13 7: 4:52 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 681D337B401 for ; Thu, 13 Feb 2003 07:04:51 -0800 (PST) Received: from b.smtp-out.sonic.net (b.smtp-out.sonic.net [208.201.224.39]) by mx1.FreeBSD.org (Postfix) with SMTP id C56DC43F93 for ; Thu, 13 Feb 2003 07:04:50 -0800 (PST) (envelope-from milo@cyberlifelabs.com) Received: (qmail 24791 invoked from network); 13 Feb 2003 15:04:50 -0000 Received: from sub.sonic.net (208.201.224.8) by b.smtp-out.sonic.net with SMTP; 13 Feb 2003 15:04:50 -0000 Received: from cyberlifelabs.com (adsl-64-142-14-252.sonic.net [64.142.14.252]) by sub.sonic.net (8.11.6/8.8.5) with ESMTP id h1DF4nk00480; Thu, 13 Feb 2003 07:04:50 -0800 X-envelope-info: Message-ID: <3E4BB411.1040302@cyberlifelabs.com> Date: Thu, 13 Feb 2003 07:04:49 -0800 From: Milo Hyson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20030120 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce Evans Cc: FreeBSD Emulation List Subject: Re: Working on IBM JDK fix References: <20030213235848.P3145-100000@gamplex.bde.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 Bruce Evans wrote: > 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. Might this also explain why 8190 is being returned from modify_ldt()? Perhaps other registers are being improperly loaded and eax winds up with this value instead of the intended result code. I did a little more testing and found that the number of times the trap-26/trap-12 pair shows up in the logs exactly equals the number of calls made to modify_ldt() where the return value is 8190. Immediately following the last pair, there's the SIGSEGV in the ktrace and the looping trap-26's in the logs. I also noticed that the trap-26/trap-12 pair always appears in the logs even if I just run 'java -version' without any program. Running ktrace on that reveals one of the funky calls to modify_ldt(). This one exits normally without causing any loops. -- Milo Hyson CyberLife Labs To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message