Destroy forcibly forked test using SIGKILL#211
Destroy forcibly forked test using SIGKILL#211tkowalcz wants to merge 3 commits intoapache:masterfrom
Conversation
|
Hello Tomasz, can you tell us the details of the issue you are running into? That might help understand what change needs to be done. |
Absolutely. I just wanted to get the conversation started. Thanks for taking time to reply. When using <junitlauncher
taskname="JUnit5"
haltonfailure="${junit.haltonfailure}"
failureproperty="junit.failures"
printsummary="false">
...
<fork timeout="${junit.timeout}">
...
</fork>
</junitlauncher>it setups In our case we had the JVM stuck for yet to be discovered reason. Tools like I was able to verify following - sending Since the test in question got stuck consistently I verified that after this change |
|
Hello Tomasz,
Were you able to get hold of a thread dump with This code dealing with process termination resides in a core layer of Ant and has been around for a long time. So having as much details as possible to see what's causing this issue will help understand if this code deserves a change or if we should address this in a different manner (perhaps in the junitlauncher task specific code). |
If the JVM of the monitored forked test hangs then
Process:destroymight not be effective. On unix systems it will sendSIGINT. An alternative is to useProcess: destroyForciblymethod to useSIGKILL.Using
SIGKILLwill not allow the monitored process to cleanly shutdown, but the question is if it already timed out then it will probably never do any cleanup.Alternatively watchdog could try
destroyfirst and thendestroyForcibly.Comments?
Thanks!