[
https://issues.jboss.org/browse/WFCORE-3103?page=com.atlassian.jira.plugi...
]
Jan Blizňák edited comment on WFCORE-3103 at 8/4/17 5:45 PM:
-------------------------------------------------------------
[~luck3y], the reproducer isn't trying to find open handles, it just tries to delete
files, exactly as the manual steps say:
* start a CLI wrapper
* start embed-server from given server path
* stop embed-server
* terminate CLI wrapper
* try to delete given server path, ie. the files that were opened in order to start
embed-server and that should no longer be opened after embed-server was stopped.
So test should pass when all these steps succeeded, ie. after this jira is fixed. But the
last step currently fails everytime on all Win OSes I tried because there are open files
from modules dir (I don't have Win 10, but I suppose Win Server 2016 is equivalent in
this case). I was using EAP 7.1.0.ER3 and also today's Wildfly 11.0.0.Beta1
(wildfly-core 3.0.0.Beta30).
In case you want verbose output of the testcase, you need to download handle.exe tool from
https://docs.microsoft.com/en-us/sysinternals/downloads/handle and execute the reproducer
like this (the handle.exe serves only as additional info here to list locked files):
{{mvn clean test "-Dwildfly.home=C:\tmp\wildfly-11.0.0.Beta1"
"-Dhandle.exe=C:\tmp\handle.exe" -Dtest=ModulesFileLockingTestCase
-DtestLogToFile=false}}
was (Author: jbliznak):
[~luck3y], the reproducer isn't trying to find open handles, it just tries to delete
files, exactly as the manual steps say:
* start a CLI wrapper
* start embed-server from given server path
* stop embed-server
* terminate CLI wrapper
* try to delete given server path, ie. the files that were opened in order to start
embed-server and that should no longer be opened after embed-server was stopped.
So test should pass when all these steps succeeded, ie. after this jira is fixed. But the
last step currently fails everytime on all Win OSes I tried because there are open files
from modules dir (I don't have Win 10, but I suppose Win Server 2016 is equivalent in
this case). I was using EAP 7.1.0.ER3 and also today's Wildfly 11.0.0.Beta1
(wildfly-core 3.0.0.Beta30).
In case you want verbose output of the testcase, you need to download handle.exe tool from
https://docs.microsoft.com/en-us/sysinternals/downloads/handle and execute the reproducer
like this (the handle.exe serves only as additional info here to list locked files):
{{mvn clean test "-Dwildfly.home=C:\tmp\wildfly-11.0.0.Beta1"
"-Dhandle.exe=C:\tmp\handle.exe" -Dtest=ModulesFileLockingTestCase}}
Embedded server doesn't close open file handles
-----------------------------------------------
Key: WFCORE-3103
URL:
https://issues.jboss.org/browse/WFCORE-3103
Project: WildFly Core
Issue Type: Bug
Components: CLI, Modules
Reporter: Jan Blizňák
Assignee: Ken Wills
When embedded server is started programatically (eg. via CLI wrapper) with specified
jboss home, JARs from that path are opened via classloader. But these open handles are
never released even after embedded server is stopped.
This causes problem in situation eg. when you want to delete that jboss home. This is
exactly one of the scenarios used in EAP installer, you are not allowed to delete open
files on Windows - see JBEAP-1404.
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=ModulesFileLockingTestCase
Manual steps to reproduce in Java code:
* start a CLI wrapper
* start embed-server from given server path
* stop embed-server
* terminate CLI wrapper
* try to delete given server path
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)