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

Remote commands can access components before they are started

    XMLWordPrintable

Details

    Description

      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/:?]
      

      Attachments

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

        Issue Links

          Activity

            People

              dberinde@redhat.com Dan Berindei
              dberinde@redhat.com Dan Berindei
              Diego Lovison Diego Lovison
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: