Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-20222

Allowing drmemory to run even if the command return a failure ( Praqma case 10247 )

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: drmemory-plugin
    • Labels:
      None
    • Environment:
      Jenkins on Windows 7.
    • Similar Issues:

      Description

      I am building a library.
      To analyse memory leaks, I run unit tests with drmemory.
      When a unit test doesnt pass completely it returns an error.

      And it seems that if drmemory plugin detects an error in the command, it will not process the result and display the graph...

      I think it would be useful to process the result and display the graph even if the command returns an error, to be able to still test memory leaks in case of unexpected errors of the program being tested.

      Maybe having some advanced option to expect failure of the command, and still process the result file if it is present.

        Attachments

          Activity

          Hide
          jbrejner Jens Brejner added a comment - - edited

          Hi Alex.

          I'm not shure what you mean ?
          Which of A) and B):
          A) Your build succeeds, but the post-buildstep drmemory fails, and the graph is not displayed
          B) Build fails, and drmemory is not executed, so the graph is not displayed ?

          Best regards

          Jens

          Show
          jbrejner Jens Brejner added a comment - - edited Hi Alex. I'm not shure what you mean ? Which of A) and B): A) Your build succeeds, but the post-buildstep drmemory fails, and the graph is not displayed B) Build fails, and drmemory is not executed, so the graph is not displayed ? Best regards Jens
          Hide
          asmodehn Alex V added a comment -

          Hi Jens,

          It's A) :

          The build of the executable succeed.
          Running the executable with drmemory ( as a jenkins build step with my fork https://github.com/asmodehn/drmemory-plugin and https://github.com/asmodehn/drmemory-api to be able to run with spaces in logdir path ) gives me :

          Dr Memory Plugin version 0.1.1
          Executing C:\Program Files (x86)\Jenkins\workspace\Project Debug\bin\vs2010\Debug\Project.V2.DB.test_d.exe -xml
          Setting log path to C:\Program Files (x86)\Jenkins\workspace\Project Debug\bin\vs2010\Debug\9
          Recieved Unable to execute drmemory.exe -logdir "C:\Program Files (x86)\Jenkins\workspace\Project Debug\bin\vs2010\Debug\9" -batch -quiet – "C:\Program Files (x86)\Jenkins\workspace\Project Debug\bin\vs2010\Debug\Project.V2.DB.test_d.exe" -xml:
          [Project Debug] $ cmd /c call C:\Windows\TEMP\hudson2236794367891390495.bat

          And then the graph is not displayed.

          However, the run actually succeeds ( and the logdir is created and filled up with drmemory analysis files ).
          I am guessing that there is an incorrect/unexpected error detection upon running the .exe with drmemory:

          • my exe returns output on the console -> might be detected as exception by the plugin.
          • my exe exit with a non-null exit status code ( this is what I expected as it is an incomplete unit test ).

          I am not sure what would be the best fix here, given all the different possible use-cases out there. But I think some advanced options might be the way to go...

          Thanks for the help !

          Alex

          Show
          asmodehn Alex V added a comment - Hi Jens, It's A) : The build of the executable succeed. Running the executable with drmemory ( as a jenkins build step with my fork https://github.com/asmodehn/drmemory-plugin and https://github.com/asmodehn/drmemory-api to be able to run with spaces in logdir path ) gives me : Dr Memory Plugin version 0.1.1 Executing C:\Program Files (x86)\Jenkins\workspace\Project Debug\bin\vs2010\Debug\Project.V2.DB.test_d.exe -xml Setting log path to C:\Program Files (x86)\Jenkins\workspace\Project Debug\bin\vs2010\Debug\9 Recieved Unable to execute drmemory.exe -logdir "C:\Program Files (x86)\Jenkins\workspace\Project Debug\bin\vs2010\Debug\9" -batch -quiet – "C:\Program Files (x86)\Jenkins\workspace\Project Debug\bin\vs2010\Debug\Project.V2.DB.test_d.exe" -xml: [Project Debug] $ cmd /c call C:\Windows\TEMP\hudson2236794367891390495.bat And then the graph is not displayed. However, the run actually succeeds ( and the logdir is created and filled up with drmemory analysis files ). I am guessing that there is an incorrect/unexpected error detection upon running the .exe with drmemory: my exe returns output on the console -> might be detected as exception by the plugin. my exe exit with a non-null exit status code ( this is what I expected as it is an incomplete unit test ). I am not sure what would be the best fix here, given all the different possible use-cases out there. But I think some advanced options might be the way to go... Thanks for the help ! – Alex
          Hide
          madsnielsen Mads Nielsen added a comment -

          Fixed in 1.1

          Show
          madsnielsen Mads Nielsen added a comment - Fixed in 1.1
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Mads Nielsen
          Path:
          src/main/java/net/praqma/jenkins/plugin/drmemory/DrMemoryBuildAction.java
          src/main/java/net/praqma/jenkins/plugin/drmemory/DrMemoryBuilder.java
          src/main/java/net/praqma/jenkins/plugin/drmemory/DrMemoryProjectAction.java
          src/main/java/net/praqma/jenkins/plugin/drmemory/DrMemoryPublisher.java
          src/main/java/net/praqma/jenkins/plugin/drmemory/DrMemoryRemoteBuilder.java
          src/main/resources/net/praqma/jenkins/plugin/drmemory/DrMemoryBuilder/config.jelly
          src/main/resources/net/praqma/jenkins/plugin/drmemory/DrMemoryBuilder/help-treatFailed.html
          src/test/java/net/praqma/jenkins/plugin/drmemory/DrMemoryPublisherTest.java
          http://jenkins-ci.org/commit/drmemory-plugin/9bc958e105a625efb1e74cde98b2209cf6df712d
          Log:
          Fixed JENKINS-20222

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mads Nielsen Path: src/main/java/net/praqma/jenkins/plugin/drmemory/DrMemoryBuildAction.java src/main/java/net/praqma/jenkins/plugin/drmemory/DrMemoryBuilder.java src/main/java/net/praqma/jenkins/plugin/drmemory/DrMemoryProjectAction.java src/main/java/net/praqma/jenkins/plugin/drmemory/DrMemoryPublisher.java src/main/java/net/praqma/jenkins/plugin/drmemory/DrMemoryRemoteBuilder.java src/main/resources/net/praqma/jenkins/plugin/drmemory/DrMemoryBuilder/config.jelly src/main/resources/net/praqma/jenkins/plugin/drmemory/DrMemoryBuilder/help-treatFailed.html src/test/java/net/praqma/jenkins/plugin/drmemory/DrMemoryPublisherTest.java http://jenkins-ci.org/commit/drmemory-plugin/9bc958e105a625efb1e74cde98b2209cf6df712d Log: Fixed JENKINS-20222

            People

            • Assignee:
              praqma Praqma Support
              Reporter:
              asmodehn Alex V
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: