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

Log from cmake/ctest steps isn't fully captured on OsX

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • cmakebuilder-plugin
    • Jenkins 2.150.1
      CMake plugin 2.6.0
      Pipeline 2.6
      macOS 10.13.6
      Remoting version: 3.27

      After some updates I've noticed that console isn't showing full log for cmake build and ctest run steps.

      "try {
      ...
      cmakeBuild buildDir: ..., cmakeArgs: cmake_params, generator: 'Xcode', installation: '(default)', sourceDir: source_dir, steps: [[args: '--config '+BuildConfiguration+' -- -j 4 -quiet', withCmake: true]]
      if (RunTests.toBoolean())

      { ctest arguments: '-C '+BuildConfiguration+' --output-on-failure', installation: '(default)', workingDir: ... }

      } finally {
      sh 'umount ${WORKSPACE}/mnt/ThirdParties || true'
      }"

      I'm attaching examples. In one case there were failing unittests, but 'sh' step is shown in the middle of ctest log. In other cases with successful unittests log is missing last steps and some additional info from ctest.

        1. log_race.png
          log_race.png
          8 kB
        2. log_race2.png
          log_race2.png
          6 kB
        3. log_race3.png
          log_race3.png
          5 kB

          [JENKINS-55215] Log from cmake/ctest steps isn't fully captured on OsX

          Martin Weber added a comment -

          Could it be that ANY output written to STDERR is missing in the logs?

          Martin Weber added a comment - Could it be that ANY output written to STDERR is missing in the logs?

          Marian Klymov added a comment -

          Output isn't fully showing even STDOUT. Maybe it has something to do with https://issues.jenkins-ci.org/browse/JENKINS-32191 ?

           

          Marian Klymov added a comment - Output isn't fully showing even STDOUT. Maybe it has something to do with https://issues.jenkins-ci.org/browse/JENKINS-32191 ?  

          Martin Weber added a comment -

          Thanks for finding a related issue, I myself did not find one.

          The plugin does not do anything special to capture the build output. It just takes a TaskListener and a Launcher from the StepContext and passes the listener to the launcher. The listener is supposed to handle any build output.

          So I think this issue is related to JENKINS-32191, or at least to workflow plugin.

          Please note that JENKINS-32191 has been marked as resolved with <https://issues.jenkins-ci.org/browse/JENKINS-32191?focusedCommentId=350722&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-350722> but the reason to resolve it is just a guess. Have you tried with inserting a 'sleep 3' command into your script as a workaround?

           

          Martin Weber added a comment - Thanks for finding a related issue, I myself did not find one. The plugin does not do anything special to capture the build output. It just takes a TaskListener and a Launcher from the StepContext and passes the listener to the launcher. The listener is supposed to handle any build output. So I think this issue is related to JENKINS-32191 , or at least to workflow plugin. Please note that JENKINS-32191 has been marked as resolved with < https://issues.jenkins-ci.org/browse/JENKINS-32191?focusedCommentId=350722&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-350722 > but the reason to resolve it is just a guess. Have you tried with inserting a 'sleep 3' command into your script as a workaround?  

          Marian Klymov added a comment -

          I've added sleep for 5 seconds in the end after sh 'umount...'

          Now log for ctest step is fully shown.

          But still 'sh' step starts in the middle of ctest output.

           

          Marian Klymov added a comment - I've added sleep for 5 seconds in the end after sh 'umount...' Now log for ctest step is fully shown. But still 'sh' step starts in the middle of ctest output.  

          Marian Klymov added a comment -

          I've tried on another project - sleep hasn't helped there

           

          Marian Klymov added a comment - I've tried on another project - sleep hasn't helped there  

          Martin Weber added a comment - - edited

          I tried to reproduce this on a remote Linux agent by generating lots of output.

          Pipeline script:

          node('linux') {
              timestamps {
                  stage('all') {
             echo 'Hello World'
             sh label: 'ls', script: 'ls -lgGR /bin /lib /lib64 /opt /usr'
                  }
              }
          }
          

          Unfortunately, I could not reproduce the issue.

          Could you try to runs the script on an OSX agent to verify whether it is related to cmakebuilder or to pipeline?

          Martin Weber added a comment - - edited I tried to reproduce this on a remote Linux agent by generating lots of output. Pipeline script: node( 'linux' ) { timestamps { stage( 'all' ) { echo 'Hello World' sh label: 'ls' , script: 'ls -lgGR /bin /lib /lib64 /opt /usr' } } } Unfortunately, I could not reproduce the issue. Could you try to runs the script on an OSX agent to verify whether it is related to cmakebuilder or to pipeline?

            Unassigned Unassigned
            nekto Marian Klymov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: