RE: Running Valgrind with CIM provider
Visakh Sreekumar <[email protected]> Thu, 8 Nov 2012 00:26:28 -0700
| Newsgroups | gmane.network.open-pegasus.general |
|---|---|
| Message-ID | <96F0D5E6ED9B1F4983196DE73A672511010987532A@BRM-EXCH-4.corp.brocade.com> |
Hi Anusha, Thanks a lot. Running the provider as OutOfProcess solved the problem. Regards, Visakh From: Kandepu, Anusha [mailto:[email protected]] Sent: Friday, November 02, 2012 3:22 PM To: Devchandra Leishangthem; Visakh Sreekumar Cc: [email protected] Subject: RE: Running Valgrind with CIM provider Hi Vikash, If you have mentioned separate valgrind log files for cimserver and cimprovgt in wrapper script, then cimprovgt log file should be generated seperaley.That how even we do our Nightly Build with valgrind and we get to see separate files generated for cimserver and cimprovgt .I am not sure if It matters for cimprovgt to be inprocess or outofprocess.Are you running your provider inprocess or outofprocess?. Regards, Anusha. From: Devchandra Leishangthem [mailto:[email protected]] Sent: Tuesday, October 30, 2012 11:05 AM To: Visakh Sreekumar Cc: Kandepu, Anusha; [email protected]<mailto:[email protected]> Subject: RE: Running Valgrind with CIM provider Yea, valgrind logs for the cimprovagt will be overwritten, which seems to be rather bad. D>L> Meetei 9538270270 [cid:[email protected]] IBM India Software Lab, STG 6th Floor, A0202, EGL -D,Bangalore, India From: Visakh Sreekumar <[email protected]<mailto:[email protected]>> To: "Kandepu, Anusha" <[email protected]<mailto:[email protected]>>, "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>, Date: 10/29/2012 06:49 PM Subject: RE: Running Valgrind with CIM provider ________________________________ Hi Anusha, Thanks for the detailed information. I followed the steps that you mentioned carefully, but unfortunately I am able to see only the valgrind log for cimserver. Here is what I have tried: 1) Created /root/cim_bin and copied binaries $PEGASUS_HOME/bin/cimserver and $PEGASUS_HOME/bin/cimprovagt to this directory. 2) Replaced binaries $PEGASUS_HOME/bin/cimserver and $PEGASUS_HOME/bin/cimprovagt with the following scripts: cimserver ======== #!/bin/bash valgrind --log-file=/root/cimserver_valgrind --num-callers=25 --tool=memcheck --leak-check=full --error-limit=no /root/cim_bin/cimserver "$@" cimprovagt ========= #!/bin/bash valgrind --log-file=/root/cimprovagt_valgrind --num-callers=25 --tool=memcheck --leak-check=full --error-limit=no /root/cim_bin/cimprovagt "$@" 3) Ran the script $PEGASUS_HOME/bin/cimserver All queries are working fine and I am able to see the cimserver_valgrind log file with provider information also. But here I was expecting valgrind to add the provider logs separately to /root/cimprovagt_valgrind file. Could you please let me know if I am missing anything here? Regards, Visakh From: Kandepu, Anusha [mailto:[email protected]] Sent: Friday, October 26, 2012 2:36 PM To: Visakh Sreekumar; [email protected]<mailto:[email protected]> Subject: RE: Running Valgrind with CIM provider Hi Visakh, You can’t run cimprovgt bin alone with valgrind .It should be invoked by cimserver only. So here if you want to collect the leaks for cimprovgt then have a wrapper script for cimserver also and start cimserver.So that cimserver bin will start with valgrind enabled and internally it invokes cimprovgt also with valgrind enabled .I have mentioned below, the process of how do we run memory leaks test as part of OP Nightly Build and tests. Example : We have wrapper scripts for each binary under PEGASUS_HOME /bin(From this directory all the binaries are loaded) directory .In the wrapper script, each binary has been pointed to the exact location of binaries as mentioned in the sample script below. In this example actual binaries are present under “PEGASUS_HOME /bin_exe” directory and wrapper script is present under “PEGASUS_HOME /bin” directory. The wrapper script for cimserver/cimprovgt is mentioned below. #!/bin/bash valgrind --log-file=/var/buildMAIN/pegasus/build/valgrind_log/cimserver --num-callers=25 --tool=memcheck --leak-check=full --error-limit=no /var/buildMAIN/pegasus/build/bin_exe/cimserver "$@" #!/bin/bash valgrind --log-file=/var/buildMAIN/pegasus/build/valgrind_log/cimprovagt --num-callers=25 --tool=memcheck --leak-check=full --error-limit=no /var/buildMAIN/pegasus/build/bin_exe/cimprovagt "$@" Hope this has clarified your doubt !! . Regards, Anusha. From: Visakh Sreekumar [mailto:[email protected]] Sent: Monday, October 22, 2012 5:49 PM To: [email protected]<mailto:[email protected]> Subject: RE: Running Valgrind with CIM provider CIM Server used is OpenPegasus 2.11.0 and valgrind version is 3.7.0. From: Visakh Sreekumar Sent: Monday, October 22, 2012 5:31 PM To: '[email protected]' Subject: Running Valgrind with CIM provider Hi This is Visakh, I am new to this group. I am trying to do memory leak analysis of our CIM provider with valgrind and has so far been unsuccessful in my attempt. Hope to get some expert advice in this regard. I have a wrapper script for executing cimprovagt which is as given below: ========================================================================== 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 \ /opt/pegasus/bin/cimprovagt.orig "$@" else exec /opt/pegasus/bin/cimprovagt.orig "$@" fi ========================================================================== Here /opt/pegasus/bin/cimprovagt.orig is the renamed original cimprovagt executable. Now when I run valgrind -v cimprovagt(which is the wrapper), it reports the error: "cimprovagt is an internal program used by cimserver. cimprovagt should not be invoked directly." This is seen irrespective of whether "forceProviderProcesses" is true/false. Please let me know if I am missing anything here. Regards, Visakh
image001.gif
(image/gif, 1.1 KB) - not displayed