Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5351

querying TimerService information from CLI fails for canceled timer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 8.2.1.Final, 10.0.0.CR2, 10.0.0.CR4, 10.0.0.CR5
    • Fix Version/s: 12.0.0.Beta1, 12.0.0.Final
    • Component/s: EJB
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      • build the attached timer-cli-failure project: mvn clean package
      • from a clean server
      • deploy the provided demo war timer-cli-failure.war
      • execute the following cli jboss-cli.bat -c --command=":read-resource(recursive=true,include-runtime=true)"

      the output is
      {{{
      "outcome" => "failed",
      "rolled-back" => true
      }}}

      and on the server we have an exception
      {{2015-09-16 09:24:20,078 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) JBAS014612: Operation ("read-attribute") failed - address: ([
      ("deployment" => "timer-cli-failure.war"),
      ("subsystem" => "ejb3"),
      ("singleton-bean" => "TimersStartup"),
      ("service" => "timer-service"),
      ("timer" => "4cca6317-86e7-40f3-a7e8-7780b05e90af")
      ]): javax.ejb.NoSuchObjectLocalException: JBAS014469: Timer was canceled
      at org.jboss.as.ejb3.timerservice.TimerImpl.assertTimerState(TimerImpl.java:462)
      at org.jboss.as.ejb3.timerservice.TimerImpl.getInfo(TimerImpl.java:237)
      at org.jboss.as.ejb3.subsystem.deployment.TimerResourceDefinition$12.readAttribute(TimerResourceDefinition.java:314)
      at org.jboss.as.ejb3.subsystem.deployment.TimerResourceDefinition$AbstractReadAttributeHandler.executeRuntime(TimerResourceDefinition.java:364)
      at org.jboss.as.ejb3.subsystem.deployment.TimerResourceDefinition$AbstractTimerHandler$1.execute(TimerResourceDefinition.java:330)
      at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:660) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:501) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:298) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:293) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:276) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:150) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:199) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:130) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:150) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:146) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_60]
      at javax.security.auth.Subject.doAs(Subject.java:422) [rt.jar:1.8.0_60]
      at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:94) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:146) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:283) [wildfly-protocol-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:504) [wildfly-protocol-8.2.1.Final-AM2.jar:8.2.1.Final-AM2]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
      at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]
      }}

      Show
      build the attached timer-cli-failure project: mvn clean package from a clean server deploy the provided demo war timer-cli-failure.war execute the following cli jboss-cli.bat -c --command=":read-resource(recursive=true,include-runtime=true)" the output is {{{ "outcome" => "failed", "rolled-back" => true }}} and on the server we have an exception {{2015-09-16 09:24:20,078 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) JBAS014612: Operation ("read-attribute") failed - address: ([ ("deployment" => "timer-cli-failure.war"), ("subsystem" => "ejb3"), ("singleton-bean" => "TimersStartup"), ("service" => "timer-service"), ("timer" => "4cca6317-86e7-40f3-a7e8-7780b05e90af") ]): javax.ejb.NoSuchObjectLocalException: JBAS014469: Timer was canceled at org.jboss.as.ejb3.timerservice.TimerImpl.assertTimerState(TimerImpl.java:462) at org.jboss.as.ejb3.timerservice.TimerImpl.getInfo(TimerImpl.java:237) at org.jboss.as.ejb3.subsystem.deployment.TimerResourceDefinition$12.readAttribute(TimerResourceDefinition.java:314) at org.jboss.as.ejb3.subsystem.deployment.TimerResourceDefinition$AbstractReadAttributeHandler.executeRuntime(TimerResourceDefinition.java:364) at org.jboss.as.ejb3.subsystem.deployment.TimerResourceDefinition$AbstractTimerHandler$1.execute(TimerResourceDefinition.java:330) at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:660) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:501) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:298) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:293) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:276) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:150) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:199) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:130) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:150) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:146) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_60] at javax.security.auth.Subject.doAs(Subject.java:422) [rt.jar:1.8.0_60] at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:94) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:146) [wildfly-controller-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:283) [wildfly-protocol-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:504) [wildfly-protocol-8.2.1.Final-AM2.jar:8.2.1.Final-AM2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final] }}

      Description

      When (at least) a persistent calendar timer is created then cancelled, querying TimerService information via CLI (script or library) fails when retrieving also runtime information.

      We discovered the issue because our arquillian tests are failing due to some code in arquillian that fires the equivalent of the provided CLI command below when remotes tests are executed.

      Attached is a proposed patch and a demo project to reproduce in a simple way.

        Attachments

        1. patch1.diff
          1 kB
        2. timer-cli-failure.zip
          4 kB
        3. WFLY-5351diff
          4 kB

          Activity

            People

            Assignee:
            matthieu.brouillard Matthieu Brouillard (Inactive)
            Reporter:
            matthieu.brouillard Matthieu Brouillard (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: