Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-9127

Remote commands can access components before they are started

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      PerCacheInboundInvocationHandler.handle() may be called before the component was started, because GlobalInboundInvocationHandler fetches it from the component registry without any checks. CommandsFactoryImpl.initializeReplicableCommand() doesn't wait for the components that it injects into remote commands to be started, either.

      This started causing random test failures in ConcurrentStartForkChannelTest after ISPN-8515, which moved most initialization work from init() methods to start() methods. Because StateProviderImpl starts after StateTransferManagerImpl, it's possible for a node to receive a StateRequestCommand before StateProviderImpl has initialized:

      16:15:09,549 TRACE (remote-thread-Test-NodeB-p51957-t2:[org.infinispan.CONFIG]) [StateProviderImpl] Starting outbound transfer to node Test-NodeA for cache null, topology id 2, segments {0-255}
      16:15:09,551 WARN  (remote-thread-Test-NodeB-p51957-t2:[]) [NonTotalOrderPerCacheInboundInvocationHandler] ISPN000071: Caught exception when handling command StateRequestCommand{cache=org.infinispan.CONFIG, origin=Test-NodeA, type=START_STATE_TRANSFER, topologyId=2, segments={0-255}}
      java.lang.IllegalArgumentException: chunkSize must be greater than 0
      	at org.infinispan.statetransfer.OutboundTransferTask.<init>(OutboundTransferTask.java:114) ~[classes/:?]
      	at org.infinispan.statetransfer.StateProviderImpl.startOutboundTransfer(StateProviderImpl.java:273) ~[classes/:?]
      	at org.infinispan.statetransfer.StateRequestCommand.invokeAsync(StateRequestCommand.java:101) ~[classes/:?]
      	at org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler.invokeCommand(BasePerCacheInboundInvocationHandler.java:94) ~[classes/:?]
      

        1. trace.tar.gz
          586 kB
        2. server2
          101 kB
        3. server1
          100 kB
        4. server0
          93 kB

              dberinde@redhat.com Dan Berindei (Inactive)
              dberinde@redhat.com Dan Berindei (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare
              Diego Lovison Diego Lovison

                Created:
                Updated:
                Resolved:
                Archived: