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

PerDestinationBundler: sending of multicast and unicast leads to data corruption

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.5.0, 5.4.9
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      In PerDestinationBundler, if we have {use_single_sender_thread=false}}, we have 1 thread per destination sending messages. In this case, the bundler disables TCP.use_lock_to_send.

      However, this can lead to corrupted data at the receiver:

      packet from 192.168.1.110:7802 has different version (0.0.0) than ours (5.5.0); packet is discarded
      

      The cause is this:

      • When we send a multicast, the SendBuffer thread responsible for destination NULL sends the message to all members
      • When - at the same time - we send a unicast message to one of the members, the multicast and the unicast are concurrent, and might therefore lead to stream corruption at the receiver

      Solution

      • Set TCP_use_lock_to_send to true when use_single_sender_thread is false
      • Alternatively:
        • Handle a multicast M to {A,B,C,D} by adding M to the 4 queues. A unicast and a multicast message will therefore not be sent concurrently
        • Note: only do this for TCP / TCP_NIO2; UDP benefits from sending multicast messages as an IP multicast (single packet)

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

                Created:
                Updated:
                Resolved: