-
Bug
-
Resolution: Done
-
Major
-
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.
- relates to
-
JGRP-216 FRAG2 corrupts messages
- Resolved