[jbosstools-issues] [JBoss JIRA] (JBIDE-20426) JBossAS Tools: sometimes, Restarting in Debug results in "Failed to start", even though it started

Rob Stryker (JIRA) issues at jboss.org
Thu Jan 26 19:00:00 EST 2017


    [ https://issues.jboss.org/browse/JBIDE-20426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13354188#comment-13354188 ] 

Rob Stryker commented on JBIDE-20426:
-------------------------------------

https://github.com/jbosstools/jbosstools-server/pull/466

We will still get two threads trying to stop the server, potentially at different times. We had a check present to verify the 'shared process' (ie the process for the currently launched server) was identical to the one we're responding to terminating. However, this check was too early. It was possible for our check on the 'shared process' to return the old process for the server that was just terminated. 

Meanwhile, in other threads, our poller has marked the server as stopped, and a new process has been launched. Then, our 'process terminated' listener tries to stop it again, without re-checking that the process is the same yet again. 

I've traced through this extensively and tried a bunch of various paths in selectively progressing individual threads to see if it's possible to break, and my tests indicate the PR fixes the issue. What's more, if the 'process terminated' listener gets execution before the 2nd start of the server, it will prevent the 2nd start of the server until it finishes its checks. So that's safe. 

If on the other hand the process terminated listener gets execution after the 2nd start of the server, the check that the processes are identical will fail, so no redundant (or broken) setServerStopped() call will be made. 

This one feels good to fix. 

> JBossAS Tools: sometimes, Restarting in Debug results in "Failed to start", even though it started
> --------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-20426
>                 URL: https://issues.jboss.org/browse/JBIDE-20426
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: server
>            Reporter: The Alchemist
>            Assignee: Rob Stryker
>             Fix For: 4.4.3.AM2
>
>
> This usually happens when I have a few big EARs attached, so I think the "checker" doesn't wait long enough to see if WF actually restarted.
> The result is this weird situation where the "Servers" view says that it's "Stopped", but the Console view has the red square to terminate the process.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbosstools-issues mailing list