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

FRAG corrupts messages under load

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3
    • 2.2.8, 2.2.9, 2.2.9.1
    • None
    • Medium

      [Guillaume Forget]
      I believe under a lot of stress FRAG corrupts the messages at the time it fragments them. I think this is due to the member bos of type ExposedByteArrayOutputStream which is never synchronized while being used in the fragment method. I would appreciate if someone could take a look at my findings and confirm them or spot a flow in my logic. I checked JIRA and I haven't found this reported yet.

      This is how I come to have suspicions:
      While running some stress tests, I kept seeing UTFDataFormatException or EOFException at the time messages were being reconstituted. The "funny" thing was both the sender and the receiver were getting these exceptions and since I have loopback set to false I knew it could not be a network problem. So I wrote a quick protocol SubFrag which I put right below FRAG and reconstitutes "for fun" the fragments from FRAG the same way it does it in unfragment and at that was getting the exception already. I was then convinced that the problem was in FRAG itself. I then scrutinize the code very carefully and I found that bos was shared but not synchronized. After I made the change to synchronize its access the exceptions were gone.

            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: