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

Log file logger for Audit trail plugin leaks open file descriptors

    XMLWordPrintable

Details

    Description

      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()

      Attachments

        Issue Links

          Activity

            ejusjud Jussi Judin created issue -
            pierrebtz Pierre Beitz made changes -
            Field Original Value New Value
            Assignee Pierre Beitz [ pierrebtz ]
            pierrebtz Pierre Beitz made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            pierrebtz Pierre Beitz made changes -
            Status In Progress [ 3 ] Open [ 1 ]
            pierrebtz Pierre Beitz made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            pierrebtz Pierre Beitz made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            pierrebtz Pierre Beitz made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            pierrebtz Pierre Beitz made changes -
            Status Resolved [ 5 ] Fixed but Unreleased [ 10203 ]
            pierrebtz Pierre Beitz made changes -
            Remote Link This issue links to "PR-12 (Web Link)" [ 22138 ]
            pierrebtz Pierre Beitz made changes -
            Remote Link This issue links to "PR-12 (Web Link)" [ 22138 ]
            pierrebtz Pierre Beitz made changes -
            Remote Link This issue links to "PR-11 (Web Link)" [ 22139 ]
            pierrebtz Pierre Beitz made changes -
            Labels 2.4-fixed
            pierrebtz Pierre Beitz made changes -
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
            pierrebtz Pierre Beitz made changes -
            Link This issue is duplicated by JENKINS-23449 [ JENKINS-23449 ]
            pierrebtz Pierre Beitz made changes -
            Link This issue is duplicated by JENKINS-28288 [ JENKINS-28288 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: