[jboss-jira] [JBoss JIRA] (JGRP-1718) Message corruption under heavy load
Bela Ban (JIRA)
jira-events at lists.jboss.org
Thu Oct 17 06:39:02 EDT 2013
[ https://issues.jboss.org/browse/JGRP-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12817090#comment-12817090 ]
Bela Ban commented on JGRP-1718:
--------------------------------
* What makes you think this is an issue in JGroups and not in Kryo ?
* If you run your app without Kryo, does it exhibit the same problem ?
* I don't know Kryo, but does it reuse buffers, possibly overwriting unread data ? Might be worth trying out the following things:
** Copy the buffer returned from Kryo or passed to Kryo
** Use the {{Message(Address dest, Address src, byte[] buffer, int offset, int length}} constructor to pass the buffer to JGroups
** Use the {{Message.getRawBuffer(), msg.getOffset(), msg.getLength()}} method to fetch the buffer from a message
If this doesn't help and you can provide me with a JGroups standalone program that reproduces the problem, post the stack trace, and I can run it here to see what the issue is.
However, I'm not going to debug Kryo issues... :-)
> Message corruption under heavy load
> -----------------------------------
>
> Key: JGRP-1718
> URL: https://issues.jboss.org/browse/JGRP-1718
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.2.12
> Environment: JBoss AS 7.2.0.Final (includes JGroups 3.2.7.Final, upgrading to 3.2.12.Final had no effect)
> Reporter: Rich DiCroce
> Assignee: Bela Ban
>
> In my project, I'm using the Kryo serialization library to serialize/deserialize objects to/from byte[]. Some of these byte arrays appear to be getting corrupted during transmission.
> The problem happens very infrequently and only under load. I have to send tens of thousands of messages from hundreds of threads just to get two or three errors. The exception occurs when Kryo tries to deserialize the byte[] on the receiving node. So far, all of the errors I've seen happen when Kryo tries to find a class to deserialize an object, and the stack traces end with something like:
> Caused by: java.lang.ClassNotFoundException: java.util.Date[SOH][GS]
> Note that the [SOH] and [GS] are not literally those strings, they're unprintable ASCII 0x1 and 0x1D.
> I'm confident that Kryo itself is not the source of the problem. I added some code to my project to deserialize the message on the sending node, immediately after serializing it, and log any exception thrown from the deserialization. The sending node did not log an exception, but the receiving node still did. My code passes the byte[] to the Message constructor without doing anything to it.
> It also appears that I am not the first person to encounter this issue. See https://code.google.com/p/kryo/issues/detail?id=102
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list