Re: feature tests for pthreads implementation and configuration?



Hello Mikael,


Actually I failed to consider that I ran FC3 with kernel 2.6.16 and
FC4 with an earlier RH 2.6 kernel. It turns out that the issue
comes from the 2.6.16 kernel, not FC3-vs-FC4 pthreads. (And I did
get NPTL with FC3; I looked at the wrong place and found the fallback
LinuxThreads code instead of the NPTL code it actually used.)

The issue is that kernel 2.6.16 clears a new thread's sigaltstack
settings (as per SUSv3) while previous kernels and apparently also
Solaris 9/x86 preserved it. That caused SIGFPEs in our threads to
be delivered on the current stack (a big no-no in our runtime system)
instead of the alt stack, causing memory corruption and SIGSEGVs.

The simple solution was to have each thread allocate and install
its own alt stack before starting running application code.

Thanks for the info.

It is always nice when the poster solves its own problem ;-)

Cheers,
Loic.

.



Relevant Pages

  • 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)
  • Re: LD_FUNDAMENTALLY_FLAWED
    ... > This is to get it to enable the use of linuxthreads 2.4.19 floating stacks. ... > Either way I have either icluded something in the kernel that I shouldn't ... > something out that's causing the kernel to ignore the LD_ environment ... includes the NPTL which is a new threading library. ...
    (alt.os.linux.redhat)
  • Re: Threads and processes on Linux
    ... task runs in the same memory space as the parent task. ... LinuxThreads and/or older 2.4.x kernel. ... _abstraction_ provided by NPTL: ... > the spawned thread), the spwaned thread also seems to terminate. ...
    (comp.os.linux.misc)
  • NPTL v userland v LT (RH9+custom kernel problem)
    ... I am running a custom kernel without the NPTL stuff. ... At least one RH9 userland piece is not working correctly with my ... is delivered (login having set this up before prompting for the password). ...
    (Linux-Kernel)
  • Re: Is Linux Unix?
    ... > as debian package does not mean you cannot install it. ... In fact I looked at the homepage of nptl. ... The page says that you need to use a rather new kernel and libc. ... Intel compiler is really critical to my work. ...
    (Debian-User)