Reputation: 673
I am using Apache Arrow Java API, which access the direct memory.
I am also using Redis, when this Java API accessing direct memory, Redis xstream continues to grow in memory.
I found occasionally, Arrow would calculate the wrong result of following operations,
public static int bytesToInt(byte[] bytes) {
return ((bytes[3] & 255) << 24) +
((bytes[2] & 255) << 16) +
((bytes[1] & 255) << 8) +
((bytes[0] & 255));
}
this method return negative result and following code raise error
messageLength = MessageSerializer.bytesToInt(buffer.array());
ByteBuffer.allocate(messageLength);
And I found if I restart Redis(delete all previous data), the error would disappear for a while. If not, the error would occur much sooner while I call the Arrow method.
The reproduce is critical, to my experience, Arrow direct memory access should be frequent and redis xstream growth should be fast enough.
So I am not asking to reproduce and solve the issue completely, but to ask that is it possible that these two memory access conflict? And could the result above has the reasonable theoretical support?
Upvotes: 0
Views: 258