Date: Thu, 13 Feb 2003 07:04:49 -0800 From: Milo Hyson <milo@cyberlifelabs.com> To: Bruce Evans <bde@zeta.org.au> Cc: FreeBSD Emulation List <freebsd-emulation@FreeBSD.ORG> Subject: Re: Working on IBM JDK fix Message-ID: <3E4BB411.1040302@cyberlifelabs.com> References: <20030213235848.P3145-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E4BB411.1040302>