LD_ASSUME_KERNEL questions



Background

I'm using slackware 10.2 with kernel 2.4.32 and I'm building slackware firebird database packages (using official firebird binary build tar.gzs as a base, so I'm not compiling their code on my PC). I've read the following articles that discuss LD_ASSUME_KERNEL:

http://people.redhat.com/~drepper/assumekernel.html

http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/cins_nptl.html

The multi-threaded version of firebird (super server) comes in two flavors: one uses linuxthreads and the other uses NPTL. The firebird documentation states that the linuxthreads version needs to have LD_ASSUME_KERNEL=2.2.5 set in the environment, when running with a kernel that supports NPTL. If I understand the above articles correctly, the linuxthreads version of the firebird super server requires the older fixed stack size linuxthreads library.

From the slackware 10.2 README.NPTL:

This version of Slackware contains support in glibc for NPTL (the Native
POSIX Thread Library). NPTL works with newer kernels (meaning 2.6.x, or
a 2.4 kernel that is patched to support NPTL, but not an unmodified
"vanilla" 2.4 kernel such as Slackware uses) to provide improved
performance for threads. [lines removed ...] For compatibility, the regular (linuxthreads) libraries are installed in /lib, and the new NPTL
versions are installed in /lib/tls. Which versions are used depends on
the kernel you're using. If it's newer than 2.6.4, then the NPTL
libraries in /lib/tls will be used.


Questions

1) In slackware 10.2 with 2.4.x kernel, "getconf GNU_LIBPTHREAD_VERSION" outputs "linuxthreads 0.10". How do I know if this is the newer floating stack version of linuxthreads or the older fixed stack size version? Are the two versions of linuxthreads (older fixed stack size or newer floating stack) compatible?

2) Since each DSO can tell the dynamic linker in glibc which minimum OS ABI version is needed (via ELF .note.ABI-tags), it appears that different linux distributions could (and probably do) use different ABI version requirements than that listed in point 4 of Ulrich Drepper's article. In RHL9, one of three threading libraries is used, depending on the kernel and the setting of LD_ASSUME_KERNEL. In slackware 10.2, one of two threading libraries is used, depending on the kernel and the setting of LD_ASSUME_KERNEL. From Ulrich Drepper's article, "In RHEL3 only two versions of glibc are needed, one using LinuxThreads and one using NPTL. The very old LinuxThreads code is not needed."

Am I correct that in the case of the linuxthreads version of firebird, setting "LD_ASSUME_KERNEL=2.2.5", could potentially load different linuxthreads libraries on different linux distributions?

(Linuxthreads version of firebird would use the fixed stack size version of linuxthreads in RHL9, but would use linuxthreads 0.10 in slackware 10.2 and the newer linuxthreads on RHEL3. Depending on the answer to my first question, this may or may not make a difference on slackware 10.2 -vs- RHL9 and RHL9 -vs- RHEL3.)

So shouldn't linux software vendor recommended LD_ASSUME_KERNEL settings be distribution specific?

Perhaps it's best to add code in my postinstall doinst.sh scripts to detect the GNU_LIBPTHREAD_VERSION and output a warning, if the user installed a version of firebird that does not match their kernel's threading capability and directs the user to install the correct version instead.

Thank you for your help,

Peter Santoro
.



Relevant Pages

  • Re: inode state
    ... I can not use linuxthreads since my server is also multiplexing via ... If I remove one of the two disks 5.2 boots but the kernel traps as soon as ... >> The system stores most many statistics in memory which is flushed to ...
    (freebsd-questions)
  • Re: Threads implementation on Linux
    ... Actually, on 2.4.21, what is the LinuxThreads version? ... > Also, I've read the LinuxThreads FAQ that shipped with my glibc packet, ... > but I didn't understand what version is in my kernel. ... pthread interface -- all with minimal kernel ...
    (comp.os.linux.development.system)
  • Re: Does pthreads in Linux create user or kernel space threads?
    ... using getconf in shell gave me NPTL 0.60 ... advantage of substantial changes in the 2.6 kernel to provide an application API that's compatible with the POSIX thread standard behavior. ... Before all that, Linuxthreads provided a rough semblance of POSIX compatibility if you were careful, but with substantial overhead and reliance on a manager thread. ...
    (comp.programming.threads)
  • Re: feature tests for pthreads implementation and configuration?
    ... if LinuxThreads, for which kernel version was it configured? ... it works fine when compiled against FC4's NPTL pthreads. ... instead of the alt stack, ...
    (comp.os.linux.development.apps)