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.
1. Create a new pipeline job with the following pipeline script definition:
2. Run the job.
Job terminates eventually.
There are around 200.000 lines in the log files
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.