On Wed, 2010-05-05 at 11:42 +1000, Greg Banks wrote:
> As of Mon 15 March there's a process in our product which uses the async
> API to do precisely what the async API is designed for, namely hiding
> the fetch latency for slow or broken hosts in a cluster. Please don't
> remove it just yet.
Noted, and this was never going to be something that would have happened
> But if you do, please make libpcp sensibly thread-safe instead. I don't
> know the current status, but the last time I looked, libpcp was not
None of the various PCP libraries are thread safe. This was a conscious
decision right at the very beginning (not an accidental oversight).
Unless there is some magic automation that can be applied, I suspect
this would be a major exercise to implement (a) at all, and then (b)
across all of the current platforms.
For example, in libpcp.so
$ nm libpcp.so | grep '[ ][bB][ ]' | grep -v '\.[0-9][0-9]*$' | wc
So, close to 100 statis or global variables that would have to "dealt
with" to make the code thread safe.
> > and someone steps up
> > to help with the QA coverage of these routines I am strongly suggesting
> > that they be expunged at the next really major release, i.e. 4.0
> I think extending the coverage of pcpqa is a good and worthy goal.
Any chance you could offer a code fragment that mimics your usage of the
async routines as a starting point for one or more QA apps?
> Aside: I'd be curious to see the results of your coverage study and to
> know how you went about doing it.
1. build libpcp.so from source
2. install GNUlocaldefs in the src directory containing
CFLAGS += -fprofile-arcs -ftest-coverage
LDLIBS += -lgcov
3. touch pmns.c
5. over in the QA directory, export LD_LIBRARY_PATH=... path to the
directory containg the annotated libpcp.so
6. check -g pmns
7. back in the libpcp source directory run ggcov pmns.c and optically
grep for big chunks of redness
If there is a flaw in this approach I'd appreciate hearing it,
especially from someone with a special interest in ggcov ... 8^)>
ps I did need to perform a little surgery on ggcov-0.8 to make it build
and work with this week's toolchain in Ubuntu 9.10.