You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a real scenario when using a cache that contains data shared between threads.
As I see, it is a known problem in readAscii method. Because it was fixed in 5.. version of the library.
But I think it will be good to fix it in 4... version family too.
At the moment, I fixed this by simply copying the input array to a new one.
In terms of cost, this is similar to using an intermediate char[] buffer in "readAscii"
To Reproduce
I wrote a test that reproduces the situation. See "*Additional context".
Caused by: com.esotericsoftware.kryo.io.KryoBufferUnderflowException: Buffer underflow.
at com.esotericsoftware.kryo.io.Input.require(Input.java:221)
at com.esotericsoftware.kryo.io.Input.readVarInt(Input.java:447)
at com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:145)
at com.esotericsoftware.kryo.Kryo.readClass(Kryo.java:758)
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:869)
at org.redisson.codec.Kryo5Codec$4.decode(Kryo5Codec.java:153)
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:454)
at org.redisson.client.handler.CommandDecoder.decodeCommandBatch(CommandDecoder.java:308)
at org.redisson.client.handler.CommandDecoder.decodeCommand(CommandDecoder.java:234)
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:150)
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:126)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection
Describe the bug
kryo 4...
When I use a single byte[] array to deserialize from multiple streams, sometimes there is a crash with the error
This is a real scenario when using a cache that contains data shared between threads.
As I see, it is a known problem in readAscii method. Because it was fixed in 5.. version of the library.
But I think it will be good to fix it in 4... version family too.
At the moment, I fixed this by simply copying the input array to a new one.
In terms of cost, this is similar to using an intermediate char[] buffer in "readAscii"
To Reproduce
I wrote a test that reproduces the situation. See "*Additional context".
Environment:
Additional context
KryoBugLab.zip
The text was updated successfully, but these errors were encountered: