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

Unicast from within viewAccepted() callback throws exception in UNICAST

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.5.1, 2.6
    • None
    • None
    • Workaround Exists
    • Hide

      Yes, we could send an ENABLE_UNICASTS_TO event down the stack in viewAccepted() before sending the unicast message

      Show
      Yes, we could send an ENABLE_UNICASTS_TO event down the stack in viewAccepted() before sending the unicast message

      Unit test is UnicastUnitTest.testUnicastMessageInCallbackExistingMember(). Swapping lines 505 and 506 in GMS fixes the issue. Stack trace is below.

      The issue is that - since we propagate the new view up the stack first, then down - the viewAccepted() callback gets invoked first, before UNICAST can update its view (done when the new view is propagated down the stack).

      We need to investigate whether swapping lines 505 and 506 breaks JGRP-347

      7:45:12,375 [WARN] [Incoming Thread,x,192.168.5.2:1959] JChannel.up(): failed calling viewAccepted() in receiver
      java.lang.RuntimeException: java.lang.IllegalArgumentException: 192.168.5.2:1961 is not a member of the group [192.168.5.2:1959] (enabled_members=[])
      at org.jgroups.tests.UnicastUnitTest$MyReceiver.viewAccepted(UnicastUnitTest.java:84)
      at org.jgroups.JChannel.up(JChannel.java:1099)
      at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:325)
      at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:151)
      at org.jgroups.protocols.FRAG2.up(FRAG2.java:197)
      at org.jgroups.protocols.FC.up(FC.java:414)
      at org.jgroups.protocols.pbcast.GMS.installView(GMS.java:505)
      at org.jgroups.protocols.pbcast.CoordGmsImpl.handleViewChange(CoordGmsImpl.java:449)
      at org.jgroups.protocols.pbcast.GMS.up(GMS.java:661)
      at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:160)
      at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)
      at org.jgroups.protocols.UNICAST.up(UNICAST.java:263)
      at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:720)
      at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:546)
      at org.jgroups.protocols.BARRIER.up(BARRIER.java:122)
      at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:167)
      at org.jgroups.protocols.FD.up(FD.java:322)
      at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:298)
      at org.jgroups.protocols.MERGE2.up(MERGE2.java:145)
      at org.jgroups.protocols.Discovery.up(Discovery.java:247)
      at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1486)
      at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1435)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)

            rhn-engineering-bban Bela Ban
            rhn-engineering-bban Bela Ban
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: