Subject: Re: Instability in -current
To: Christos Zoulas <christos@astron.com>
From: Gary Duzan <gary@duzan.org>
List: current-users
Date: 05/20/2007 22:18:09
In Message <f2q0h6$2m6$1@sea.gmane.org> ,
christos@astron.com (Christos Zoulas) wrote:
=>In article <200705201059.l4KAxsPs009546@wheel.duzan.org>,
=>Gary Duzan <gary@duzan.org> wrote:
=>> I have noticed that my X session is prone to crashing with a
=>>current kernel on my amd64 multiprocessor box. Running "x11perf
=>>-all" and waiting a few minutes seems to be sufficient to cause
=>>the problem. I noticed it both before and after upgrading userland,
=>>so it seems likely to be a kernel problem.
=>
=>It is from the fs/gs changes. Revert those...
I tried the following, but it didn't seem to help. The easiest
way I've found to crash X is to bring up a bunch of tabs in firefox,
but parallel kernel builds are dying, too.
Gary Duzan
Index: amd64/machdep.c
===================================================================
RCS file: /usr2/netbsd-cvs/src/sys/arch/amd64/amd64/machdep.c,v
retrieving revision 1.57
diff -b -u -p -r1.57 machdep.c
--- amd64/machdep.c 17 May 2007 14:51:14 -0000 1.57
+++ amd64/machdep.c 21 May 2007 02:10:04 -0000
@@ -412,6 +412,8 @@ buildcontext(struct lwp *l, void *catche
tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
tf->tf_es = GSEL(GUDATA_SEL, SEL_UPL);
+ tf->tf_fs = GSEL(GUDATA_SEL, SEL_UPL);
+ tf->tf_gs = GSEL(GUDATA_SEL, SEL_UPL);
tf->tf_rip = (u_int64_t)catcher;
tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
@@ -868,6 +870,8 @@ setregs(struct lwp *l, struct exec_packa
tf = l->l_md.md_regs;
tf->tf_ds = LSEL(LUDATA_SEL, SEL_UPL);
tf->tf_es = LSEL(LUDATA_SEL, SEL_UPL);
+ tf->tf_fs = LSEL(LUDATA_SEL, SEL_UPL);
+ tf->tf_gs = LSEL(LUDATA_SEL, SEL_UPL);
tf->tf_rdi = 0;
tf->tf_rsi = 0;
tf->tf_rbp = 0;