Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1002

TransactionalProtocolOperationHandler.AbortOperationHandler must initialize the ExecuteRequestContext before responding

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.0.0.CR8
    • 2.0.0.CR3
    • Management
    • None

    Description

      If in a race a COMPLETE_TX_REQUEST cancelling an op is processed by a server/slave HC before the original EXECUTE_TX_REQUEST is processed, when the EXECUTE_TX_REQUEST comes in the AbortOperationHandler attempts to respond with a "outcome"=>"cancelled" response. This will fail because the ExecutionRequestContext will not be initialized.

      In this situation the AbortOperationHandler should initialize the ERC.

      With assertions enabled, this appears in the log:

      20:58:47,947 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) Exception in thread "Remoting "slave:main-three:MANAGEMENT" task-6" java.lang.AssertionError
      
      20:58:47,947 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestContext.failed(TransactionalProtocolOperationHandler.java:458)
      
      20:58:47,948 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$AbortOperationHandler.handleRequest(TransactionalProtocolOperationHandler.java:275)
      
      20:58:47,948 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:270)
      
      20:58:47,948 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:252)
      
      20:58:47,948 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:123)
      
      20:58:47,949 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at org.jboss.as.protocol.mgmt.ManagementChannelReceiver$1.handleMessage(ManagementChannelReceiver.java:56)
      
      20:58:47,949 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at org.jboss.as.protocol.mgmt.ManagementChannelReceiver.handleMessage(ManagementChannelReceiver.java:85)
      
      20:58:47,949 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at org.jboss.remoting3.remote.RemoteConnectionChannel$5.run(RemoteConnectionChannel.java:451)
      
      20:58:47,949 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at org.jboss.remoting3.EndpointImpl$TrackingExecutor$1.run(EndpointImpl.java:705)
      
      20:58:47,950 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      
      20:58:47,950 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      
      20:58:47,950 ERROR [stderr] (Remoting "slave:main-three:MANAGEMENT" task-6) 	at java.lang.Thread.run(Thread.java:745)
      

      Without assertions, a few lines later a call to sendResponse will result in an NPE.

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: