Subject: Re: [vserver] glibc on guest system
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Sat, 29 May 2010 14:15:43 +0200

On Fri, May 28, 2010 at 02:32:10PM -0700, Nirmal Guhan wrote:
> On Fri, May 28, 2010 at 1:01 PM, Herbert Poetzl <herbert@13thfloor.at>wrote:

> > On Fri, May 28, 2010 at 11:04:24AM -0700, Nirmal Guhan wrote:
> > > Hi,

> > > I see that guest system uses its own glibc.
> > > Guest (centos5) :
> > > libglib-2.0.so.0
> > > libglib-2.0.so.0.1200.3

> > > Host(Fedora12)
> > > libglib-2.0.so.0
> > > libglib-2.0.so.0.2200.2

> > > Since there is always some depedency between glibc
> > > and kernel, I wonder if vserver requires guest system

> > newer kernels are always ABI compatible to older
> > ones (Linus takes great care not to break anything
> > there :) so older glibc will work fine with newer
> > kernels, although they might not be able to utilize
> > newer kernel features ...

> I am considering a case where the glibc is newer and kernel is
> older (in other words, guest has an updated or latest version of
> glibc). This new glibc might be using newer kernel features that
> are not supported by the host (older) kernel. I understand the
> recommendation to use the recent kernel for vserver but am thinking
> of a case where guest system moves faster than the host though
> they start off at the same version. In this case, any upgrade to
> guest might involve upgrading the host as well and hence there is a
> dependency/compatibility requirement. Please correct me if am wrong.

in general, glibc is at least somewhat backwards compatible
as well, and often this compatibility can be forced via
certain environment variables, so usually that shouldn't
be an issue either, of course, when glibc tries to utilize
a feature not present in the kernel, it will get an error
message back (from the kernel) and it depends on the fallback
mechanisms present in glibc to handle that gracefully ...

again, I haven't seen a glibc too new for kernels not older
than a few years (and you better do not keep a kernel which
is five years old for obvious security reasons)

best,
Herbert

> > it is always suggested to use a recent kernel for
> > Linux-VServer, that said, there are no known issues
> > between kernel and guest glibc (regardless of the
> > libc version)

> > > glibc to be compatible (in other words, guest system
> > > glibc version < host system glibc version) the kernel?

> > why should the guest glibc have any dependancy
> > with the host glibc?

> > > If so, how this is guaranteed?

> > nothing is guaranteed, but it works for the reasons
> > mentioned above, of course, if you decide to run
> > an ubuntu guest on an ancient debian host kernel
> > you might get into troubles ....

> > > Please clarify.

> > HTC,
> > Herbert

> > > Thanks,
> > > Nirmal