Help - Search - Members - Calendar
Full Version: Is Posix Threads Under Linux 2.4, Stable?
Linuxhelp > Support > Technical Support
alan
I'm having some shared memory (??) problems using threads. Is POSIX
threads under Linux stable? Is there on on-line user/discusion group
that may be able to shed some light on such problems.

Problem examples (under Linux 2.4 on an x86 platform):

One process w/ 5 threads seems to work, but It looks like 2 different
threads show 2 different values for the same global variable. Luckily
the "owner' thread has the correct value & the "user interface" thread
(read only) has the wrong value, not an out-of-date value

Another process w/ 4 threads Seg Faults on rcving data via a socket
"recv()" fct. I've built a non-thread version for testing other co-operating
code & it works fine. But the thread version still crashes immediately
when socket data is rcvd -- with no useful info from "gdb".

Thanks,
Alan
hughesjr
Stable is a relative term ... many programs won't run with the ntpl threads ... if you are using redhat 9, rhel 3 or fedora core, you can go back to the old way by adding this to your environment (or the script for the programs in question):

LD_ASSUME_KERNEL=2.4.1
for within a program start script

or

export LD_ASSUME_KERNEL=2.4.1
to make all progams by this user start in the Linuxthreads with floating stacks mode. Oracle database server requires this mode....
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.