Re: two x86_64 fixes for 2.4.21-pre3

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Tue Jan 28 2003 - 15:51:43 EST


Andi Kleen writes:
> On Fri, Jan 24, 2003 at 08:16:59PM +0100, Mikael Pettersson wrote:
...
> > sleep[196] general protection rip:4003ebe5 rsp:ffffed20 error:0
> >
> > (The system is vanilla RH8.0 with Athlon binaries, running under
...
> Works for me on Simics with a SuSE 32bit userland.
>
> You have to figure out what breaks on RedHat yourself.
>
> We had some problems with the TLS register used on very new glibcs
> (%gs), but they should be fixed now in the codedrop in 2.4.21pre3.

It looks as if %gs handling isn't quite right.

pthread_setcanceltype() SIGSEGVs in THREAD_SETMEM(self, p_canceltype, type).
The instruction that fails is "mov %dl,%gs:0x81", and %gs is zero.

RedHat linked /bin/sleep against libpthread.so, which (at least in the
glibc-2.2.93 used in RedHat 8.0) causes the nanosleep() system call
to be wrapped between a pair of pthread_setcanceltype() calls.
That's why /bin/sleep failed. Compile it yourself w/o -lpthread and it works.

Also: running gdb on a live process didn't work. I got "int3" errors in
the kernel's log, and gdb seemed to hang or loop somewhere. Postmortem
debugs of core files worked ok though.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 31 2003 - 22:00:20 EST