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

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.1.0.ER3
    • 7.1.0.ER2
    • Security
    • None
    • Not Required

      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

              bstansbe@redhat.com Brian Stansberry
              jbliznak@redhat.com Jan Blizňák
              Ondrej Lukas Ondrej Lukas (Inactive)
              Ondrej Lukas Ondrej Lukas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: