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

Log file logger for Audit trail plugin leaks open file descriptors


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • audit-trail-plugin
    • java version "1.8.0_121"
      Ubuntu 14.04
      audit-trail 2.2

      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:

      1. Install Audit trail plugin
      2. Add Log file logger to Audit Trail Loggers
      3. Save Jenkins configuration. Look at open log files starting with the opened log file name.
      4. 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()

            pierrebtz Pierre Beitz
            ejusjud Jussi Judin
            0 Vote for this issue
            2 Start watching this issue