[jboss-jira] [JBoss JIRA] (WFCORE-837) Running tearDown() method of custom server setup task throws AssertionError in ActiveOperationSupport

Brian Stansberry (JIRA) issues at jboss.org
Thu Jul 23 13:17:03 EDT 2015


     [ https://issues.jboss.org/browse/WFCORE-837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry reassigned WFCORE-837:
---------------------------------------

    Assignee: ehsavoie Hugonnet  (was: Brian Stansberry)


Emmanuel, can you have a look at this?

I suspect what is happening is one of these server setup tasks is doing something such that the server closes the connection to the client, and that's why the 'shutdown' field is true.

> Running tearDown() method of custom server setup task throws AssertionError in ActiveOperationSupport 
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WFCORE-837
>                 URL: https://issues.jboss.org/browse/WFCORE-837
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Domain Management
>    Affects Versions: 1.0.0.Final, 1.0.1.Final, 2.0.0.Alpha10
>         Environment: Arquillian, Wildfly-9.0.0.CR2
>            Reporter: Vitalii Chepeliuk
>            Assignee: ehsavoie Hugonnet
>
> Running tearDown() method of custom server setup tasks in AbstractNodeAuthentication abstract test:
>       KerberosSystemPropertiesSetupTask.class,
>       SecurityDomainsSetupTask.class,
>       SecurityTraceLoggingServerSetupTask.class,
>       KrbLdapServerSetupTask.class,
>       Krb5ConfServerSetupTask.class
> throws AssertionError. 
> Example of SecurityTraceLoggingServerSetupTask
> {code}
>     @Override
>     public void tearDown(ManagementClient managementClient, String containerId) throws Exception {
>         if (categories == null || categories.isEmpty()) {
>             return;
>         }
>         final List<ModelNode> updates = new ArrayList<ModelNode>();
>         for (String category : categories) {
>             if (category == null || category.length() == 0) {
>                 continue;
>             }
>             updates.add(Util.createRemoveOperation(PATH_LOGGING.append("logger", category)));
>         }
>         ModelNode op = Util.createEmptyOperation("write-attribute", PATH_LOGGING.append("console-handler", "CONSOLE"));
>         op.get("name").set("level");
>         op.get("value").set("INFO");
>         CoreUtils.applyUpdates(updates, managementClient.getControllerClient()); // Applying changes fails here
>     }
> {code}
> and in ActiveOperationSupport:151 shutdown property is already true but should be still false
> {code}
>     protected <T, A> ActiveOperation<T, A> registerActiveOperation(final Integer id, A attachment, ActiveOperation.CompletedCallback<T> callback) {
>         lock.lock(); try {
>             // Check that we still allow registration
>             assert ! shutdown; // Here it throws AssertionError
>             final Integer operationId;
>             if(id == null) {
>                 // If we did not get an operationId, create a new one
>                 operationId = operationIdManager.createBatchId();
>             } else {
>                 // Check that the operationId is not already taken
>                 if(! operationIdManager.lockBatchId(id)) {
>                     throw ProtocolLogger.ROOT_LOGGER.operationIdAlreadyExists(id);
>                 }
>                 operationId = id;
>             }
>             final ActiveOperationImpl<T, A> request = new ActiveOperationImpl<T, A>(operationId, attachment, getCheckedCallback(callback));
>             final ActiveOperation<?, ?> existing =  activeRequests.putIfAbsent(operationId, request);
>             if(existing != null) {
>                 throw ProtocolLogger.ROOT_LOGGER.operationIdAlreadyExists(operationId);
>             }
>             activeCount++; // condition.signalAll();
>             return request;
>         } finally {
>             lock.unlock();
>         }
>     }
> {code}
> Stack trace is following
> java.lang.AssertionError: null
>         at org.jboss.as.protocol.mgmt.ActiveOperationSupport.registerActiveOperation(ActiveOperationSupport.java:151)
>         at org.jboss.as.protocol.mgmt.ActiveOperationSupport.registerActiveOperation(ActiveOperationSupport.java:121)
>         at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:121)
>         at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:263)
>         at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:168)
>         at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:147)
>         at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:80)
>         at org.jboss.as.test.integration.security.common.CoreUtils.applyUpdate(CoreUtils.java:177)
>         at org.jboss.as.test.integration.security.common.CoreUtils.applyUpdates(CoreUtils.java:172)
>         at org.infinispan.test.integration.security.tasks.AbstractTraceLoggingServer



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list