Hi, I''ve been experimenting with Xen on a Gentoo Linux box, and I''ve run into the problem that some binaries cause the Xen to generate a TLS warning and go into compatibility mode, even though I''ve moved /lib/tls to /lib/tls.disabled. I figure I have some static binary causing it, though I am not sure what. I saw someone mention that there was a patch for glibc to allow Xen to run with TLS libraries, and I''d like to try it out, but I can''t seem to find it anywhere. Is it available for public testing? Thanks. -Michael _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Am Donnerstag, den 21.04.2005, 00:28 -0500 schrieb Michael Long:> I''ve been experimenting with Xen on a Gentoo Linux box, and I''ve run > into the problem that some binaries cause the Xen to generate a TLS > warning and go into compatibility mode, even though I''ve moved > /lib/tls to /lib/tls.disabled. I figure I have some static binary > causing it, though I am not sure what. I saw someone mention that > there was a patch for glibc to allow Xen to run with TLS libraries, > and I''d like to try it out, but I can''t seem to find it anywhere. Is > it available for public testing? Thanks.Just discovered a glibc for fc3 built on tuesday: <http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/RPMS/fc3/> It''s an older fc3-glibc (2.3.4 from 2004/12/19), but it contains a "glibc-xen-tls.patch"! Did not try it (yet), but maybe that''s it. The packager did not maintain the changelog of the specfile, so i cannot see the actual differences to the original fc3-glibc. /nils. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I pulled out the glibc-xen-tls.patch file and applied it to Gentoo''s glibc-2.3.5. It compiled and installed, but when I reboot into Xen, I still get the emulation warning. Should it autodetect that the patch is there, or is there something I need to do to disable the check in Xen in order to test the patch? -Michael On 4/21/05, Nils Toedtmann <xen-devel@nils.toedtmann.net> wrote:> Am Donnerstag, den 21.04.2005, 00:28 -0500 schrieb Michael Long: > > I''ve been experimenting with Xen on a Gentoo Linux box, and I''ve run > > into the problem that some binaries cause the Xen to generate a TLS > > warning and go into compatibility mode, even though I''ve moved > > /lib/tls to /lib/tls.disabled. I figure I have some static binary > > causing it, though I am not sure what. I saw someone mention that > > there was a patch for glibc to allow Xen to run with TLS libraries, > > and I''d like to try it out, but I can''t seem to find it anywhere. Is > > it available for public testing? Thanks. > > Just discovered a glibc for fc3 built on tuesday: > > <http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/RPMS/fc3/> > > It''s an older fc3-glibc (2.3.4 from 2004/12/19), but it contains a > "glibc-xen-tls.patch"! Did not try it (yet), but maybe that''s it. The > packager did not maintain the changelog of the specfile, so i cannot see > the actual differences to the original fc3-glibc. > > /nils. > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> I pulled out the glibc-xen-tls.patch file and applied it to > Gentoo''s glibc-2.3.5. It compiled and installed, but when I > reboot into Xen, I still get the emulation warning. Should > it autodetect that the patch is there, or is there something > I need to do to disable the check in Xen in order to test the patch?Did you remember to build glibc with "-mno-tls-direct-seg-refs" ? Ian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Nope, that''s what I forgot. I recompiled the patched glibc with that flag and everything seems to be working fine. I can post the ebuild if people are interested. It''s pretty straightforward, just adding the patch and making for the CFLAGS get set properly. I''m now compiling all my packages with -mno-tls-direct-seg-refs. Is this necessary/recommended? I know some ebuild strip out CFLAGS it''s unsure of, so if it''s necessary other packages may need to be modified. On 4/24/05, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:> > > > I pulled out the glibc-xen-tls.patch file and applied it to > > Gentoo''s glibc-2.3.5. It compiled and installed, but when I > > reboot into Xen, I still get the emulation warning. Should > > it autodetect that the patch is there, or is there something > > I need to do to disable the check in Xen in order to test the patch? > > Did you remember to build glibc with "-mno-tls-direct-seg-refs" ? > > Ian >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> Nope, that''s what I forgot. I recompiled the patched glibc > with that flag and everything seems to be working fine. I > can post the ebuild if people are interested. It''s pretty > straightforward, just adding the patch and making for the > CFLAGS get set properly. > > I''m now compiling all my packages with > -mno-tls-direct-seg-refs. Is this necessary/recommended? I > know some ebuild strip out CFLAGS it''s unsure of, so if it''s > necessary other packages may need to be modified.Glibc really hammers the thread local storage stuff and hence experiences rather more of a slow down rather than any applications we''ve come across, but it would obviously be preferable to recompile anything that uses tls. One of the hard things is figuring out which applications actually make use of the thread local attribute, and hence would actually benefit from recompiling. I guess we could modify the warning message to print out the name of the process that did the -ve segment access... Ian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
That would be helpful, though the access still could be inside a library, which would be a be pain to track down in say, Mozilla or KDE. Still, it''s better than nothing. -Michael On 4/25/05, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:> > > > Nope, that''s what I forgot. I recompiled the patched glibc > > with that flag and everything seems to be working fine. I > > can post the ebuild if people are interested. It''s pretty > > straightforward, just adding the patch and making for the > > CFLAGS get set properly. > > > > I''m now compiling all my packages with > > -mno-tls-direct-seg-refs. Is this necessary/recommended? I > > know some ebuild strip out CFLAGS it''s unsure of, so if it''s > > necessary other packages may need to be modified. > > Glibc really hammers the thread local storage stuff and hence > experiences rather more of a slow down rather than any applications > we''ve come across, but it would obviously be preferable to recompile > anything that uses tls. > > One of the hard things is figuring out which applications actually make > use of the thread local attribute, and hence would actually benefit from > recompiling. > > I guess we could modify the warning message to print out the name of the > process that did the -ve segment access... > > Ian >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Michael Long wrote:>I recompiled the patched glibc with that flag and everything seems to be working fine. I can post the ebuild if people are interested. >Could you also put it in http://bugs.gentoo.org/ Edward _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Am Montag, den 25.04.2005, 21:57 +0100 schrieb Ian Pratt:> > > Nope, that''s what I forgot. I recompiled the patched glibc > > with that flag and everything seems to be working fine. I > > can post the ebuild if people are interested. It''s pretty > > straightforward, just adding the patch and making for the > > CFLAGS get set properly. > > > > I''m now compiling all my packages with > > -mno-tls-direct-seg-refs. Is this necessary/recommended? I > > know some ebuild strip out CFLAGS it''s unsure of, so if it''s > > necessary other packages may need to be modified.Now it''s really cool to run a source distro like gentoo. I wonder if you can bootstrap it with that CFLAGS?> Glibc really hammers the thread local storage stuff and hence > experiences rather more of a slow down rather than any applications > we''ve come across, but it would obviously be preferable to recompile > anything that uses tls. > > One of the hard things is figuring out which applications actually make > use of the thread local attribute, and hence would actually benefit from > recompiling. > > I guess we could modify the warning message to print out the name of the > process that did the -ve segment access...Would be really helpful for all others running binary distros (like me). I have to identify the individual FC-rpms to rebuild them. So i vote for it. As FC4test shippes with Xen: how did they solve the probem (did they)? /nils. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Michael Long <nikarul@gmail.com> writes:> That would be helpful, though the access still could be inside a > library, which would be a be pain to track down in say, Mozilla or > KDE. Still, it''s better than nothing.If it printed the pid, name, and address of the offending instruction, it should be easy to track down. -- Måns Rullgård mru@inprovide.com _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 4/26/05, Nils Toedtmann <xen-devel@nils.toedtmann.net> wrote:> Am Montag, den 25.04.2005, 21:57 +0100 schrieb Ian Pratt: > > > > > Nope, that''s what I forgot. I recompiled the patched glibc > > > with that flag and everything seems to be working fine. I > > > can post the ebuild if people are interested. It''s pretty > > > straightforward, just adding the patch and making for the > > > CFLAGS get set properly. > > > > > > I''m now compiling all my packages with > > > -mno-tls-direct-seg-refs. Is this necessary/recommended? I > > > know some ebuild strip out CFLAGS it''s unsure of, so if it''s > > > necessary other packages may need to be modified. > > Now it''s really cool to run a source distro like gentoo. I wonder if you > can bootstrap it with that CFLAGS?I don''t see why not. I was able to build the base system packages (using ''emerge system'') on my build system without any apparent problems. Glibc strips out unknown CFLAGS though, so you have to have a modified ebuild that makes sure it uses it (bootstrapping or not). -Michael _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel