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()
      plugin.applySettings()

          [JENKINS-44129] Log file logger for Audit trail plugin leaks open file descriptors

          Jussi Judin created issue -
          Pierre Beitz made changes -
          Assignee New: Pierre Beitz [ pierrebtz ]
          Pierre Beitz made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Pierre Beitz made changes -
          Status Original: In Progress [ 3 ] New: Open [ 1 ]
          Pierre Beitz made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Pierre Beitz made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Pierre Beitz made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Pierre Beitz made changes -
          Status Original: Resolved [ 5 ] New: Fixed but Unreleased [ 10203 ]
          Pierre Beitz made changes -
          Remote Link New: This issue links to "PR-12 (Web Link)" [ 22138 ]
          Pierre Beitz made changes -
          Remote Link Original: This issue links to "PR-12 (Web Link)" [ 22138 ]
          Pierre Beitz made changes -
          Remote Link New: This issue links to "PR-11 (Web Link)" [ 22139 ]

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

              Created:
              Updated:
              Resolved: