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

Logs can grow without bound when using ansiColor plugin

    Details

    • Similar Issues:

      Description

      This issue is the same issue than JENKINS-40762, but now happening in the ansiColor plugin.

      When a single pipeline step generates a lot of logging all at once, the log on disk might repeat itself.

      This persists between Jenkins restarts and can only be stopped by stopping Jenkins, deleting the $JENKINS_HOME/jobs/[job]/build/[build id] directory, and starting Jenkins again.
      STR:

      1. Create a new pipeline job with the following pipeline script definition:

      ansiColor('xterm') {
          node ("linux-slave") { 
              sh ''' 
                  export i=1; 
                  while [ "$i" -lt "50000" ]; 
                  do 
                      i=$((i+1)); 
                      echo "$i: this is test line content.this is test line content.this is test line content.this is test line content." 
                  done 
              ''' 
          } 
      }
      

      2. Run the job.

      Expected result:
      Job terminates eventually.
      There are around 200.000 lines in the log files

      Actual result:
      Job does not terminate, or terminate with much more than 200.000 lines duplicating some od the consoleoutput logs

      Note: To reproduce this issue, I would recommend using a dedicated agent instead of directly using the master agent.

        Attachments

          Issue Links

            Activity

            fbelzunc Félix Belzunce Arcos created issue -
            fbelzunc Félix Belzunce Arcos made changes -
            Field Original Value New Value
            Description This issue is the same issue than JENKINS-40762, but now happening in the ansiColor plugin.

            When a single pipeline step generates a lot of logging all at once, the log on disk might repeat itself.

            This persists between Jenkins restarts and can only be stopped by stopping Jenkins, deleting the $JENKINS_HOME/jobs/[job]/build/[build id] directory, and starting Jenkins again.
            STR:

            1. Create a new pipeline job with the following pipeline script definition:

            {code:java}
            ansiColor('xterm') {
                node ("linux-slave") {
                    sh '''
                        export i=1;
                        while [ "$i" -lt "50000" ];
                        do
                            i=$((i+1));
                            echo "$i: this is test line content.this is test line content.this is test line content.this is test line content."
                        done
                    '''
                }
            }
            {code}


            2. Run the job.

            _Expected result:_
            Job terminates eventually.
            There are around 200.000 lines in the log files

            +Actual result:+
            Job does not terminate, or terminate with much more than 200.000 lines duplicating some od the consoleoutput logs
            This issue is the same issue than JENKINS-40762, but now happening in the ansiColor plugin.

            When a single pipeline step generates a lot of logging all at once, the log on disk might repeat itself.

            This persists between Jenkins restarts and can only be stopped by stopping Jenkins, deleting the $JENKINS_HOME/jobs/[job]/build/[build id] directory, and starting Jenkins again.
            STR:

            1. Create a new pipeline job with the following pipeline script definition:

            {code:java}
            ansiColor('xterm') {
                node ("linux-slave") {
                    sh '''
                        export i=1;
                        while [ "$i" -lt "50000" ];
                        do
                            i=$((i+1));
                            echo "$i: this is test line content.this is test line content.this is test line content.this is test line content."
                        done
                    '''
                }
            }
            {code}


            2. Run the job.

            _Expected result:_
            Job terminates eventually.
            There are around 200.000 lines in the log files

            +Actual result:+
            Job does not terminate, or terminate with much more than 200.000 lines duplicating some od the consoleoutput logs

            Note: To reproduce this issue, I would recommend using a dedicated agent instead of directly using the master agent.
            fbelzunc Félix Belzunce Arcos made changes -
            Component/s core [ 15593 ]
            jglick Jesse Glick made changes -
            Link This issue duplicates JENKINS-37575 [ JENKINS-37575 ]
            jglick Jesse Glick made changes -
            Component/s core [ 15593 ]
            dnusbaum Devin Nusbaum made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Resolution Duplicate [ 3 ]

              People

              • Assignee:
                fbelzunc Félix Belzunce Arcos
                Reporter:
                fbelzunc Félix Belzunce Arcos
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: