Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-12214

Handle to audit.log is being held until next GC

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 7.1.0.ER2
    • Fix Version/s: 7.1.0.ER3
    • Component/s: Security
    • Labels:
      None
    • Target Release:
    • Release Notes Docs Status:
      Not Required

      Description

      There is an issue with elytron audit.log handle being open until next GC cycle.

      We hit it in installer testing (JBEAP-1404) so the usecase is rather specific. Installer first starts an embedded server via CLI wrapper, do some configuration, stop the embeded server and then tries to delete newly created files from previous procedure (like all log files) - all running in the same JVM. The problem is the deletion step intermittently fails on Windows (it won't let you delete a file with open handle, unlike Linux) but the handle would be open in any OS. Intermittently because it depends on GC activity.

      I created a simple project that reproduce the issue with arbitrary EAP/WF distribution https://github.com/jbliznak/embedded-server-filelocking

      Run it with:
      mvn clean test "-Dwildfly.home=C:\dev\jboss-eap-7.1" "-Denforcer.skip" -Dtest=AuditLogFileLockingTestCase

      Manual steps to reproduce in Java code:

      • start a CLI wrapper
      • start embed-server in given server path
      • stop embed-server
      • terminate CLI wrapper
      • try to delete given server path

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brian.stansberry Brian Stansberry
              Reporter:
              jbliznak Jan Blizňák
              Tester:
              Ondrej Lukas Ondrej Lukas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: