Re: Memory leak analysis with valgrind
Tim Potter <[email protected]>
| Newsgroups | gmane.network.open-pegasus.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Faina. I replace the cimprovagt binary with a shell script in order to test individual providers under valgrind like this: # /etc/init.d/tog-pegasus stop # mv /usr/sbin/cimprovagt /usr/sbin/cimprovagt.real # cp cimprovagt.wrapper /usr/sbin/cimprovagt # /etc/init.d/tog-pegasus start By default the script doesn't call valgrind - you need to enable it by creating a semaphore file of the form /tmp/$MODULE.valgrind where module is the module name in the output of "cimprovider -l". Or you can create a file /tmp/LogAll.valgrind which valgrinds all providers. Tim. On 16/07/10 07:53, Prager, Faina wrote: > Hello, > > > > I am trying to test our providers for memory leaks using valgrind, but > the latest version of valgrind does not seem to work with OpenPegasus, > has some threading issues. The patch for Valgrind 2.0.0 produces the : > “true: symbol lookup error: /usr/lib/valgrind/valgrind.so: undefined > symbol: __libc_accept” error. > > > > Is there any way to test providers with valgrind using Pegasus? > > > > Thank you, > > Faina Prager >
cimprovagt.valgrind
(text/plain, 312 B)
#!/bin/sh
module=$5
VALGRIND_ARGS="--leak-check=yes --trace-children=yes --log-file=/tmp/$module.valgrind"
if [ -e /tmp/$module.valgrind -o -e /tmp/LogAll.valgrind ]; then
exec /usr/bin/valgrind $VALGRIND_ARGS \
/usr/sbin/cimprovagt.real "$@"
else
exec /usr/sbin/cimprovagt.real "$@"
fi