From: Bogdan Costescu (Bogdan.Costescu_at_IWR.Uni-Heidelberg.De)
Date: Tue Jan 11 2005 - 10:42:25 CST

On Mon, 10 Jan 2005, John Stone wrote:

> I guess what I find surprising about all of this is that these
> fundamental libraries like libpthreads.so aren't nailed down with
> a consistent interface.

It's not the interface, but the implementation that changed. However,
in some cases the behaviour slightly changed and some applications
broke because of this. There are more details available, but not
really put into one place, so you'll have to search a bit for them;
one starting point could be the release notes of RHEL3 (or maybe also
RHL9/FC1).

For example, a lot of C codes expected that

external int errno;

is a global variable always available. With NPTL, errno becomes a
per-thread variable (which makes more sense anyway IMHO) and can't
therefore be accessed as a global variable anymore; it is now defined
in errno.h so:

#include <errno.h>

has to be present before accessing the errno variable. I think that
this is actually part of some official standard (POSIX ?) and the
older code could have been considered "buggy".

Other changes that cought my eye are related to how exceptions are
caught and where signals are delivered, but I don't do much
development with threads so I just registered them without paying too
much attention.

> I suppose that one potential cause for problems would be if they
> implemented some of the old pthreads stuff with macros in header
> files rather than using real entrypoints, that'd certainly break
> things when changing to a new implementation.

I think that this was indeed the case with errno.

> In any case, I don't have the means nor the time to test against
> more than one or two linux distributions locally, so I'll have to
> rely on feedback from others in going any further with this proposed
> change.

Given that this is mentioned for the first time for VMD, I suggest
leaving things as they are (= not adding LD_ASSUME_KERNEL to the
startup script) and maybe putting a notice about it somewhere. Only
if the problem becomes more widely seen modify the script.

-- 
Bogdan Costescu
IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu_at_IWR.Uni-Heidelberg.De