|
Hi All,
I have a very simple C++ program which I am building using Jenkins (via shellscript). In shell script I have following command to generate valgrind error report: valgrind --tool=memcheck --leak-check=full --show-reachable=no --undef-value-errors=no --xml=yes --xml-file=valgrind-result.xml ./helloworld
This generates the attached valgrind error report (valgrind-result.xml). Then in the Sonar plugin for Jenkins I set the following property : sonar.cxx.valgrind.reportPath=valgrind-result.xml.
After doing the above steps I run the build and once its successful, I do NOT see any report in the project Sonar dashboard.
Question: 1. What is wrong, in the logs I see the following: 15:41:11.875 INFO p.PhasesTimeProfiler - Sensor CxxValgrindSensor...
15:41:11.875 DEBUG CxxPlugin - Using pattern 'valgrind-result.xml' to find reports 15:41:11.876 INFO CxxPlugin - Processing report '/home/anishs00/installs/jenkins/jobs/testCppHello/workspace/valgrind-result.xml'
15:41:11.918 INFO p.PhasesTimeProfiler - Sensor CxxValgrindSensor done: 43 ms Question: 2 Do I need to enable some additional widget in Sonar dashboard to view the report,
Regards, Ashish --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Ashish,
I suspect your build doesnt contain debugging information. Can you check it please? Cheers, -- Waleri On 08/09/2012 01:20 PM, ashish vashishta wrote: > Hi All, > > I have a very simple C++ program which I am building using Jenkins (via > shellscript). In shell script I have following command to generate > valgrind error report: > valgrind --tool=memcheck --leak-check=full > --show-reachable=no --undef-value-errors=no --xml=yes > --xml-file=valgrind-result.xml ./helloworld > > This generates the attached valgrind error report (valgrind-result.xml). > > Then in the Sonar plugin for Jenkins I set the following property : > sonar.cxx.valgrind.reportPath=valgrind-result.xml. > > After doing the above steps I run the build and once its successful, I > do NOT see any report in the project Sonar dashboard. > Question: 1. What is wrong, in the logs I see the following: > 15:41:11.875 INFO p.PhasesTimeProfiler - Sensor > CxxValgrindSensor... > 15:41:11.875 DEBUG CxxPlugin - Using pattern > 'valgrind-result.xml' to find reports > 15:41:11.876 INFO CxxPlugin - Processing report > '/home/anishs00/installs/jenkins/jobs/testCppHello/workspace/valgrind-result.xml' > 15:41:11.918 INFO p.PhasesTimeProfiler - Sensor > CxxValgrindSensor done: 43 ms > > Question: 2 Do I need to enable some additional widget in Sonar > dashboard to view the report, > > > Regards, > Ashish > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Waleri,
Thanks. debugging information was indeed missing. After adding it and running sonar-runner command I was able to see the valgrind report results in Sonar Dashboard. But I am still not able to view the valgrind report when I execute the process via Jenkins plugin - "Invoke Standalone Sonar Analysis". In both scenarios I am using same project and same project settings. sonar.projectVersion=0.1_R1_B121 sonar.projectKey=HelloWorld_CPP sonar.projectName=HelloWorld_CPP sources=/home/anishs00/installs/jenkins/jobs/testCppHello/workspace binaries=/home/anishs00/installs/jenkins/jobs/testCppHello/workspace sonar.build-stability.url=Hudson:http://192.168.21.32:8080/jenkins/job/testCppHello sonar.build-stability.days=10 sonar.build-stability.username.secured=super sonar.build-stability.password.secured=hsc321 sonar.scm.enabled=false sonar.scm.url=scm:https://192.168.21.32/svn/repos/testCppHello sonar.scm.user.secured=hscuser sonar.scm.password.secured=hsc321 sonar.scm.threadCount=4 sonar.build-stability.url=Hudson:http://192.168.21.32:8080/jenkins/job/testCppHello sonar.language=c++ sonar.dynamicAnalysis=reuseReports sonar.cxx.gcovr.reportPath=gcov-report.xml sonar.cxx.valgrind.reportPath=valgrind-result.xml Any idea ? Regards, Ashish |
|
On 08/10/2012 11:21 AM, avashishta wrote:
> Hi Waleri, > > Thanks. debugging information was indeed missing. After adding it and > running sonar-runner command I was able to see the valgrind report results > in Sonar Dashboard. > > But I am still not able to view the valgrind report when I execute the > process via Jenkins plugin - "Invoke Standalone Sonar Analysis". > > In both scenarios I am using same project and same project settings. > > sonar.projectVersion=0.1_R1_B121 > sonar.projectKey=HelloWorld_CPP > sonar.projectName=HelloWorld_CPP > sources=/home/anishs00/installs/jenkins/jobs/testCppHello/workspace > binaries=/home/anishs00/installs/jenkins/jobs/testCppHello/workspace > sonar.build-stability.url=Hudson:http://192.168.21.32:8080/jenkins/job/testCppHello > sonar.build-stability.days=10 > sonar.build-stability.username.secured=super > sonar.build-stability.password.secured=hsc321 > sonar.scm.enabled=false > sonar.scm.url=scm:https://192.168.21.32/svn/repos/testCppHello > sonar.scm.user.secured=hscuser > sonar.scm.password.secured=hsc321 > sonar.scm.threadCount=4 > sonar.build-stability.url=Hudson:http://192.168.21.32:8080/jenkins/job/testCppHello > sonar.language=c++ > sonar.dynamicAnalysis=reuseReports > sonar.cxx.gcovr.reportPath=gcov-report.xml > sonar.cxx.valgrind.reportPath=valgrind-result.xml > > Any idea ? Uhmm... Maybe. Another thing which may prevent the valgrind violations from showing up is path mismatch. Since valgrind uses absolute paths in his reports the sonar-plugin would fail to locate the violations when the project is: - moved around in FS between the the valgrind running step and sonar-runner-invocation. - analysed from an other machine where projects directory is mounted on different place. I quess it would be useful to have more logging there to detect such cases. In next version... > > Regards, > Ashish > > > > -- > View this message in context: http://sonar.15.n6.nabble.com/Cxx-plugin-Valgrind-Report-Not-Displayed-tp5001829p5001858.html > Sent from the Sonar user mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Would you please give me the detail about '- moved around in FS between the the valgrind running step and sonar-runner-invocation.' ?
I met the same problem. Sonar server didn't show the valgrind violations and the reason should be path mismatch. I don't know how to resolve it.
|
|
On 11/14/2012 08:51 AM, Rella wrote:
> Would you please give me the detail about '- moved around in FS between the > the valgrind running step and sonar-runner-invocation.' ? > I met the same problem. Sonar server didn't show the valgrind violations and > the reason should be path mismatch. I don't know how to resolve it. +1 for reading mail list archives ;) with "moved around ..." I mean something like: 1) cd project 2) valgrind <your program> <params> ... > report.xml 3) cd ..; mv project <somewhere_else> 4) cd <somewhere_else>/project; sonar-runner If that looks far-fetched to you: that actually happens in practice sometimes. And we cannot handle such situation because of valgrind using absolute paths in the reports. > > > Waleri Enns wrote >> Uhmm... Maybe. Another thing which may prevent the valgrind violations >> from showing up is path mismatch. Since valgrind uses absolute paths in >> his reports the sonar-plugin would fail to locate the violations when >> the project is: >> - moved around in FS between the the valgrind running step and >> sonar-runner-invocation. >> - analysed from an other machine where projects directory is mounted on >> different place. >> >> I quess it would be useful to have more logging there to detect such >> cases. In next version... >> >> >>> >>> Regards, >>> Ashish >>> >>> >>> >>> -- >>> View this message in context: >>> http://sonar.15.n6.nabble.com/Cxx-plugin-Valgrind-Report-Not-Displayed-tp5001829p5001858.html >>> Sent from the Sonar user mailing list archive at Nabble.com. >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email > > > > > > -- > View this message in context: http://sonar.15.n6.nabble.com/Cxx-plugin-Valgrind-Report-Not-Displayed-tp5001829p5005435.html > Sent from the Sonar user mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
If we just do:
1) cd project 2) valgrind ../../xxx/xxx/<your program> <params> ... > report.xml 3) sonar-runner It would be OK?
|
|
On 11/14/2012 09:40 AM, Rella wrote:
> If we just do: > 1) cd project > 2) valgrind ../../xxx/xxx/<your program> <params> ... > report.xml > 3) sonar-runner > > It would be OK? yes, it would be. > > > Waleri Enns wrote >> On 11/14/2012 08:51 AM, Rella wrote: >>> Would you please give me the detail about '- moved around in FS between >>> the >>> the valgrind running step and sonar-runner-invocation.' ? >>> I met the same problem. Sonar server didn't show the valgrind violations >>> and >>> the reason should be path mismatch. I don't know how to resolve it. >> >> +1 for reading mail list archives ;) >> >> with "moved around ..." I mean something like: >> >> 1) cd project >> 2) valgrind >> <your program> >> >> <params> >> ... > report.xml >> 3) cd ..; mv project >> <somewhere_else> >> 4) cd >> <somewhere_else> >> /project; sonar-runner >> >> If that looks far-fetched to you: that actually happens in practice >> sometimes. And we cannot handle such situation because of valgrind using >> absolute paths in the reports. >> >>> >>> >>> Waleri Enns wrote >>>> Uhmm... Maybe. Another thing which may prevent the valgrind violations >>>> from showing up is path mismatch. Since valgrind uses absolute paths in >>>> his reports the sonar-plugin would fail to locate the violations when >>>> the project is: >>>> - moved around in FS between the the valgrind running step and >>>> sonar-runner-invocation. >>>> - analysed from an other machine where projects directory is mounted on >>>> different place. >>>> >>>> I quess it would be useful to have more logging there to detect such >>>> cases. In next version... >>>> >>>> >>>>> >>>>> Regards, >>>>> Ashish >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://sonar.15.n6.nabble.com/Cxx-plugin-Valgrind-Report-Not-Displayed-tp5001829p5001858.html >>>>> Sent from the Sonar user mailing list archive at Nabble.com. >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://sonar.15.n6.nabble.com/Cxx-plugin-Valgrind-Report-Not-Displayed-tp5001829p5005435.html >>> Sent from the Sonar user mailing list archive at Nabble.com. >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email > > > > > > -- > View this message in context: http://sonar.15.n6.nabble.com/Cxx-plugin-Valgrind-Report-Not-Displayed-tp5001829p5005438.html > Sent from the Sonar user mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
I must run valgrind under my project directory. Then I got the report like this:
"<frame> <ip>0x8B8D116</ip> <obj>/home/OC/SP/YAN/RTE/YAN/PackageRoot/NDMSQLite/Library/libNDMSQLite.so </obj> <fn>NDM_AccessSQLite::exec(AFC::Str&, sqlite3_stmt**)</fn> <dir>/home/leo/svn/UDR01.00.xx/NDMSQLite/build/RHEL50/build/../../../Sourc e/NDM_AccessSQLite</dir> <file>NDM_AccessSQLite.c</file> <line>838</line> </frame> " How to run sonar-runner to locate the violation?
|
| Powered by Nabble | Edit this page |
