XMLWordPrintable

Details

    Description

      I experience deadlock conditions during Archive deployment using Arquillian and Surefire.

      You can see thread dumps at:
      https://hudson.qa.jboss.com/hudson/view/WFK/view/WFK-2.0/job/wfk-2.0-spring-3-eap6/CONTAINER=eap6,FRAMEWORK=spring-3,LABEL=selenium-ff3-rhel6-x86_64,jdk=java16_default/19/consoleText

      or

      https://hudson.qa.jboss.com/hudson/view/WFK/view/WFK-2.0/job/wfk-2.0-spring-3-eap6/16/CONTAINER=eap6,FRAMEWORK=spring-3,LABEL=selenium-ff3-rhel6-x86_64,jdk=java16_default/consoleText

      some of the other runs manifest the same behavior.

      Analysis of the situation:

      During deployment an XNIO NIO Write XYZ and XNIO NIO Read XYZ threads are created to read the status of the deployment but they are blocked. Process continues to create multiple read/write threads until the ulimit is reached and then it fails.

      I've reached this deadlock for following operations:

      public boolean isServerInRunningState() {
              try {
                  ModelNode op = Util.getEmptyOperation(READ_ATTRIBUTE_OPERATION, PathAddress.EMPTY_ADDRESS.toModelNode());
                  op.get(NAME).set("server-state");
      
                  ModelNode rsp = client.execute(op);
                  return SUCCESS.equals(rsp.get(OUTCOME).asString())
                          && !ControlledProcessState.State.STARTING.toString().equals(rsp.get(RESULT).asString())
                          && !ControlledProcessState.State.STOPPING.toString().equals(rsp.get(RESULT).asString());
              }
              catch (Exception ignored) {
                  return false;
              }
          }
      

      or

      public String deploy(Archive<?> archive) throws DeploymentException {
              try {
                  InputStream input = archive.as(ZipExporter.class).exportAsInputStream();
                  DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
                  builder = builder.add(archive.getName(), input).andDeploy();
                  DeploymentPlan plan = builder.build();
                  DeploymentAction deployAction = builder.getLastAction();
                  return executeDeploymentPlan(plan, deployAction);
              } catch (Exception e) {
                  throw new DeploymentException("Could not deploy to container", e);
              }
          }
      

      influencing both sync and async calls.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kpiwko Karel Piwko
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: