Uploaded image for project: 'WildFly Arquillian'
  1. WildFly Arquillian
  2. WFARQ-70

Shutdown thread may destroy a wrong process in stopInternal method

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.0.0.Beta1, 3.0.0.Final
    • None
    • None

    Description

      The shutdown thread may kill a wrong process in the ManagedContainer classes. If the managed container is killed in background (e.g. test kills the WildFly container for some reason) then stopping the container creates the shutdown thread which points to the non-existing (already stopped process).
      https://github.com/wildfly/wildfly-arquillian/blob/2.2.0.Final/container-managed/src/main/java/org/jboss/as/arquillian/container/managed/ManagedDeployableContainer.java#L259
      But as the container process does not exist anymore there is nobody interrupting the thread
      https://github.com/wildfly/wildfly-arquillian/blob/2.2.0.Final/container-managed/src/main/java/org/jboss/as/arquillian/container/managed/ManagedDeployableContainer.java#L290
      and just the catch clause is executed
      https://github.com/wildfly/wildfly-arquillian/blob/2.2.0.Final/container-managed/src/main/java/org/jboss/as/arquillian/container/managed/ManagedDeployableContainer.java#L296

      The shutdown thread waits till stop container timeout (ie. by default for 60 seconds) and then it destroys process. But the `process` instance may be already pointing to another instance of container which was started afterwards. Then such container is suddenly stopped without any reason

      INFO  [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested via an OS signal
      
      

      This is copied from https://github.com/wildfly/wildfly-arquillian/issues/163

      Attachments

        Issue Links

          Activity

            People

              jperkins-rhn James Perkins
              jperkins-rhn James Perkins
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: