Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] lib tls thread safeness
Hello
It happend one day that i find this text.
Get Rid of the /lib/tls Directory
The new pthreads library /lib/tls installed by default on
recent Red Hat systems running kernel 2.4.x is defective. You
must remove it or rename it then reboot your system before
running Bacula otherwise after a week or so of running,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bacula will either block for long periods or deadlock entirely.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The feedback that we have concerning 2.6 kernels is the same.
However, on 2.6 systems, you may want to use the loader
environment variable override rather than removing /lib/tls.
Please see Supported Operating Systems for more information on
this problem.
http://www.bacula.org/html-manual/quickstart.html#SupportedOSes
If you have a recent Red Hat Linux system running the 2.4.x
kernel and you have the directory /lib/tls installed on your
system (normally by default), bacula will NOT run. This is the
new pthreads library and it is defective.
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
You must remove this directory prior to running Bacula, or you
can simply change the name to /lib/tls-broken) then you must
reboot your machine (one of the few times Linux must be
rebooted).
If you are not able to remove/rename /lib/tls, an alternative
is to set the environment variable "LD_ASSUME_KERNEL=2.4.19"
prior to executing Bacula. For this option, you do not need to
reboot, and all programs other than Bacula will continue to use
/lib/tls.
The feedback that we have for 2.6 kernels is that the same
problem exists. However, on 2.6 kernels, we would probably
recommend using the environment variable override
(LD_ASSUME_KERNEL=2.4.19) rather than removing /lib/tls.
http://www.bacula.org/html-manual/supported.html#SupportedOSes
Maybe it's of relevance for VDR too and brings
more light into the "thread woodoo"?
the source seems to be thread safe (as it is much more critical
if it would fail or generate garbage.)
While digging in that code:
src/dird/ua_cmds.c:
/*
* We could use strtok() here. But we're not going to, because:
* (a) strtok() is deprecated, having been replaced by strsep();
* (b) strtok() is broken in significant ways.
* we could use strsep() instead, but it's not universally available.
* so we grow our own using strchr().
*/
(that's the real good kind of comment, explaining WHY
something is done the way it is done!)
manpage says:
char *strsep(char **stringp, const char *delim);
Notes:
The strsep() function was introduced as a replacement for strtok(),
since the latter cannot handle empty fields.
However, strtok() conforms to ANSI-C and hence is more portable.
Bugs:
This function suffers from the same problems as strtok().
In particular, it modifies the original string. Avoid it.
there seems not to be a "strsep_r" as it is not required.
Rainer
Home |
Main Index |
Thread Index