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
- blocks
-
JBEAP-1404 IOException on Installation quit (Windows)
- Resolved
- is cloned by
-
WFCORE-3076 Handle to audit.log is being held until next GC
- Resolved
- is incorporated by
-
JBEAP-11931 (7.1.0) Upgrade to WildFly Core to 3.0.0.Beta30
- Closed