Status: Resolved (View Workflow)
java version "1.8.0_121"
Audit trail logger leaks file descriptors when using log file logger every time Jenkins global configuration is saved. This can result in 100 new open files every time global configuration is saved (10% of the total maximum).
How to replicate:
- Install Audit trail plugin
- Add Log file logger to Audit Trail Loggers
- Save Jenkins configuration. Look at open log files starting with the opened log file name.
- Save Jenkins configuration again without changing any values. Look how the amount of open files raises.
You can monitor under Ubuntu open file count with a command like "lsof -n | grep audit.log.0 | wc". This has resulted for me in 100 new open files every time press the Save button. That is a lot considering that the default maximum for open files in Ubuntu 14.04 and such is 1024 for a user. The amount of files does not seem to go down over 15 minute monitoring period.
You can also replicate this with a following Jenkins CLI Groovy script (after configuring Log file logger for this plugin) by running it repeatedly and looking how the open file descriptors count increases:
import jenkins.model.Jenkinsdef plugin = Jenkins.getInstance().pluginManager.getPlugin("audit-trail").getPlugin()
- is duplicated by
JENKINS-28288 Audit Trail Plugin log file rotation issue
JENKINS-23449 .lck files are not removed during a clean shutdown
- links to