On Thu, 24 Oct 2002, Peter Edwards wrote:

> There was some discussion about issues with interactions between the floating
> point context and signal handling in a thread a week or so ago, and a suggestion
> that someone try and get a simple test that would fail. I was surprised how
> easy it was: The following program just spins calculating the value of 6.0 /
> 3.0, and traps SIGINT.
>
> If you run it on -current (as of a few hours ago), 99% of the time, hitting
> ctl-C will cause the program to exit with an error. A 4.5 kernel never causes
> any problems.
>
> I'm pretty sure this is what's causing the stalls and crashes in X. I've taken
> stack traces of crashes, and from "spinning" processes, and I can spot NaNs on
> the stack that shouldn't be there, etc.

Thanks.  This makes the main bug clear.  The PCB_NPXINITDONE bit in the
state was not being restored.  This was confusing to debug because gdb
doesn't understand this bug so it shows the state that should have been
restored until npxdna() unrestores it consistently.  Try this fix.

%%%
Index: npx.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/isa/npx.c,v
retrieving revision 1.133
diff -u -2 -r1.133 npx.c
--- npx.c       20 Oct 2002 17:30:30 -0000      1.133
+++ npx.c       24 Oct 2002 14:20:33 -0000
@@ -1004,4 +1007,5 @@
                bcopy(addr, &td->td_pcb->pcb_save, sizeof(*addr));
        }
+       curthread->td_pcb->pcb_flags |= PCB_NPXINITDONE;
 }

%%%

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to