Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2532

FlowControl should not send credits to self for DONT_LOOPBACK messages

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.12, 5.1.6
    • 4.0.24, 4.2.11
    • None
    • False
    • False
    • Undefined

      When FlowControl.down() sees a DONT_LOOPBACK message, it assumes that the message destination is null or self: it decrements the credits available for self to send messages to self, and it sends new credits to self if the number of available credits goes too low.

      But the DONT_LOOPBACK flag means the message is not going to be received by self, so the number of self->self credits could just as well stay the same both sides.

      Infinispan sets the DONT_LOOPBACK flag on all messages it sends, including unicast messages to other nodes. We assume that this will have no effect if the destination is not null or self (and we never send a message to self), and it's surprising when a message with the DONT_LOOPBACK flag triggers a loopback:

      2021-02-19 11:45:04,959 ERROR [org.jgroups.protocols.UDP] (pool-14-thread-1) failed spawning new thread: java.lang.OutOfMemoryError: unable to create new native thread
      	at java.lang.Thread.start0(Native Method)
      	at java.lang.Thread.start(Thread.java:717)
      	at org.jgroups.protocols.TP.runInNewThread(TP.java:1410)
      	at org.jgroups.protocols.TP.submitToThreadPool(TP.java:1394)
      	at org.jgroups.protocols.TP.submitToThreadPool(TP.java:1391)
      	at org.jgroups.protocols.TP.submitToThreadPool(TP.java:1377)
      	at org.jgroups.util.SubmitToThreadPool.loopback(SubmitToThreadPool.java:30)
      	at org.jgroups.util.MaxOneThreadPerSender.loopback(MaxOneThreadPerSender.java:54)
      	at org.jgroups.protocols.TP.loopback(TP.java:1190)
      	at org.jgroups.protocols.TP.down(TP.java:1109)
      	at org.jgroups.stack.Protocol.down(Protocol.java:317)
      	at org.jgroups.stack.Protocol.down(Protocol.java:317)
      	at org.jgroups.stack.Protocol.down(Protocol.java:317)
      	at org.jgroups.stack.Protocol.down(Protocol.java:317)
      	at org.jgroups.stack.Protocol.down(Protocol.java:317)
      	at org.jgroups.protocols.pbcast.NAKACK2.down(NAKACK2.java:559)
      	at org.jgroups.protocols.UNICAST3.down(UNICAST3.java:625)
      	at org.jgroups.stack.Protocol.down(Protocol.java:317)
      	at org.jgroups.stack.Protocol.down(Protocol.java:317)
      	at org.jgroups.protocols.FlowControl.sendCredit(FlowControl.java:480)
      	at org.jgroups.protocols.FlowControl.down(FlowControl.java:322)
      	at org.jgroups.protocols.FlowControl.down(FlowControl.java:309)
      	at org.jgroups.protocols.FRAG3.down(FRAG3.java:145)
      	at org.jgroups.stack.Protocol.down(Protocol.java:317)
      	at org.jgroups.fork.ForkProtocol.down(ForkProtocol.java:42)
      	at org.jgroups.fork.ForkProtocolStack.down(ForkProtocolStack.java:62)
      	at org.jgroups.fork.ForkChannel.send(ForkChannel.java:222)
      	at org.jgroups.fork.ForkChannel.send(ForkChannel.java:21)
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.send(JGroupsTransport.java:1060)
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.sendCommand(JGroupsTransport.java:1235)
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.sendToMany(JGroupsTransport.java:276)
      	at org.infinispan.remoting.rpc.RpcManagerImpl.sendToMany(RpcManagerImpl.java:390)
      	at org.infinispan.interceptors.distribution.BaseDistributionInterceptor.primaryReturnHandler(BaseDistributionInterceptor.java:313)
      

              rhn-engineering-bban Bela Ban
              dberinde@redhat.com Dan Berindei (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: