• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • core
    • Jenkins ver. 1.553, Chrome browser
      Jenkins ver. 2.150.1 from "Official" Docker Image running on Ubuntu 16.04 with jenkins_home mounted from the local file system on a RAID 0 setup.

      I have a bug which looks similar to JENKINS-14899:
      Sometimes, when a job runs for a long time without anything getting output, the jenkins page stops updating until the job finishes. Then it add the completion lines (SUCCESS or FAILURE) to the job.
      The difference is that the number of line does not matter (last bug occurence was on a job that output 264 lines (+ an unknown number of non-output lines)

      This results in a truncated /console, /consoleFull and /consoleText.

      All files do end with the two lines (if it succeeds):
      Notifying upstream projects of job completion
      Finished: SUCCESS
      but hundreds of lines didn't get stored by jenkins (over 10 minutes of logs for my last job!)

      I can often see this bug when I'm running a long impala query, where the output stops before the status line (something like "Returned 0 row(s) in 1987.42s") and the rest of the console logs never get output.

      This happens approximately one time out of 20 for the jobs I'm running myself on this Jenkins server.

          [JENKINS-29198] Console logs get truncated without reason

          Alok Singh added a comment -

          Did anyone get a workaround for this? 

          Alok Singh added a comment - Did anyone get a workaround for this? 

          Few Jenkins versions have this bug, just upgrade.

          Namikaze Minato added a comment - Few Jenkins versions have this bug, just upgrade.

          Alok Singh added a comment - - edited

          camusensei What version do you recommend? I have tried with 2.204.1 and 2.222.3 and I still run into the same issue.

          Alok Singh added a comment - - edited camusensei What version do you recommend? I have tried with 2.204.1 and 2.222.3 and I still run into the same issue.

          Namikaze Minato added a comment - - edited

          I have no problem on my jenkins servers:

          2.249.1
          2.138
          2.27
          2.26
          2.204.5
          2.235.5
          2.138.1

          You could try to test if the problem is reproducible, like a loop printing messages, e.g.:

          #!/bin/bash
          while sleep 1; do printf '%*s\n' 300 "$SECONDS"; done
          

          Try it and see if your problem always happens after the same time, or if such a simple script does not allow you to reproduce the problem?

           

          Namikaze Minato added a comment - - edited I have no problem on my jenkins servers: 2.249.1 2.138 2.27 2.26 2.204.5 2.235.5 2.138.1 You could try to test if the problem is reproducible, like a loop printing messages, e.g.: #!/bin/bash while sleep 1; do printf '%*s\n' 300 "$SECONDS"; done Try it and see if your problem always happens after the same time, or if such a simple script does not allow you to reproduce the problem?  

          Alok Singh added a comment -

          camusensei Nope it didn't work either. I think it also depends on the amount of data in one line we write to the BufferedInputStream which is causing this issue to pop up.

          Alok Singh added a comment - camusensei Nope it didn't work either. I think it also depends on the amount of data in one line we write to the BufferedInputStream which is causing this issue to pop up.

          I think you need to give more information on your problem which seems to be different from the one I used to have. Maybe open a new issue, and describe preciseley anything you can.

          Namikaze Minato added a comment - I think you need to give more information on your problem which seems to be different from the one I used to have. Maybe open a new issue, and describe preciseley anything you can.

          I am seeing this issue right now on Jenkins 2.335!

          There's something gone awry.

          We use kubernetes and had been having some connection issues we solved by stopping the use of websockets to agents, but the truncated logs keep happening, developers cannot debug builds, and I cannot tell them why it's failed or why there are no logs...

          Uzumaki Kushina added a comment - I am seeing this issue right now on Jenkins 2.335! There's something gone awry. We use kubernetes and had been having some connection issues we solved by stopping the use of websockets to agents, but the truncated logs keep happening, developers cannot debug builds, and I cannot tell them why it's failed or why there are no logs...

          The only thing interesting I see in system jenkins logs is:

          Mar 04, 2022 4:56:35 PM WARNING jenkins.branch.WorkspaceLocatorImpl getWorkspaceRootJENKINS-2111 path sanitization ineffective when using legacy Workspace Root Directory ‘${ITEM_ROOTDIR}/workspace’; switch to ‘${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}’ as in JENKINS-8446 / JENKINS-21942

          Uzumaki Kushina added a comment - The only thing interesting I see in system jenkins logs is: Mar 04, 2022 4:56:35 PM WARNING jenkins.branch.WorkspaceLocatorImpl getWorkspaceRoot JENKINS-2111 path sanitization ineffective when using legacy Workspace Root Directory ‘${ITEM_ROOTDIR}/workspace’; switch to ‘${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}’ as in JENKINS-8446 / JENKINS-21942

          Nicolas added a comment - - edited

          Hello,

          I'm affected by this issue too, it's really annoying as it forces user to attempt a local rebuild to obtain logs, which even worse, doesn't work when the issue is specific to the server...

          I'm reproducing the issue with the following pipeline job:

          pipeline {
              agent any
          
              stages {
                  stage('Hello') {
                      matrix {
                          axes {
                              axis {
                                  name 'blarg'
                                  values 'foo', 'bar', 'baz', 'qux', 'wizz'
                              }
                          }
                          stages {
                              stage('Main') {
                                  steps {
                                      sh """
                                      for i in \$(seq 1 ${TURNS}); do
                                          echo hello world \${i}!
                                      done
                                      """
                                  }
                              }
                          }
                      }
                  }
              }
          }
          

          When TURNS is 100000, all logs look fine, when set to 200000, the logs are truncated and the job takes 10 to 40 times longer to complete.
          Note that when I redirect the logs to files by doing for example:

          (for i in \$(seq 1 ${TURNS}); do
              echo hello world \${i}!
          done) | tee ${blarg}.log
          

          Log files created are complete, so it doesn't look like a disk I/O bottleneck issue.

           

          Jenkins version: 2.375.1

          Nicolas added a comment - - edited Hello, I'm affected by this issue too, it's really annoying as it forces user to attempt a local rebuild to obtain logs, which even worse, doesn't work when the issue is specific to the server... I'm reproducing the issue with the following pipeline job: pipeline {     agent any     stages {         stage( 'Hello' ) {             matrix {                 axes {                     axis {                         name 'blarg'                         values 'foo' , 'bar' , 'baz' , 'qux' , 'wizz'                     }                 }                 stages {                     stage( 'Main' ) {                         steps {                             sh """                             for i in \$(seq 1 ${TURNS}); do                                 echo hello world \${i}!                             done                             """                         }                     }                 }             }         }     } } When TURNS is 100000, all logs look fine, when set to 200000, the logs are truncated and the job takes 10 to 40 times longer to complete. Note that when I redirect the logs to files by doing for example: ( for i in \$(seq 1 ${TURNS}); do echo hello world \${i}! done ) | tee ${blarg}.log Log files created are complete, so it doesn't look like a disk I/O bottleneck issue.   Jenkins version: 2.375.1

          Nicolas added a comment -

          In my situation, I think that this issue is related to https://issues.jenkins.io/browse/JENKINS-56446

          Nicolas added a comment - In my situation, I think that this issue is related to https://issues.jenkins.io/browse/JENKINS-56446

            Unassigned Unassigned
            camusensei Namikaze Minato
            Votes:
            20 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated: