-
Bug
-
Resolution: Done
-
Critical
-
19.0.0.Beta7
-
None
As seen during testing of WFLY-7628:
2022-04-25 09:12:17,540 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0403: Unexpected failure during execution of the following operation(s): [{ "operation" => "composite", "address" => [], "steps" => [{ "address" => [ ("subsystem" => "distributable-ejb"), ("infinispan-timer-management" => "hotrod") ], "operation" => "remove" }], "operation-headers" => { "caller-type" => "user", "access-mechanism" => "NATIVE" } }]: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:372) at java.base/java.util.ArrayList.get(ArrayList.java:459) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.capability.registry.RequirementRegistration.getOldestRegistrationPoint(RequirementRegistration.java:120) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.OperationContextImpl.validateCapabilities(OperationContextImpl.java:315) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.OperationContextImpl.stageCompleted(OperationContextImpl.java:267) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.AbstractOperationContext.tryStageCompleted(AbstractOperationContext.java:832) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:735) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:466) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1427) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:449) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.ModelControllerImpl.lambda$executeForResponse$0(ModelControllerImpl.java:260) at org.wildfly.security.elytron-base@1.19.0.Final//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:304) at org.wildfly.security.elytron-base@1.19.0.Final//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:270) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.ModelControllerImpl.executeForResponse(ModelControllerImpl.java:260) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.ModelControllerImpl.executeOperation(ModelControllerImpl.java:254) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:237) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:241) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:163) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:159) at org.wildfly.security.elytron-base@1.19.0.Final//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:328) at org.wildfly.security.elytron-base@1.19.0.Final//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:285) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225) at org.jboss.as.controller@19.0.0.Beta6//org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:159) at org.jboss.as.protocol@19.0.0.Beta6//org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70) at org.jboss.as.protocol@19.0.0.Beta6//org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160) at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at java.base/java.lang.Thread.run(Thread.java:829) at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
This appears to be due to the sharing of the List<RegistrationPoint> data structure between instances of RequirementRegistration.
Modifying the constructor to create a deep copy of the the provided map registration points appears to solve the problem.