On Wednesday 28 September 2005 10:22, Joel Palmius wrote: > Sorry for spamming about gentoo.. :-)
Don't worry. Short summary for Jeff: he gets in SKAS0 the message "cannot set up LDT for thread-local storage" at startup (correct Joel?), but he isn't using NPTL, he's rather using LinuxThreads with TLS support. On Gentoo, this is possible when using at least glibc-2.3.4 (2.3.3 ebuilds don't try to enable this). And (Joel please confirm, gathered from your previous posts) he is running 2.6.13.2-bs2, which includes the really neeeded modify_ldt() fix (missing break in switch) I recently sent. This is not very different from Rob's problem with Ubuntu, or from problems on Debian Sarge, other than they have a fallback while Gentoo doesn't. Is skas-hold-own-ldt a solution to that? > I'm now stuck at getting a functional system up and running. The problem I > have is a catch 22: I cannot run an athlon-xp tarball in skas0 because it > complains with the dreaded "cannot set up LDT for thread-local storage", > and I don't want to run a tarball compiled in i386 mode because then I > might as well run in TT mode for speed issues. Let's not exaggerate, I think the difference speed-wise between TT and SKAS0 is much bigger. But expecting that root_fs to work is reasonable. > Having read similar posts on the subject, I've tried: > - Adding LD_ASSUME_KERNEL=2.4.1 to command line (didn't make any > difference) > - Inserting export LD_ASSUME_KERNEL=2.4.1 in start scripts (didn't make > any difference) > - Move /lib/tls (can't since it doesn't exist) All these things help when the problem is a NPTL glibc, and make ld.so prefer the LinuxThreads version (i.e. the one in /lib rather than in /lib/tls). But your case is different - you have the problem with LinuxThreads (at least so I think - if the tarball is compiled with USE="nptl nptl-only" it won't work anyway until I fix NPTL support). > Further I've dug into the glibc ebuild. It seems it automatically enables > the configure flag "--with-tls" if the machine is detected as being > anything higher than i386. Hmm, possible, depending on the ebuild. In fact, there's some difference between enabling NPTL and enabling TLS, starting from 2.3.4 ebuilds. I've checked glibc-2.3.5.ebuild (I run Gentoo, so I have the portage tree installed) and with LinuxThreads (no NPTL), want_tls is true for >=i486, but -tls is enabled starting from i686. But for your purposes, this is more or less the same. > This leads me to conclude I have to compile a new system from scratch to > get optimizations working under skas0. > Questions are thus: > - Which software packets cause this crash? Is it only glibc? I think yes, but possibly add statically linked one which include the glibc code for this (I wouldn't expect a statically linked binary to use this stuff, but actually errno is a per-thread variable and can be implemented this way). > - How should glibc be compiled (it with which configure flags?) > I am guessing "--without-tls --without-nptl". Anything else? At that point I'd add --without-__thread. But I'm not sure if other programs will be so happy... but maybe yes. A userspace program can use only __thread, and Gentoo allows disabling it, so it should work. But I'd use the below road. > Or is there a guest kernel patch which might enable me to run an > unmodified gentoo tarball (compiled for athlon-xp) under skas0? This is possible, I think Jeff has some, but possibly they've not yet been merged. Will see with him. > // Joel -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.messenger.yahoo.com ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ User-mode-linux-user mailing list User-mode-linux-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user